TheDarklingWolf/Cataclysm-DDA — pull request #126 by AkrionXxarr (2013-02-28 22:17:46+00:00)
Title: Compiler warning resolutions

Compiler warnings (-Wall -Wextra) have been trimmed to roughly 400 warnings (There was around 20,000 when I started). Most trivial warnings should be dealt with. While I tried to ensure there would be no negative effect on code fixed, with the sheer number of warnings I had to deal with it was difficult to keep track.

Here are the notes I took whilst making the changes, as they could be useful:
Change note -
field.cpp:758
Conditional bracket ordering could be wrong.

Bug -
Game.cpp:819
The conditional (temperature < 140) will always result as true since temperature is a signed char.

Resolved Bug -
monmove.cpp:364
The variable maxsmell was being redefined within the scope of the if statement, making it useless.

Resolved Bug -
overmap.cpp:910, 929, 943
if (note_here = has_note(omx, omy))
if ((note_here = diag.has_note(omx, omy)))
if (note_here = diag.has_note(omx, omy))
Are not conditionals.

Change note -
player.cpp:3676
Conditional bracket ordering could be wrong.

Note -
player.cpp:4616, 4637
Unsure of how this should be bracketed.

Resolved bug -
rng.cpp:36
while (c = *str++)
Is not a conditional

Note -
vehicle.cpp:1686
Unsure of how this should be bracketed.