gtk-demo/main: Suppress implicit fallthru warning

Comments matched to reassure the compiler that fallthrough is
intentional are supposed to precede the case or default keywords, at
least in GCC, so the one here did not suppress the warning with GCC. We
can just the if condition and put the comment at the end to solve that.

https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/
This commit is contained in:
Daniel Boles 2018-10-12 22:09:42 +01:00
parent 247b38eb42
commit d9f08c85f4

View File

@ -762,14 +762,13 @@ load_file (const gchar *demoname,
/* Skipping blank lines */
while (g_ascii_isspace (*p))
p++;
if (*p)
{
if (!*p)
break;
p = lines[i];
state++;
/* Fall through */
}
else
break;
case 3:
/* Reading program body */