unioslo / tsdfx

File transfer utility
Other
4 stars 3 forks source link

Enable additional warnings #84

Closed dag-erling closed 8 years ago

dag-erling commented 8 years ago

This patch enables -Wcast-qual and -Wshadow and fixes the fallout. The latter option would have caught #69.

petterreinholdtsen commented 8 years ago

It is unclear to me how the variable renames could fix warnings triggered by those two warning flags, but the changes look good.

dag-erling commented 8 years ago

The global variables that were renamed (to match the naming scheme used in the rest of the code) were shadowed by local variables and / or function arguments in e.g. map_read() (which should probably also be renamed, for consistency, but it's not a big deal since it's static).