noah- / d2bs

D2BS: Diablo 2 Botting System, a JS API to perform human-like actions utilizing Mozilla Spidermonkey
104 stars 66 forks source link

warning suppression #12

Closed Ownasaurus closed 5 years ago

Ownasaurus commented 5 years ago

Suppressed over 800 warnings with the following 5 changes:

  1. Disabled warning 4127 (constant controlling expression in an if statement or while loop) in some files
  2. Disabled warning 4800 (forcing int to be bool) in some files
  3. Surrounded #define XP_WIN with a #ifndef to suppress re-definition warning
  4. Surrounded #define WIN32_LEAN_AND_MEAN with a #ifndef to suppress re-definition warning
  5. Fixing JS_AddRoot(cx, vp) macro. It was passing 3 parameters to another macro that takes two parameters. Since the 3rd parameter was being ignored anyhow, I removed it.

Only change (5) might seem non-trivial. However, since the extra parameter was being ignored anyhow, removing it should have no side-effects.

Ownasaurus commented 5 years ago

Updated to suppress the following warnings by project settings rather than individual file #pragmas: 4127 4800 4480 4702 4512 4530 4238 4740

^^ These all seem to be things we would not care about from the old spidermonkey code.

There are still probably about 100 warnings remaining, but I think those we will want to actually fix.

Ownasaurus commented 5 years ago

Updated to suppress the following warnings by project settings rather than individual file #pragmas: 4127 4800 4480 4740