Skip to content

Commit

Permalink
tree: Add fall through annotations
Browse files Browse the repository at this point in the history
Gcc can warn on implicit fallthoughs. Mark them with a comment which is
recognized by gcc.
  • Loading branch information
donald committed Jul 8, 2022
1 parent eafa604 commit 9683840
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/bee_version_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ void print_format(char* s, struct beeversion *v, char *filter_pkgfullname)
p++;
continue;
}
// fall through
default:
printf("%%%c", *p);
break;
Expand Down
1 change: 1 addition & 0 deletions src/beegetopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ int main(int argc, char *argv[])
switch(opt) {
case 'V':
printf("beegetopt Vx.x\n");
// fall through
case 'h':
usage();
exit(0);
Expand Down

0 comments on commit 9683840

Please sign in to comment.