aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-04-01 08:09:34 +0200
committerTom Rini <trini@konsulko.com>2023-04-06 19:10:08 -0400
commit686e9ef60598da2e75730c0861b5b2d6ac7f2493 (patch)
treeaef0b17d3848465572415f9438801c6da7f83792 /tools
parentaeb40f1166e072856f865d26d42a4bea1ec3a514 (diff)
downloadu-boot-686e9ef60598da2e75730c0861b5b2d6ac7f2493.zip
u-boot-686e9ef60598da2e75730c0861b5b2d6ac7f2493.tar.gz
u-boot-686e9ef60598da2e75730c0861b5b2d6ac7f2493.tar.bz2
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 <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/fdt_add_pubkey.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/fdt_add_pubkey.c b/tools/fdt_add_pubkey.c
index 999f5a7..5582d7a 100644
--- a/tools/fdt_add_pubkey.c
+++ b/tools/fdt_add_pubkey.c
@@ -10,7 +10,7 @@ static const char *keyname = "key"; /* -n <keyname> */
static const char *require_keys; /* -r <conf|image> */
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 <algo>] [-k <keydir>] [-n <keyname>] [-r <conf|image>]"
@@ -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 <algo> Cryptographic algorithm. Optional parameter, default value: sha1,rsa2048\n"