-Wtype-limits warnings

Development directions, tasks, and features being actively implemented or pursued by the development team.
Post Reply
log0

-Wtype-limits warnings

Post by log0 »

I am currently trying to debug a mingw/gcc4.7 windows build running with -Wextra and noticed a bunch of unsigned comparisons which should be dealt with maybe:

Code: Select all

vegastrike\src\gfx\ani_texture.cpp|658|warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]|
vegastrike\src\gfx\nav\navscreen.cpp|543|warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]|
vegastrike\src\gfx\nav\navscreen.cpp|720|warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]|
vegastrike\src\gfx\nav\navscreen.cpp|783|warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]|
vegastrike\src\cmd\script\mission.cpp|257|warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]|
vegastrike\src\cmd\unit_functions_generic.cpp|322|warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]|
vegastrike\src\cmd\unit_util_generic.cpp|652|warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]|
vegastrike\src\networking\netserver.cpp|971|warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]|
vegastrike\src\networking\netserver.cpp|1010|warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]|
vegastrike\src\cmd\unit_generic.cpp|5878|warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]|
vegastrike\src\cmd\unit_generic.cpp|5893|warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]|
vegastrike\src\cmd\unit_generic.cpp|8461|warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]|
vegastrike\src\cmd\basecomputer.cpp|1803|warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]|
vegastrike\src\cmd\basecomputer.cpp|4705|warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]|
vegastrike\src\networking\netclient.cpp|750|warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]|
vegastrike\src\networking\netclient.cpp|795|warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]|
vegastrike\src\networking\netclient.cpp|1034|warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]|
vegastrike\src\networking\netclient.cpp|1108|warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]|
vegastrike\src\networking\netclient.cpp|1308|warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]|
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: -Wtype-limits warnings

Post by klauss »

Please report it in the bug tracker (or, since you're so active submitting patches... maybe the patch tracker?)

Otherwise we'll forget. I have access to the code here, but only half-access to building (this system doesn't like VS, it has no gtk). So I won't look into those until I get home, and they'll get lost here in the forums.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
log0

Re: -Wtype-limits warnings

Post by log0 »

Yeah, I've been kinda unsure whether this is a bug, haven't had time to look into. It might have been intended... Nah, just kidding. ;)
Post Reply