From: Heinrich Schuchardt Date: Sat, 1 Apr 2023 06:09:34 +0000 (+0200) Subject: tools: avoid implicit fallthrough in fdt_add_pubkey X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=686e9ef60598da2e75730c0861b5b2d6ac7f2493;p=u-boot.git tools: avoid implicit fallthrough in fdt_add_pubkey When building with -Wimplicit-fallthrough we get a warning tools/fdt_add_pubkey.c:52:25: warning: this statement may fall through [-Wimplicit-fallthrough=] 52 | print_help(); | Explicitly declare which functions don't return. Fixes: 30238e99619c ("tools: add fdt_add_pubkey") Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- diff --git a/tools/fdt_add_pubkey.c b/tools/fdt_add_pubkey.c index 999f5a7e83..5582d7a8ef 100644 --- a/tools/fdt_add_pubkey.c +++ b/tools/fdt_add_pubkey.c @@ -10,7 +10,7 @@ static const char *keyname = "key"; /* -n */ static const char *require_keys; /* -r */ static const char *keydest; /* argv[n] */ -static void print_usage(const char *msg) +static void __attribute__((__noreturn__)) print_usage(const char *msg) { fprintf(stderr, "Error: %s\n", msg); fprintf(stderr, "Usage: %s [-a ] [-k ] [-n ] [-r ]" @@ -19,7 +19,7 @@ static void print_usage(const char *msg) exit(EXIT_FAILURE); } -static void print_help(void) +static void __attribute__((__noreturn__)) print_help(void) { fprintf(stderr, "Options:\n" "\t-a Cryptographic algorithm. Optional parameter, default value: sha1,rsa2048\n"