1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Fix many GCC -Wimplicit-fallthrough warnings (#243)

This commit adds '/* FALLTHROUGH */' comments to fix many
GCC warnings when compiling with -Wimplicit-fallthrough.
Additionally, the existing fallthrough comments have been
changed for consistency.
This commit is contained in:
Johnothan King 2021-03-30 13:49:20 -07:00 committed by GitHub
parent f30da49564
commit ed478ab7e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 271 additions and 158 deletions

View file

@ -250,6 +250,7 @@ int hist_expand(const char *ln, char **xp)
if(!isdigit(*(cp+1)))
goto string_event;
cp++;
/* FALLTHROUGH */
case '0': /* reference by number */
case '1':
case '2':
@ -273,6 +274,7 @@ int hist_expand(const char *ln, char **xp)
case '?':
cp++;
flag |= HIST_QUESTION;
/* FALLTHROUGH */
string_event:
default:
/* read until end of string or word designator/modifier */
@ -376,6 +378,7 @@ getline:
sfseek(wm, 0, SEEK_SET);
goto skip;
}
/* FALLTHROUGH */
default:
skip2:
cp--;