From: guido@trentalancia.com (Guido Trentalancia) Date: Mon, 05 Jun 2017 17:22:54 +0200 Subject: [refpolicy] [PATCH v2] fc_sort: avoid compiler warning/error In-Reply-To: References: <1496674594.4528.3.camel@trentalancia.com> <1496675093.4528.4.camel@trentalancia.com> Message-ID: <01079B53-E702-4388-8F20-4DC7A0F3BCA3@trentalancia.com> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com Hello, thanks for telling me about this option, but I prefer to leave things as they are, without being too much specific to the particular compiler. Regards, Guido On the 5th of June 2017 16:20:15 CEST, "Christian G?ttsche" wrote: >Or maybe just add a comment /*FALLTHRU*/ ? >This should silence the warning. > >https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/ > >On 5 Jun 2017 3:04 pm, "Guido Trentalancia via refpolicy" < >refpolicy at oss.tresys.com> wrote: > >> Fix a "-Werror=implicit-fallthrough" compiler warning/error on >> the switch statement. >> >> This second version (v2) fixes a bug introduced with the previous >> version. >> >> Signed-off-by: Guido Trentalancia >> --- >> support/fc_sort.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> --- a/support/fc_sort.c 2017-03-29 17:57:54.576386420 +0200 >> +++ b/support/fc_sort.c 2017-06-05 17:01:44.818724998 +0200 >> @@ -292,6 +292,11 @@ void fc_fill_data(file_context_node_t *f >> /* If a escape character is found, >> * skip the next character. */ >> c++; >> + /* If no meta character has been found yet, >> + * add one to the stem length. */ >> + if (!fc_node->meta) >> + fc_node->stem_len++; >> + break; >> default: >> /* If no meta character has been found yet, >> * add one to the stem length. */ >> _______________________________________________ >> refpolicy mailing list >> refpolicy at oss.tresys.com >> http://oss.tresys.com/mailman/listinfo/refpolicy >>