Is the MapServer code supposed to be ANSI C?

Petter Reinholdtsen pere at HUNGRY.COM
Sat Feb 12 12:52:06 EST 2005


[Petter Reinholdtsen]
> Here is a start, getting rid of '//' comments in the header files,
> and also adding info about which #ifdef an #endif matches.

I completed this work, making a patch converting all the source to use
C89-style comments.  It is available from
<URL:http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1238>.

With this patch, only 45 warnings are reported when compiling using
-pedantic:

This is not too bad, I believe.  the C99 hex constants is a bug in the
glibc header files.  The others should be fixable in the mapserver
source.

maputil.c:1027: warning: `return' with a value, in function returning void
mapproject.c:93:32: warning: use of C99 hexadecimal floating constant
mapproject.c:93:56: warning: use of C99 hexadecimal floating constant
mappostgis.c:275: warning: string length `811' is greater than the length `509' ISO C89 compilers are required to support
mapresample.c:562:21: warning: use of C99 hexadecimal floating constant
mapresample.c:562:41: warning: use of C99 hexadecimal floating constant
mapresample.c:850:25: warning: use of C99 hexadecimal floating constant
mapresample.c:850:45: warning: use of C99 hexadecimal floating constant
mapresample.c:866:25: warning: use of C99 hexadecimal floating constant
mapresample.c:866:45: warning: use of C99 hexadecimal floating constant
mapresample.c:884:21: warning: use of C99 hexadecimal floating constant
mapresample.c:884:41: warning: use of C99 hexadecimal floating constant
mapwms.c:2883: warning: string length `974' is greater than the length `509' ISO C89 compilers are required to support
mapwms.c:2866: warning: string length `973' is greater than the length `509' ISO C89 compilers are required to support
mapgd.c:2757: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2758: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2759: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2760: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2761: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2762: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2763: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2764: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2768: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2770: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2780: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2781: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2782: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2783: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2784: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2785: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2786: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2787: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2791: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapgd.c:2793: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness
mapswf.c:0: warning: ISO C forbids an empty source file
mapwfslayer.c:355: warning: ISO C90 does not support the `%lf' printf format
mapwfslayer.c:355: warning: ISO C90 does not support the `%lf' printf format
mapwfslayer.c:355: warning: ISO C90 does not support the `%lf' printf format
mapwfslayer.c:355: warning: ISO C90 does not support the `%lf' printf format
mappdf.c:0: warning: ISO C forbids an empty source file
mapgraticule.c:70: warning: comma at end of enumerator list
maptime.c:157: warning: implicit declaration of function `strptime'
maptime.c:157: warning: return makes pointer from integer without a cast
mapsvg.c:0: warning: ISO C forbids an empty source file
epplib.c:228: warning: pointer targets in passing arg 1 of `swap2' differ in signedness



More information about the mapserver-dev mailing list