summaryrefslogtreecommitdiff
path: root/lib/vsprintf.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2024-11-03 04:50:15 +0100
committerTom Rini <trini@konsulko.com>2024-11-13 08:16:41 -0600
commit1cfafff3192a81055fd7e833313a85d5feede1e3 (patch)
tree54ffb88b1e126d1a33d476f61095044f13ff7cac /lib/vsprintf.c
parent9d49c73862c4c492b81b8cdd941fc4d602774673 (diff)
lib: vsprintf: fix API build
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>
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r--lib/vsprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index e5802866632..c7340a047b2 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -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)
{