Opened 9 years ago
Closed 9 years ago
#3250 closed defect (wontfix)
cu_algorithm warnings
Reported by: | robe | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.2.0 |
Component: | postgis | Version: | 2.1.x |
Keywords: | Cc: |
Description
x86_64-w64-mingw32-gcc -g -O2 -Wall -Wmissing-prototypes -I/projects/geos/rel-3.5.0w64gcc48/include -I/projects/proj/rel-4.9.1w64gcc48/include -I/projects/postgresql/rel/pg9.3w64gcc48/include -I/projects/rel-libiconv-1.13.1w64gcc48/include -I.. -I/projects/CGAL/rel-sfcgal-1.1.0w64gcc48/include -DHAVE_SFCGAL -c -o cu_algorithm.o cu_algorithm.c cu_algorithm.c: In function 'test_geohash_point_as_int': cu_algorithm.c:893:2: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] rs = 3440103613; ^ cu_algorithm.c:897:2: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] rs = 3982480893; ^ cu_algorithm.c:901:2: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] rs = 4166944232; ^
Change History (5)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Still seeing it on winnie's builds: http://winnie.postgis.net:1500/job/PostGIS_EDB_Regress_winnie/526/consoleFull
this run was from r14089
make[2]: Entering directory `/projects/postgis/branches/2.2/liblwgeom/cunit' x86_64-w64-mingw32-gcc -g -O2 -Wall -Wmissing-prototypes -I/projects/geos/rel-3.5.0w64gcc48/include -I/projects/proj/rel-4.9.1w64gcc48/include -I/projects/postgresql/rel/pg9.3w64gcc48/include -I/projects/rel-libiconv-1.13.1w64gcc48/include -I.. -I/projects/CGAL/rel-sfcgal-1.1.0w64gcc48/include -DHAVE_SFCGAL -c -o cu_algorithm.o cu_algorithm.c cu_algorithm.c: In function 'test_geohash_point_as_int': cu_algorithm.c:893:2: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] rs = 3440103613; ^ cu_algorithm.c:897:2: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] rs = 3982480893; ^ cu_algorithm.c:901:2: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] rs = 4166944232; ^
comment:4 by , 9 years ago
http://stackoverflow.com/questions/9941261/warning-this-decimal-constant-is-unsigned-only-in-iso-c90 (reading) Hmm could it be that your default and debian's is like C99? I suspect that maybe mingw64 warns about lower since it has to use Windows C runtimes which are questionably at god knows which version of C standard. I think the newer are at lest C90 or C99 or so but older like windows xp are at C89. So might be a similar kind of -- this may not work when you run it kind of messages like the PRIblahblahblah thing I told strk to close.
I'm not sure if I really need to worry about windows xp or windows 2000 users since, well technically Microsoft doesn't support them and this is just showing a warning in cunit tests and no where else in code.
Feel free to dismiss this as a won't fix if you want.
I get similar warning in cu_varint
cu_varint.c:155:2: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] do_test_s32_varint(-2147483648, 5, "FFFFFFFF0F");
comment:5 by , 9 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
It's a won't fix. I don't know how to address it without brutalizing the underlying code. (They are legitimate unsigned ints, they fit into a 32-bit address register even, don't require 64-bit values..., I'm pretty sure they were originally declared as unsigned int, but got changed to unsigned long long to try and address just this problem. (You could confirm by changing them back to unsigned int to see)
I don't see these. The only warnings I see in cunit are of the form