libiberty: Fix -Wimplicit-fallthrough warnings.

Adjust some comments, add some explicit fall through comments or explicit
returns where necessary to not get implicit-fallthrough warnings.

All fall throughs were deliberate. In one case I added an explicit return
false for clarity instead of falling through a default case (that also
would return false).

libiberty/ChangeLog:

       * cplus-dem.c (demangle_signature): Move fall through comment.
       (demangle_fund_type): Add fall through comment between 'G' and 'I'.
       * hashtab.c (iterative_hash): Add fall through comments.
       * regex.c (regex_compile): Add Fall through comment after '+'/'?'.
       (byte_re_match_2_internal): Add Fall through comment after jump_n.
       Change "Note fall through" to "Fall through".
       (common_op_match_null_string_p): Return false after set_number_at
       instead of fall through.
This commit is contained in:
Mark Wielaard
2016-11-04 23:55:01 +00:00
committed by Mark Wielaard
parent ef0f5d7cc3
commit 4d17eaece8
4 changed files with 29 additions and 15 deletions

View File

@@ -1657,9 +1657,7 @@ demangle_signature (struct work_stuff *work,
(*mangled)++;
break;
}
else
/* fall through */
{;}
/* fall through */
default:
if (AUTO_DEMANGLING || GNU_DEMANGLING)
@@ -4024,6 +4022,7 @@ demangle_fund_type (struct work_stuff *work,
success = 0;
break;
}
/* fall through */
case 'I':
(*mangled)++;
if (**mangled == '_')