Fivetonsofflax / opentyrian

Automatically exported from code.google.com/p/opentyrian
GNU General Public License v2.0
0 stars 0 forks source link

Uninitialized values #135

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
To see the warnings compile the code with -Werror.
You'll see some warnings about the usage of uninitialized variables

I'm using 2.1.20130907 on latest OpenBSD 5.5 snapshot with gcc version 4.2.1.

Attached are the fixes to silence the compiler warnings.

Original issue reported on code.google.com by psschmi...@gmail.com on 5 Mar 2014 at 11:23

Attachments:

GoogleCodeExporter commented 9 years ago
Could you post the actual warnings? Some of the stuff in that patch looks 
weird, like the inline attributes. I'll investigate the other ones.

Original comment by yuriks...@gmail.com on 6 Mar 2014 at 5:11

GoogleCodeExporter commented 9 years ago
src/tyrian2.c: In function 'JE_eventSystem':
src/tyrian2.c:4370: warning: 'max_i' is used uninitialized in this function
src/tyrian2.c:4370: warning: 'initial_i' is used uninitialized in this function
src/tyrian2.c:4329: warning: 'all_enemies' may be used uninitialized in this 
function
src/mainint.c: In function 'JE_playerMovement':
src/mainint.c:3665: warning: 'ship_banking' is used uninitialized in this 
function
src/shots.c: In function 'player_shot_create':
src/shots.c:322: warning: 'shot_id' may be used uninitialized in this function
src/video_scale_hqNx.c:51: warning: C99 inline functions are not supported; 
using GNU89
src/video_scale_hqNx.c:51: warning: to disable this warning use -fgnu89-inline 
or the gnu_inline function attribute
src/video_scale_hqNx.c:56: warning: C99 inline functions are not supported; 
using GNU89
src/video_scale_hqNx.c:61: warning: C99 inline functions are not supported; 
using GNU89
src/video_scale_hqNx.c:69: warning: C99 inline functions are not supported; 
using GNU89
src/video_scale_hqNx.c:77: warning: C99 inline functions are not supported; 
using GNU89
src/video_scale_hqNx.c:82: warning: C99 inline functions are not supported; 
using GNU89
src/video_scale_hqNx.c:90: warning: C99 inline functions are not supported; 
using GNU89
src/video_scale_hqNx.c:98: warning: C99 inline functions are not supported; 
using GNU89
src/video_scale_hqNx.c:106: warning: C99 inline functions are not supported; 
using GNU89
src/video_scale_hqNx.c:114: warning: C99 inline functions are not supported; 
using GNU89
src/video_scale_hqNx.c:122: warning: C99 inline functions are not supported; 
using GNU89

Original comment by psschmi...@gmail.com on 23 Mar 2014 at 4:21

GoogleCodeExporter commented 9 years ago
The unused variable warnings should be fixed in 0a06d5af473c. Thanks for the 
report.

Original comment by yuriks...@gmail.com on 11 May 2014 at 1:30