]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Curl_verify_windows_version: minor edit to avoid compiler warnings
authorDaniel Stenberg <daniel@haxx.se>
Sat, 27 Aug 2016 16:08:16 +0000 (18:08 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 27 Aug 2016 16:08:16 +0000 (18:08 +0200)
... instead of if() before the switch(), add a default to the switch so
that the compilers don't warn on "warning: enumeration value
'PLATFORM_DONT_CARE' not handled in switch" anymore.

lib/system_win32.c

index d6a998b275c685df9b0b68eab47150347ffd190a..effc3f2bc64dac66cb5b6377f02cc12fab4aa6e3 100644 (file)
@@ -128,7 +128,7 @@ bool Curl_verify_windows_version(const unsigned int majorVersion,
     }
 
     /* Verify the platform identifier (if necessary) */
-    if(matched && platform != PLATFORM_DONT_CARE) {
+    if(matched) {
       switch(platform) {
       case PLATFORM_WINDOWS:
         if(osver.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS)
@@ -138,6 +138,9 @@ bool Curl_verify_windows_version(const unsigned int majorVersion,
       case PLATFORM_WINNT:
         if(osver.dwPlatformId != VER_PLATFORM_WIN32_NT)
           matched = FALSE;
+
+      default: /* like platform == PLATFORM_DONT_CARE */
+        break;
       }
     }
   }