Hello,
I played a little with -std=c99, _GNU_SOURCE, and collected the cc solaris
warnings, here are my findings:
1) -Wall (allready reported ;-)
===============================
-Wall triggers (see also previous mails and Bardur response):
kdbtools.c:209: warning: dereferencing type-punned pointer will break
strict-aliasing rules
berkeleydb.c:294: warning: dereferencing type-punned pointer will break
strict-aliasing rules
There is still the issue with dlsym returned function handler (also with
solaris cc). With the cast *(void **)
kdb.c:321: warning: dereferencing type-punned pointer will break
strict-aliasing rules
Without that cast, there is no warning with Wall, but with -std=c99,
there is instead:
kdb.c:323: warning: ISO C forbids assignment between function pointer and 'void
*'
2) _GNU_SOURCE and -std=c99
===========================
With _GNU_SOURCE and -std=c99, there is additionaly (also reported by
solaris cc):
berkeleydb.c:219: warning: pointer of type 'void *' used in arithmetic
berkeleydb.c:222: warning: pointer of type 'void *' used in arithmetic
berkeleydb.c:223: warning: pointer of type 'void *' used in arithmetic
berkeleydb.c:227: warning: pointer of type 'void *' used in arithmetic
berkeleydb.c:230: warning: pointer of type 'void *' used in arithmetic
berkeleydb.c:279: warning: pointer of type 'void *' used in arithmetic
berkeleydb.c:286: warning: pointer of type 'void *' used in arithmetic
3) solaris cc
=============
solaris cc also complaints for kdb/kdb.c, for dlsym pointers:
"kdb.c", line 1387: warning: assignment type mismatch:
pointer to function(pointer to struct _KeySet {}, pointer to char)
returning int "=" pointer to void
"kdb.c", line 1388: warning: assignment type mismatch:
pointer to function(pointer to struct _KeySet {}, int) returning int
"=" pointer to void
It also triggers new warnings. The 'statement not reached'
are ignorable in my opinion. The warnings are:
"filesys.c", line 1112: warning: statement not reached
"filesys.c", line 1187: warning: statement not reached
"filesys.c", line 904: warning: statement not reached
"filesys.c", line 951: warning: statement not reached
include/kdb.h", line 180: warning: integer overflow detected: op "<<"
4) -std=c99 and no _GNU_SOURCE
==============================
There are additional warnings for mmissing function declarations, for:
memset, strlen, lstat, readlink, fdopen, symlink, fchown, fchmod, memcpy,
mkstemp, fileno, sigblock, sigsetmask, sigpause, usleep
gnulib cannot be used, since it is LGPLed. I have allready added a
replacement for getopt from openssh (openbsd-compat). There is also
mktemp, and maybe something that could be used for signals.
--
Pat
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Registry-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/registry-list