From 004444486184a7222a7b4bde0c568f6da3621b25 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Wed, 17 May 2023 15:19:31 +0200 Subject: decompressor: provide missing prototypes The entry points for the decompressor don't always have a prototype included in the .c file: lib/decompress_inflate.c:42:17: error: no previous prototype for '__gunzip' [-Werror=missing-prototypes] lib/decompress_unxz.c:251:17: error: no previous prototype for 'unxz' [-Werror=missing-prototypes] lib/decompress_unzstd.c:331:17: error: no previous prototype for 'unzstd' [-Werror=missing-prototypes] Include the correct headers for unxz and unzstd, and mark the inflate function above as unconditionally 'static' to avoid these warnings. Link: https://lkml.kernel.org/r/20230517131936.936840-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Nick Terrell Signed-off-by: Andrew Morton --- lib/decompress_unzstd.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/decompress_unzstd.c') diff --git a/lib/decompress_unzstd.c b/lib/decompress_unzstd.c index a512b99ae16a..bba2c0bb10cb 100644 --- a/lib/decompress_unzstd.c +++ b/lib/decompress_unzstd.c @@ -69,6 +69,8 @@ # define UNZSTD_PREBOOT # include "xxhash.c" # include "zstd/decompress_sources.h" +#else +#include #endif #include -- cgit v1.2.3