"fall-through" errors
Bruce Korb
bruce.korb@gmail.com
Sat Jul 28 17:44:00 GMT 2018
../../autoopts/makeshell.c: In function ‘text_to_var’:
../../autoopts/makeshell.c:324:14: error: this statement may fall
through [-Werror=implicit-fallthrough=]
(*(opts->pUsageProc))(opts, EXIT_SUCCESS);
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This warning goes away if the comment "/* FALLTHROUGH */ is present.
You are missing a condition:
switch (which) {
case TT_LONGUSAGE:
(*(opts->pUsageProc))(opts, EXIT_SUCCESS);
/* NOTREACHED */
Please add the exception for a "/* NOTREACHED */" comment. Thank you.
More information about the Gcc
mailing list