ko icon indicating copy to clipboard operation
ko copied to clipboard

Cleanup compile warnings

Open stevewgr opened this issue 3 years ago • 0 comments

Description

Updating compiler means more things are being properly detected as either bad practice or wrong usage.

We enable warning level 3 and with the current codebase the amount of warnings we get is super spammy that one might miss the actual important warnings. Therefore some specific spammy warnings were muted as can be seen in the following snippet: https://github.com/stevewgr/ko/blob/7c09c9ce8a5042bbeceb4af9a6987279365a2542/src/game/KnightOnLine.vcxproj#L64

To Reproduce

Remove the warnings one by one and start compiling. You'll see lot of warnings showing up.

Tasks

This will change things quite a bit in code, therefore let's separate each removal of muted warnings into separate tasks / PRs:

  • [ ] /wd4018
  • [ ] /wd4091
  • [ ] /wd4244
  • [ ] /wd4267
  • [ ] /wd4477
  • [ ] /wd4838
  • [ ] /wd6031
  • [ ] /wd2649

Do note that this was done for all projects. In order to really address all usages, make sure to remove from each project. This can be done with a simple find and replace regex pattern.

stevewgr avatar Jul 24 '22 21:07 stevewgr