Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7370251imu; Wed, 14 Nov 2018 16:28:19 -0800 (PST) X-Google-Smtp-Source: AJdET5daDaa2IjL8U8p88kB9LnB9mkztgMJjPH2A2D+L9SR4TIw1A5tTTWGPfVa8oV88w78HInJu X-Received: by 2002:a63:8f45:: with SMTP id r5mr3755545pgn.222.1542241699863; Wed, 14 Nov 2018 16:28:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542241699; cv=none; d=google.com; s=arc-20160816; b=cQhKyBhlCfcWmBhMvjeU9dHizujuX2/u9LkPJcXHAJwNQonptGlTk0qvQbZts2vodq 0c+97+QNx1D5saa1OpuFVCliShKnElcZDA4jyuGDy9Yq3MRmb+sPzdb1VojXUlwYfagN G7NYEiG42qhFi/Yqzwc/ECiQWKy0KYnjiDRXIjI2KbPtSxCDB+nEgkNSpY+YkY25r04i MHuBG3f7PntCYHNpiIolI9sNnaDcMxEQjaPxbKdU1EPWkCWegEfUIzkHDztqaKN4yED5 i8Nvteu8/TzpUQBBlSoLEL8j8pHJeuGM4mgsmyo3Tl7HOkOo2pGUZ6lUZzdFp2cphu+O hX+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yALvhPzxzvWc1tryg/p0QMuut6ADbaoj0qvTouUF3Ts=; b=tc/U9CgvtSaHTWm7TGhhzD/cQgiG2ebG6XqG5unmgL/hwk8AGFu2dDB1Li81l+6EKE XIRFZ1w7c+sxCEs1tSOdtED3S1RM1z95s5oyK+2rpNykjcpGX8WCYPwsYTpIyo9mdiBS 3iHmP0zyM7J82ZABORWDKSaud/m1xF0UGvjKntjfRoSQOcyZ78xtzgKAqDzJn7e8Rekq P1wWrFsg3dOTsUgKGYpNT7E0iQN9Sz4nIsN1tCkxbRDO57ass4m4QcLYKIZvgde3Y3o+ Pgk75pTdX9SPcSsa9SHtQO9Wm7ZBcENghRmpxz9K/sZmIeS2uqXK4U/bckLnqcOTCInF AAsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@net.com.org.es header.s=delany-v1 header.b=N7yBokEG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=net.com.org.es Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t5si19261766pgc.369.2018.11.14.16.28.02; Wed, 14 Nov 2018 16:28:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@net.com.org.es header.s=delany-v1 header.b=N7yBokEG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=net.com.org.es Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726872AbeKOKc4 (ORCPT + 99 others); Thu, 15 Nov 2018 05:32:56 -0500 Received: from delany.relativists.org ([176.31.98.17]:52760 "EHLO delany.relativists.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725895AbeKOKc4 (ORCPT ); Thu, 15 Nov 2018 05:32:56 -0500 Received: from geertz.rel (geertz.rel [192.168.82.3]) by delany.relativists.org (Postfix) with ESMTPSA id 09B1F8B7; Wed, 14 Nov 2018 21:27:22 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=net.com.org.es; s=delany-v1; t=1542241642; bh=yALvhPzxzvWc1tryg/p0QMuut6ADbaoj0qvTouUF3Ts=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type:From; b=N7yBokEGNfAvAknlXk7iMFuJd5J4rvXQrj3rCcJ027X919a8Is2cZQuPnuOHW5pT+ gI3ZOyquNLbz2vFkWwvwV9M1dlLQzFIV3tvB1KyoqYnFGKRf07Lu26wmZUrACI5gup X2T05cBrFLVKsWmOIDt5U/+rwtKKUO14gdX/8v34= Received: by geertz.rel (Postfix, from userid 1000) id 657CF7FE95; Wed, 14 Nov 2018 21:27:19 -0300 (-03) From: =?UTF-8?q?Adeodato=20Sim=C3=B3?= To: Nick Terrell Cc: Chris Mason , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] lib/zstd: mark some internal functions as static with ZSTD_STATIC Date: Wed, 14 Nov 2018 21:27:19 -0300 Message-Id: <7e1778db6a6f586f3c7662c4878a349fde92084d.1542240915.git.dato@net.com.org.es> X-Mailer: git-send-email 2.19.1 In-Reply-To: <0ba48478013532f20856dca7d90c343d93901d54.1542240915.git.dato@net.com.org.es> References: <0ba48478013532f20856dca7d90c343d93901d54.1542240915.git.dato@net.com.org.es> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use ZSTD_STATIC instead of vanilla static because the functions are actually unused, and the macro adds the unused attribute. This silences -Wmissing-prototypes when defining. Signed-off-by: Adeodato Simó --- I separated these two functions into a separate patch because they are actually unused. If you'd rather have them removed, we may do that as well. Note that the ZSTD_STATIC macro adds the unused attribute in addition to static, but it adds __inline as well. lib/zstd/compress.c | 2 +- lib/zstd/fse_compress.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/zstd/compress.c b/lib/zstd/compress.c index 3eee699e1fd6..c572d064775f 100644 --- a/lib/zstd/compress.c +++ b/lib/zstd/compress.c @@ -431,7 +431,7 @@ static void ZSTD_reduceIndex(ZSTD_CCtx *zc, const U32 reducerValue) /* See doc/zstd_compression_format.md for detailed format description */ -size_t ZSTD_noCompressBlock(void *dst, size_t dstCapacity, const void *src, size_t srcSize) +ZSTD_STATIC size_t ZSTD_noCompressBlock(void *dst, size_t dstCapacity, const void *src, size_t srcSize) { if (srcSize + ZSTD_blockHeaderSize > dstCapacity) return ERROR(dstSize_tooSmall); diff --git a/lib/zstd/fse_compress.c b/lib/zstd/fse_compress.c index ef3d1741d532..05a148eabd09 100644 --- a/lib/zstd/fse_compress.c +++ b/lib/zstd/fse_compress.c @@ -474,7 +474,7 @@ size_t FSE_count_wksp(unsigned *count, unsigned *maxSymbolValuePtr, const void * `FSE_symbolCompressionTransform symbolTT[maxSymbolValue+1];` // This size is variable Allocation is manual (C standard does not support variable-size structures). */ -size_t FSE_sizeof_CTable(unsigned maxSymbolValue, unsigned tableLog) +ZSTD_STATIC size_t FSE_sizeof_CTable(unsigned maxSymbolValue, unsigned tableLog) { if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge); -- 2.19.1