From nobody Sat Feb 7 15:10:36 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEAF9C7EE2D for ; Wed, 17 May 2023 13:20:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231818AbjEQNUF (ORCPT ); Wed, 17 May 2023 09:20:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231487AbjEQNTn (ORCPT ); Wed, 17 May 2023 09:19:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04108173F for ; Wed, 17 May 2023 06:19:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9423363BDA for ; Wed, 17 May 2023 13:19:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF762C433EF; Wed, 17 May 2023 13:19:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329582; bh=aywvvDRPNw0N00F0h3QEaRNcGvMODB+TxD21Tej3Lsk=; h=From:To:Cc:Subject:Date:From; b=ZvaPaFRkLsehNX2loEbOvDVae+1gWgD0Ic2WOkv7wxF1IPFtcmlrUL0im6guBRNxR +nkj2hepVCk7Vijdc0PYTMFjBI+/tbCyFFYyC2z7ntZ7SOh+IzX1gCsAo0UoETwQcx t/XuI179xCx4vHxkPY0hEAokDqksHrgjMzNL6808mhV9F2tTenRXJY8hEVs8gd8duu 8/nSBouTPWLGEiHh01kNSsfMuFcd8gk+5ggFpmqrPp8YhxDQw5m5c2WM7jbYkDPAX+ 85t3QZEdPuLNBImnMpJqCD2JAeERkLfZmmPIqQQWjLanTAnT6T9iQuJop1StyB9F6Z sZe4Ql1zzScbQ== From: Arnd Bergmann To: Andrew Morton , Nick Terrell Cc: linux-mm@kvack.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] decompressor: provide missing prototypes Date: Wed, 17 May 2023 15:19:31 +0200 Message-Id: <20230517131936.936840-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann 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=3Dmissing-prototypes] lib/decompress_unxz.c:251:17: error: no previous prototype for 'unxz' [-Wer= ror=3Dmissing-prototypes] lib/decompress_unzstd.c:331:17: error: no previous prototype for 'unzstd' [= -Werror=3Dmissing-prototypes] include the correct headers for unxz and unzstd, and mark the inflate function above as unconditionally 'static' to avoid these warnings. Signed-off-by: Arnd Bergmann --- lib/decompress_inflate.c | 2 +- lib/decompress_unxz.c | 2 ++ lib/decompress_unzstd.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c index 6130c42b8e59..e19199f4a684 100644 --- a/lib/decompress_inflate.c +++ b/lib/decompress_inflate.c @@ -39,7 +39,7 @@ static long INIT nofill(void *buffer, unsigned long len) } =20 /* Included from initramfs et al code */ -STATIC int INIT __gunzip(unsigned char *buf, long len, +static int INIT __gunzip(unsigned char *buf, long len, long (*fill)(void*, unsigned long), long (*flush)(void*, unsigned long), unsigned char *out_buf, long out_len, diff --git a/lib/decompress_unxz.c b/lib/decompress_unxz.c index 9f4262ee33a5..353268b9f129 100644 --- a/lib/decompress_unxz.c +++ b/lib/decompress_unxz.c @@ -102,6 +102,8 @@ */ #ifdef STATIC # define XZ_PREBOOT +#else +#include #endif #ifdef __KERNEL__ # include 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 =20 #include --=20 2.39.2