Bug 171368 - Modular libX11 compiler warnings should be fixed for X11R7
Summary: Modular libX11 compiler warnings should be fixed for X11R7
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: libX11   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: FC6Target
TreeView+ depends on / blocked
 
Reported: 2005-10-21 09:21 UTC by Mike A. Harris
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-06-06 08:56:03 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
OK, apparently I need a description. So much for choosing sensible filenames ;) (125.00 KB, patch)
2005-11-17 07:49 UTC, Bill Crawford
no flags Details | Diff

Description Mike A. Harris 2005-10-21 09:21:56 UTC
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

Comment 1 Bill Crawford 2005-11-17 07:17:05 UTC
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.


Comment 2 Bill Crawford 2005-11-17 07:49:27 UTC
Created attachment 121165 [details]
OK, apparently I need a description. So much for choosing sensible filenames ;)

Comment 3 Mike A. Harris 2006-06-06 08:56:03 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.