mirror of https://github.com/mpv-player/mpv
build: add -Wimplicit-fallthrough
This warning seems to be designed well. It doesn't seem to warn on fallthrough-only case statements, so it's compatible to well written code. stream_dvdnav.c had an obscure bug in inactive code, fix it. stream_dvb.c is the only place where it intentionally falls through, I guess I'll just leave it alone.
This commit is contained in:
parent
c68251a3a7
commit
c84460f61f
|
@ -475,6 +475,7 @@ static int control(stream_t *stream, int cmd, void *arg)
|
||||||
break;
|
break;
|
||||||
if (dvdnav_angle_change(dvdnav, new_angle) != DVDNAV_STATUS_OK)
|
if (dvdnav_angle_change(dvdnav, new_angle) != DVDNAV_STATUS_OK)
|
||||||
return 1;
|
return 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case STREAM_CTRL_GET_LANG: {
|
case STREAM_CTRL_GET_LANG: {
|
||||||
struct stream_lang_req *req = arg;
|
struct stream_lang_req *req = arg;
|
||||||
|
|
|
@ -41,7 +41,9 @@ def __add_generic_flags__(ctx):
|
||||||
"-Werror=format-security",
|
"-Werror=format-security",
|
||||||
"-Wno-redundant-decls",
|
"-Wno-redundant-decls",
|
||||||
"-Wvla",
|
"-Wvla",
|
||||||
"-Wno-format-truncation"])
|
"-Wno-format-truncation",
|
||||||
|
"-Wimplicit-fallthrough",
|
||||||
|
])
|
||||||
|
|
||||||
def __add_gcc_flags__(ctx):
|
def __add_gcc_flags__(ctx):
|
||||||
ctx.env.CFLAGS += ["-Wall", "-Wundef", "-Wmissing-prototypes", "-Wshadow",
|
ctx.env.CFLAGS += ["-Wall", "-Wundef", "-Wmissing-prototypes", "-Wshadow",
|
||||||
|
|
Loading…
Reference in New Issue