]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
lib: vsprintf: fix API build
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 3 Nov 2024 03:50:15 +0000 (04:50 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 13 Nov 2024 14:16:41 +0000 (08:16 -0600)
Avoid a build failure when building with CONFIG_API=y, CONFIG_EXAMPLES=y:

    lib/vsprintf.c:312:14: warning:
    ‘device_path_string’ defined but not used [-Wunused-function]
     312 | static char *device_path_string(char *buf, char *end, void *dp, int field_width,
         |              ^~~~~~~~~~~~~~~~~~

Fixes: 64b5ba4d293a ("efi_loader: make device path to text protocol customizable")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/vsprintf.c

index e5802866632e4d8ecd88c4c4d8da882b76b0c317..c7340a047b2e9385b9366d90e1363c99882db398 100644 (file)
@@ -308,7 +308,7 @@ static __maybe_unused char *string16(char *buf, char *end, u16 *s,
        return buf;
 }
 
-#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT)
+#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT) && !defined(API_BUILD)
 static char *device_path_string(char *buf, char *end, void *dp, int field_width,
                                int precision, int flags)
 {