src/common/quetzal.c: make fallthrough explicit
authorIvy Foster <iff@escondida.tk>
Fri, 16 Feb 2018 21:55:27 +0000 (15:55 -0600)
committerIvy Foster <iff@escondida.tk>
Fri, 16 Feb 2018 21:55:27 +0000 (15:55 -0600)
This silences compiler warnings about this deliberate decision, so in
future it will be easier to spot compiler warnings about mistakes;
also, it should now be possible to compile with -Wall -Wextra -Werror.

src/common/quetzal.c

index 3ef73e252734a61a76eb9b363953c154a346071d..c3995592bc327ba70fd309fc72d6528dbdcf315f 100644 (file)
@@ -377,6 +377,7 @@ zword restore_quetzal (FILE *svf, FILE *stf)
                    break;
            }
                /* Fall right thru (to default) if already GOT_MEMORY */
+               __attribute__((fallthrough));
            /* `UMem' uncompressed memory chunk; load it. */
            case ID_UMem:
                if (!(progress & GOT_MEMORY))   /* Don't complain if two. */
@@ -395,6 +396,7 @@ zword restore_quetzal (FILE *svf, FILE *stf)
                    /* Fall into default action (skip chunk) on errors. */
                }
                /* Fall thru (to default) if already GOT_MEMORY */
+               __attribute__((fallthrough));
            /* Unrecognised chunk type; skip it. */
            default:
                (void) fseek (svf, currlen, SEEK_CUR);  /* Skip chunk. */