Find attached patchset which address some serious compiler warning fixes spotted by GCC4.1 (SLES10 SP2) and GCC4.3 (openSUSE Factory). ftest08.c calls close() with uninitialized file descriptor variable. Fix warning about _is_ unused variable (note the difference between "may" and "is" unused!). Only child opens the file descriptor, once forked.
ftest08.c: In function 'runtest':
ftest08.c:192: warning: 'fd' is used uninitialized in this function

Valgrind spot this issue aswell:
==21058== Syscall param close(fd) contains uninitialised byte(s)
==21058==    at 0x4BD70A0: __close_nocancel (in /lib64/libc-2.4.so)
==21058==    by 0x401D0E: runtest (ftest08.c:192)
==21058==    by 0x401B10: main (ftest08.c:119)
Signed-off-by: Daniel Gollub <dgollub@suse.de>.
1 file changed