From 12aa108ec73904e4044b4794d30301724d9a86fc Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 8 Jul 2022 08:01:39 +0200 Subject: [PATCH] tree: Add fall through annotations Gcc can warn on implicit fallthoughs. Mark them with a comment which is recognized by gcc. --- src/bee_version_output.c | 1 + src/beegetopt.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/bee_version_output.c b/src/bee_version_output.c index aa67df5..26443ac 100644 --- a/src/bee_version_output.c +++ b/src/bee_version_output.c @@ -156,6 +156,7 @@ void print_format(char* s, struct beeversion *v, char *filter_pkgfullname) p++; continue; } + // fall through default: printf("%%%c", *p); break; diff --git a/src/beegetopt.c b/src/beegetopt.c index c82acf1..8889b81 100644 --- a/src/beegetopt.c +++ b/src/beegetopt.c @@ -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);