Disabled -Wimplicit-fallthrough for instances where its use is intended.
authorArmin Novak <armin.novak@thincast.com>
Wed, 20 Feb 2019 12:53:25 +0000 (13:53 +0100)
committerArmin Novak <armin.novak@thincast.com>
Fri, 5 Apr 2019 07:14:35 +0000 (09:14 +0200)
winpr/libwinpr/crt/utf.c
winpr/libwinpr/utils/trio/trio.c

index 65e2738..9d5dd75 100644 (file)
@@ -41,6 +41,8 @@
 #include "utf.h"
 #include <winpr/endian.h>
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
 static const int halfShift  = 10; /* used for shifting by 10 bits */
 
 static const DWORD halfBase = 0x0010000UL;
@@ -860,3 +862,4 @@ ConversionResult ConvertUTF8toUTF32(
     similarly unrolled loops.
 
    --------------------------------------------------------------------- */
+#pragma GCC diagnostic pop
index b1d56e4..b3da6e2 100644 (file)
@@ -1417,6 +1417,8 @@ TRIO_ARGS4((type, format, offset, parameter),
     {
       ch = format[offset++];
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
       switch (ch)
         {
        case QUALIFIER_SPACE:
@@ -1680,6 +1682,8 @@ TRIO_ARGS4((type, format, offset, parameter),
          /* Bail out completely to make the error more obvious */
          return TRIO_ERROR_RETURN(TRIO_EINVAL, offset);
        }
+#pragma GCC diagnostic pop
+
     } /* while qualifier */
 
   parameter->endOffset = offset;
@@ -1703,6 +1707,8 @@ TRIO_ARGS4((type, format, offset, parameter),
 {
   parameter->baseSpecifier = NO_BASE;
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
   switch (format[offset++])
     {
 #if defined(SPECIFIER_CHAR_UPPER)
@@ -1929,6 +1935,7 @@ TRIO_ARGS4((type, format, offset, parameter),
       /* Bail out completely to make the error more obvious */
       return TRIO_ERROR_RETURN(TRIO_EINVAL, offset);
   }
+#pragma GCC diagnostic pop
 
   parameter->endOffset = offset;