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

@ -115,7 +115,7 @@ gobble(Match_t* mp, register char* s, register int sub, int* g, int clear)
case '\\':
if (mbgetchar(s))
break;
/*FALLTHROUGH*/
/* FALLTHROUGH */
case 0:
return 0;
case '[':
@ -295,7 +295,7 @@ onematch(Match_t* mp, int g, char* s, char* p, char* e, char* r, int flags)
if (n <= g && mp->current.beg[n])
pc = *mp->current.beg[n];
}
/*FALLTHROUGH*/
/* FALLTHROUGH */
default:
if (icase && isupper(pc))
pc = tolower(pc);
@ -321,7 +321,7 @@ onematch(Match_t* mp, int g, char* s, char* p, char* e, char* r, int flags)
case 0:
if (!(flags & STR_MAXIMAL))
sc = 0;
/*FALLTHROUGH*/
/* FALLTHROUGH */
case '|':
case '&':
case ')':
@ -502,7 +502,7 @@ onematch(Match_t* mp, int g, char* s, char* p, char* e, char* r, int flags)
break;
}
}
/*FALLTHROUGH*/
/* FALLTHROUGH */
default:
if (icase && isupper(pc))
pc = tolower(pc);