GammaRay icon indicating copy to clipboard operation
GammaRay copied to clipboard

Fix warnings

Open JohannesKauffmann opened this issue 2 years ago • 3 comments

  • Fixed warning about empty string format specifier
  • Use nullptr instead of 0

JohannesKauffmann avatar Sep 17 '22 15:09 JohannesKauffmann

i'm not so sure about using nullptr in those windows system calls my memory on this is hazy, but I'm pretty sure you don't want to those changes

winterz avatar Sep 24 '22 21:09 winterz

After all the Windows ifdefery and macro replacement is said and done by the preprocessor, the parameters types of these Windows system calls are either a pointer or not. E.g.: LPCSTR is really a const char*. So using nullptr should be fine.

If nullptr is not wanted in this case, at least those cases where the type is a pointer should be changed to NULL instead of 0, since currently, 0 is used both for pointer types (like LPCSTR) and value types (like DWORD).

JohannesKauffmann avatar Sep 24 '22 21:09 JohannesKauffmann

As long as the type is a pointer, using nullptr should be okay, iirc nullptr can implicitly convert to NULL anyways.

Waqar144 avatar Sep 26 '22 06:09 Waqar144

Resolved the conflicts caused by recent changes.

JohannesKauffmann avatar Oct 16 '22 21:10 JohannesKauffmann