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 fallthroughs. Mark them with a comment which is
recognized by gcc.
donald committed Jul 8, 2022
1 parent d1524e3 commit 5026231
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
@@ -156,6 +156,7 @@ void print_format(char* s, struct beeversion *v, char *filter_pkgfullname)
p++;
continue;
}
// fall through
default:
printf("%%%c", *p);
break;
1 change: 1 addition & 0 deletions src/beegetopt.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 5026231

Please sign in to comment.