]> granicus.if.org Git - gc/commitdiff
Workaround 'WinMain() is never used' cppcheck false warning
authorIvan Maidanski <ivmai@mail.ru>
Thu, 17 Nov 2016 07:06:22 +0000 (10:06 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 27 Nov 2016 06:47:52 +0000 (09:47 +0300)
* tests/test_cpp.cc [!NO_WINMAIN_ENTRY] (WinMain): Call
GC_noop1(&WinMain) if CPPCHECK.

tests/test_cpp.cc

index 0b1bbb7ec00e1efa42804a73273d52d69db13540..823f818e8f0a1763ece1103543830c22d93b2624 100644 (file)
@@ -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" );