Comment fallthrough case statements so compilation succeeds with GCC 7.

GCC 7 Added a warning for implicit fallthroughs in switch cases.
It's enabled by -Wextra, and treated as an error due to -Werror so
compilation fails on GCC 7 and higher.
See -Wimplicit-fallthrough in the GCC manual.
This commit is contained in:
Jack Culhane
2019-05-17 17:00:48 +01:00
parent 9b69648921
commit 1f8269c0e2
6 changed files with 21 additions and 3 deletions

View File

@@ -909,34 +909,42 @@ setconfig(int type, VALUE *vp)
case CONFIG_PROGRAM:
math_error("The program config parameter is read-only");
/*NOTREACHED*/
abort();
case CONFIG_BASENAME:
math_error("The basename config parameter is read-only");
/*NOTREACHED*/
abort();
case CONFIG_WINDOWS:
math_error("The windows config parameter is read-only");
/*NOTREACHED*/
abort();
case CONFIG_CYGWIN:
math_error("The cygwin config parameter is read-only");
/*NOTREACHED*/
abort();
case CONFIG_COMPILE_CUSTOM:
math_error("The custom config parameter is read-only");
/*NOTREACHED*/
abort();
case CONFIG_ALLOW_CUSTOM:
math_error("The allow_custom config parameter is read-only");
/*NOTREACHED*/
abort();
case CONFIG_VERSION:
math_error("The version config parameter is read-only");
/*NOTREACHED*/
abort();
case CONFIG_BASEB:
math_error("The baseb config parameter is read-only");
/*NOTREACHED*/
abort();
case CONFIG_REDECL_WARN:
if (vp->v_type == V_NUM) {
@@ -971,10 +979,12 @@ setconfig(int type, VALUE *vp)
case CONFIG_HZ:
math_error("The clock tick rate config parameter is read-only");
/*NOTREACHED*/
abort();
default:
math_error("Setting illegal config parameter");
/*NOTREACHED*/
abort();
}
}