Changeset 3ea31b6 for perlconfig.c


Ignore:
Timestamp:
Dec 6, 2008, 5:39:48 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
b7bb454, d4b6b23
Parents:
2b237308
git-author:
Nelson Elhage <nelhage@mit.edu> (12/06/08 16:43:59)
git-committer:
Nelson Elhage <nelhage@mit.edu> (12/06/08 17:39:48)
Message:
Kill a load of "value computed is not used" warnings.

I would love it if anyone could explain to me when gcc decides to
throw these warnings and when it doesn't. It can't actually be any use
of a non-void function in void context, can it?
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlconfig.c

    r909771e r3ea31b6  
    4444  h = newHV();
    4545
    46 #define MSG2H(h,field) hv_store(h, #field, strlen(#field), \
    47                               newSVpv(owl_message_get_##field(m),0), 0)
     46#define MSG2H(h,field) (void)hv_store(h, #field, strlen(#field),        \
     47                                      newSVpv(owl_message_get_##field(m),0), 0)
    4848
    4949  if (owl_message_is_type_zephyr(m)
     
    5959      owl_free(ptr);
    6060    }
    61     hv_store(h, "fields", strlen("fields"), newRV_noinc((SV*)av_zfields), 0);
    62 
    63     hv_store(h, "auth", strlen("auth"),
    64              newSVpv(owl_zephyr_get_authstr(owl_message_get_notice(m)),0),0);
     61    (void)hv_store(h, "fields", strlen("fields"), newRV_noinc((SV*)av_zfields), 0);
     62
     63    (void)hv_store(h, "auth", strlen("auth"),
     64                   newSVpv(owl_zephyr_get_authstr(owl_message_get_notice(m)),0),0);
    6565  }
    6666
     
    6868  for(i=0; i<j; i++) {
    6969    pair=owl_list_get_element(&(m->attributes), i);
    70     hv_store(h, owl_pair_get_key(pair), strlen(owl_pair_get_key(pair)),
    71              newSVpv(owl_pair_get_value(pair),0),0);
     70    (void)hv_store(h, owl_pair_get_key(pair), strlen(owl_pair_get_key(pair)),
     71                   newSVpv(owl_pair_get_value(pair),0),0);
    7272  }
    7373 
     
    8888    MSG2H(h, header);
    8989  }
    90   hv_store(h, "time", strlen("time"), newSVpv(owl_message_get_timestr(m),0),0);
    91   hv_store(h, "id", strlen("id"), newSViv(owl_message_get_id(m)),0);
    92   hv_store(h, "deleted", strlen("deleted"), newSViv(owl_message_is_delete(m)),0);
    93   hv_store(h, "private", strlen("private"), newSViv(owl_message_is_private(m)),0);
    94   hv_store(h, "should_wordwrap",
    95            strlen("should_wordwrap"), newSViv(
    96                                               owl_filter_message_match(wrap, m)),0);
     90  (void)hv_store(h, "time", strlen("time"), newSVpv(owl_message_get_timestr(m),0),0);
     91  (void)hv_store(h, "id", strlen("id"), newSViv(owl_message_get_id(m)),0);
     92  (void)hv_store(h, "deleted", strlen("deleted"), newSViv(owl_message_is_delete(m)),0);
     93  (void)hv_store(h, "private", strlen("private"), newSViv(owl_message_is_private(m)),0);
     94  (void)hv_store(h, "should_wordwrap",
     95                 strlen("should_wordwrap"), newSViv(
     96                                                    owl_filter_message_match(wrap, m)),0);
    9797
    9898  type = owl_message_get_type(m);
Note: See TracChangeset for help on using the changeset viewer.