Compilation warnings in old versions of gcc #188

Closed
ydahhrk opened this Issue Nov 12, 2015 · 0 comments

Projects

None yet

1 participant

@ydahhrk
Member
ydahhrk commented Nov 12, 2015

Discovered while testing #152.

$ gcc --version
gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ cd NAT64/mod/stateful
$ make > /dev/null
pool4/table.c: In function ‘pool4table_rm’:
pool4/table.c:321: warning: ‘error’ may be used uninitialized in this function
pool4/empty.c: In function ‘pool4empty_foreach_taddr4’:
pool4/empty.c:147: warning: ‘saddr.s_addr’ may be used uninitialized in this function

I hadn't reported nor cared about this earlier because they're false alarms (and release 3.4.0 had too much stuff already). I guess the code gets a little complicated due to the multiple function layers involved and the analyzer gets confused. Newer versions of gcc do not report these warnings and I do not see how the variables might be used uninitialized.

@ydahhrk ydahhrk closed this in 1400616 Nov 19, 2015
@ydahhrk ydahhrk added this to the 3.4.2 milestone Nov 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment