[Python-bugs-list] [Bug #121479] Compiler warnings on Solaris

noreply@sourceforge.net noreply@sourceforge.net
Tue, 19 Dec 2000 18:48:26 -0800


Bug #121479, was updated on 2000-Nov-03 14:53
Here is a current snapshot of the bug.

Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Submitted by: gward
Assigned to : gward
Summary: Compiler warnings on Solaris

Details: GCC 2.95.2 on Solaris 2.6 reports a bunch of warnings building the latest CVS source.  Here's the complete list:

intrcheck.c:151: warning: function declaration isn't a prototype
intrcheck.c: In function `PyOS_InitInterrupts':
intrcheck.c:156: warning: function declaration isn't a prototype
intrcheck.c:156: warning: function declaration isn't a prototype
floatobject.c:35: warning: function declaration isn't a prototype
intobject.c: In function `PyInt_FromString':
intobject.c:185: warning: subscript has type `char'
bltinmodule.c: In function `builtin_ord':
bltinmodule.c:1507: warning: `ord' might be used uninitialized in this function
errors.c: In function `PyErr_Format':
errors.c:405: warning: subscript has type `char'
errors.c:460: warning: subscript has type `char'
errors.c:465: warning: subscript has type `char'
errors.c:468: warning: subscript has type `char'
pythonrun.c: In function `initsigs':
pythonrun.c:1134: warning: function declaration isn't a prototype
./posixmodule.c: In function `posix_confstr':
./posixmodule.c:4471: warning: implicit declaration of function `confstr'
./signalmodule.c:88: warning: function declaration isn't a prototype
./signalmodule.c: In function `signal_signal':
./signalmodule.c:212: warning: function declaration isn't a prototype
./signalmodule.c:214: warning: function declaration isn't a prototype
./signalmodule.c:225: warning: function declaration isn't a prototype
./signalmodule.c: In function `initsignal':
./signalmodule.c:332: warning: function declaration isn't a prototype
./signalmodule.c:336: warning: function declaration isn't a prototype
./signalmodule.c:355: warning: function declaration isn't a prototype
./signalmodule.c:357: warning: function declaration isn't a prototype
./signalmodule.c: In function `finisignal':
./signalmodule.c:556: warning: function declaration isn't a prototype
./signalmodule.c:564: warning: function declaration isn't a prototype
make[1]: [add2lib] Error 2 (ignored)
./stropmodule.c: In function `strop_atoi':
./stropmodule.c:752: warning: subscript has type `char'
./timemodule.c: In function `time_strptime':
./timemodule.c:385: warning: subscript has type `char'
./socketmodule.c: In function `PySocket_socket':
./socketmodule.c:1768: warning: function declaration isn't a prototype
./socketmodule.c: In function `PySocket_fromfd':
./socketmodule.c:1806: warning: function declaration isn't a prototype

I'll look into these one at a time and see how many I can fix.

Follow-Ups:

Date: 2000-Dec-19 18:48
By: nobody

Comment:
Patch submitted for the bltinmodule.c warning.

The errors.c warnings are because isdigit() & friends expect
an int, and the code is using *f, which is a char.  isdigit() is a macro on Solaris.  Presumably the fix is to use (int)*f on those lines.   Same cause for the ones in stropmodule.c and intobject.c, I think.

The warnings in socketmodule.c, and presumably the ones
in signalmodule.c, intrcheck.c, and pythonrun.c too, seem to be because of Solaris's SIG_IGN.  I suspect GCC is getting confused by it.


-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=121479&group_id=5470