Modular libX11 from RC1 has the following compiler warnings which need to be investigated and fixed before X11R7. $ grep warning: /home/mharris/rpmbuild/logs/libX11-0.99.2-1.fc4i386.capslock.lan.log imDefIm.c:550: warning: 'num' may be used uninitialized in this function imLcPrs.c:98: warning: ignoring return value of 'ungetc', declared with attribute warn_unused_result imTrX.c:439: warning: 'len' may be used uninitialized in this function omGeneric.c:2059: warning: ignoring return value of 'sscanf', declared with attribute warn_unused_result lcFile.c:252: warning: implicit declaration of function 'getresuid' lcFile.c:252: warning: nested extern declaration of 'getresuid' lcFile.c:253: warning: implicit declaration of function 'getresgid' lcFile.c:253: warning: nested extern declaration of 'getresgid' lcGeneric.c:314: warning: ignoring return value of 'sscanf', declared with attribute warn_unused_result lcGeneric.c:628: warning: ignoring return value of 'sscanf', declared with attribute warn_unused_result lcGeneric.c:692: warning: ignoring return value of 'sscanf', declared with attribute warn_unused_result lcGeneric.c:902: warning: ignoring return value of 'sscanf', declared with attribute warn_unused_result ConnDis.c:716: warning: function declaration isn't a prototype /usr/include/sys/ipc.h:25:3: warning: #warning "Files using this header must be compiled with _SVID_SOURCE or _XOPEN_SOURCE" Host.c:54: warning: 'siAddr' may be used uninitialized in this function Host.c:91: warning: 'siAddr' may be used uninitialized in this function OpenDis.c:357: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result OpenDis.c:359: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result x11_trans.c:29:1: warning: "X11_t" redefined <command line>:1:1: warning: this is the location of the previous definition x11_trans.c:30:1: warning: "TRANS_CLIENT" redefined <command line>:1:1: warning: this is the location of the previous definition
Host.c, imDefIm.c and imTrX.c can be "fixed" by adding " = 0" to the variable declarations. The warning appears to be a false positive in both cases, however. ConnDis.c needs one function declaration ANSI-fied. The two "redefined" warnings can be fixed by removing " -DX11_t -DTRANS_CLIENT" from the CFLAGS in Makefile.am (in Makefile.in for an rpm package patch if it comes to that). The offending lines in OpenDis.c can be rewritten as (void) fprintf (stderr, "%.*s\r\n", (int)prefix.lengthReason, u.failure); I'm not seeing the warning(s) from imLcPrs.c or lcGeneric.c, need to look and see if I build with different configure options. lcFile.c needs to be built with -D_GNU_SOURCE to get the getres[ug]id prototypes from unistd.h, and have the include of same uncommented at the top of the file. That or simply ignore getresuid altogether. It's found by configure by linking with the lib directly IIRC, but isn't declared when this is build because of the absence of GNU_SOURCE define.
Created attachment 121165 [details] OK, apparently I need a description. So much for choosing sensible filenames ;)
I think we should manage these sort of bugs in X.Org bugzilla instead of here, as they're more likely to sit and rot for a long time here, and they're relevant to all X distributions. Closing WONTFIX, as there's no real problem caused by this, however if it's still present, it should probably be fixed upstream as part of a major code cleanup to remove warnings, etc. upstream.