diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/printf.c | 1 | ||||
-rw-r--r-- | lib/libc/snprintf.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/libc/printf.c b/lib/libc/printf.c index 4480e94db..d50876d75 100644 --- a/lib/libc/printf.c +++ b/lib/libc/printf.c @@ -166,6 +166,7 @@ loop: padn = (padn * 10) + (ch - '0'); fmt++; } + assert(0); /* Unreachable */ default: /* Exit on any other format specifier */ return -1; diff --git a/lib/libc/snprintf.c b/lib/libc/snprintf.c index 9bc07b2cb..66a2fa2f5 100644 --- a/lib/libc/snprintf.c +++ b/lib/libc/snprintf.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include <assert.h> #include <debug.h> #include <platform.h> #include <stdarg.h> @@ -117,6 +118,7 @@ int snprintf(char *s, size_t n, const char *fmt, ...) ERROR("snprintf: specifier with ASCII code '%d' not supported.", *fmt); plat_panic_handler(); + assert(0); /* Unreachable */ } fmt++; continue; |