From: Kees Cook <keescook@chromium.org>
To: YueHaibing <yuehaibing@huawei.com>
Cc: gustavo@embeddedor.com, terrelln@fb.com, clm@fb.com,
yamada.masahiro@socionext.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib: zstd: Make ZSTD_compressBlock_greedy_extDict static
Date: Mon, 22 Jul 2019 10:04:14 -0700 [thread overview]
Message-ID: <201907221004.76B87B1A@keescook> (raw)
In-Reply-To: <20190717091852.50808-1-yuehaibing@huawei.com>
On Wed, Jul 17, 2019 at 05:18:52PM +0800, YueHaibing wrote:
> Fix sparse warnings:
>
> lib/zstd/compress.c:2252:6: warning:
> symbol 'ZSTD_compressBlock_greedy_extDict' was not declared. Should it be static?
> lib/zstd/compress.c:2982:14: warning:
> symbol 'ZSTD_createCStream_advanced' was not declared. Should it be static?
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
-Kees
> ---
> lib/zstd/compress.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/lib/zstd/compress.c b/lib/zstd/compress.c
> index 5e0b67003e55..651d686c00b6 100644
> --- a/lib/zstd/compress.c
> +++ b/lib/zstd/compress.c
> @@ -2249,7 +2249,11 @@ void ZSTD_compressBlock_lazy_extDict_generic(ZSTD_CCtx *ctx, const void *src, si
> }
> }
>
> -void ZSTD_compressBlock_greedy_extDict(ZSTD_CCtx *ctx, const void *src, size_t srcSize) { ZSTD_compressBlock_lazy_extDict_generic(ctx, src, srcSize, 0, 0); }
> +static void ZSTD_compressBlock_greedy_extDict(ZSTD_CCtx *ctx, const void *src,
> + size_t srcSize)
> +{
> + ZSTD_compressBlock_lazy_extDict_generic(ctx, src, srcSize, 0, 0);
> +}
>
> static void ZSTD_compressBlock_lazy_extDict(ZSTD_CCtx *ctx, const void *src, size_t srcSize)
> {
> @@ -2979,7 +2983,7 @@ size_t ZSTD_CStreamWorkspaceBound(ZSTD_compressionParameters cParams)
> return ZSTD_CCtxWorkspaceBound(cParams) + ZSTD_ALIGN(sizeof(ZSTD_CStream)) + ZSTD_ALIGN(inBuffSize) + ZSTD_ALIGN(outBuffSize);
> }
>
> -ZSTD_CStream *ZSTD_createCStream_advanced(ZSTD_customMem customMem)
> +static ZSTD_CStream *ZSTD_createCStream_advanced(ZSTD_customMem customMem)
> {
> ZSTD_CStream *zcs;
>
> --
> 2.20.1
>
>
--
Kees Cook
prev parent reply other threads:[~2019-07-22 17:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-17 9:18 [PATCH] lib: zstd: Make ZSTD_compressBlock_greedy_extDict static YueHaibing
2019-07-22 17:04 ` Kees Cook [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201907221004.76B87B1A@keescook \
--to=keescook@chromium.org \
--cc=clm@fb.com \
--cc=gustavo@embeddedor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=terrelln@fb.com \
--cc=yamada.masahiro@socionext.com \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox