[babl] -Wimplicit-fallthrough add commit according to gcc doc.



commit 41cf7ffa018f53becd554c1561432157dad1acc4
Author: Axel Viala <axel viala darnuria eu>
Date:   Fri Mar 25 16:51:22 2022 +0100

    -Wimplicit-fallthrough add commit according to gcc doc.

 babl/babl-extension.c | 4 ++--
 babl/babl-icc.c       | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/babl/babl-extension.c b/babl/babl-extension.c
index 3063d46c7..d6d1a39ee 100644
--- a/babl/babl-extension.c
+++ b/babl/babl-extension.c
@@ -340,8 +340,8 @@ babl_extension_load_dir_list (const char *dir_list,
         {
           case '\0':
             eos = 1;
-            /* don't break here, the path needs to be processed */
-
+            // the path needs to be processed.
+            // fall through
           case BABL_PATH_SEPARATOR:
           {
             char *expanded_path = expand_path (path);
diff --git a/babl/babl-icc.c b/babl/babl-icc.c
index af6dbdd18..fa461cd11 100644
--- a/babl/babl-icc.c
+++ b/babl/babl-icc.c
@@ -555,6 +555,7 @@ switch (trc->type)
       break;
     }
   case BABL_TRC_FORMULA_SRGB:
+  // fall through
   case BABL_TRC_FORMULA_CIE:
     {
       int lut_size = 512;
@@ -1504,8 +1505,11 @@ ConvertUTF16toUTF8 (const UTF16   **sourceStart,
        }
        switch (bytesToWrite) { /* note: everything falls through. */
            case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
+           // fall through
            case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
+           // fall through
            case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
+           // fall through
            case 1: *--target =  (UTF8)(ch | firstByteMark[bytesToWrite]);
        }
        target += bytesToWrite;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]