summaryrefslogtreecommitdiff
path: root/src/hexen/mn_menu.c
diff options
context:
space:
mode:
authorFabian Greffrath2015-05-05 12:11:25 +0200
committerFabian Greffrath2015-05-05 12:15:44 +0200
commit90aec9de758dbb178dc19c146d3b0fb22b99342b (patch)
tree879fe93a29d1a3d460332e474fc1c4304fe33bea /src/hexen/mn_menu.c
parent25d920925361c1e70dbd73afd08a0b836080f2f1 (diff)
downloadchocolate-doom-90aec9de758dbb178dc19c146d3b0fb22b99342b.tar.gz
chocolate-doom-90aec9de758dbb178dc19c146d3b0fb22b99342b.tar.bz2
chocolate-doom-90aec9de758dbb178dc19c146d3b0fb22b99342b.zip
warnings: fix "value computed is not used" warnings
This fixes warnings that are caused by calling GET_LONG without using its return value, e.g.: sv_save.c: In function ‘StreamIn_player_t’: ../../src/i_swap.h:34:20: warning: value computed is not used [-Wunused-value] #define LONG(x) ((signed int) SDL_SwapLE32(x)) ^ sv_save.c:33:18: note: in expansion of macro ‘LONG’ #define GET_LONG LONG(*SavePtr.l++) ^ sv_save.c:349:5: note: in expansion of macro ‘GET_LONG’ GET_LONG; ^ Introducing a "long dummy" variable and calling "dummy = GET_LONG" does not help, because this provokes another warning, rightfully so: sv_save.c: In function ‘StreamIn_player_t’: sv_save.c:346:10: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] long dummy; Assigning the return value directly to the struct field results in: sv_save.c: In function ‘StreamIn_player_t’: sv_save.c:349:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion] str->mo = GET_LONG; Adding the cast to "(void *)" results in: sv_save.c: In function ‘StreamIn_player_t’: sv_save.c:349:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] str->mo = (void *) GET_LONG; Adding the intermediate cast to "(intptr_t)" finally silences the compiler. Phew!
Diffstat (limited to 'src/hexen/mn_menu.c')
0 files changed, 0 insertions, 0 deletions