From: Ivan Maidanski Date: Thu, 17 Nov 2016 07:06:22 +0000 (+0300) Subject: Workaround 'WinMain() is never used' cppcheck false warning X-Git-Tag: v8.0.0~1030 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6a22f11c93f208027e7c3a938295ed91a35dbf53;p=gc Workaround 'WinMain() is never used' cppcheck false warning * tests/test_cpp.cc [!NO_WINMAIN_ENTRY] (WinMain): Call GC_noop1(&WinMain) if CPPCHECK. --- diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index a8df17f6..1a6c5b64 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -214,6 +214,9 @@ void* Undisguise( GC_word i ) { int argc = 0; char* argv[ 3 ]; +# if defined(CPPCHECK) + GC_noop1((GC_word)&WinMain); +# endif if (cmd != 0) for (argc = 1; argc < (int)(sizeof(argv) / sizeof(argv[0])); argc++) { argv[ argc ] = strtok( argc == 1 ? cmd : 0, " \t" );