lz4_decompress: declare LZ4_decompress_safe_withPrefix64k static
PATCH 1/1 lz4_decompress: declare LZ4_decompress_safe_withPrefix64k static
Declare LZ4_decompress_safe_withPrefix64k as static to fix sparse warning:
Quoted 2 lines
warning: symbol '
LZ4_decompress_safe_withPrefix64k' was not declared. Should it be static?
Signed-off-by Rajat Asthana <[email protected]>
--- lib/lz4/lz4_decompress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/lz4/lz4_decompress.c +1 -1
@@ -481,7 +481,7 @@ int LZ4_decompress_fast(const char *source, char *dest, int originalSize)/* ===== Instantiate a few more decoding cases, used more than once. ===== */ -int LZ4_decompress_safe_withPrefix64k (const char *source,char *dest, +static int LZ4_decompress_safe_withPrefix64k (const char *source,char *dest,int compressedSize,int maxOutputSize) { return LZ4_decompress_generic(source, dest,
Signature · 1 line
2.31.1
Quoted 31 lines · Rajat Asthana
Declare
LZ4_decompress_safe_withPrefix64kas static to fix sparse warning:Quoted 2 lines
warning: symbol '
LZ4_decompress_safe_withPrefix64k' was not declared. Should it be static?Signed-off-by Rajat Asthana <[email protected]>---
lib/lz4/lz4_decompress.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)lib/lz4/lz4_decompress.c +1
-1@@ -481,7 +481,7 @@ int LZ4_decompress_fast(const char *source, char *dest, int originalSize)/* ===== Instantiate a few more decoding cases, used more than once. ===== */ -int LZ4_decompress_safe_withPrefix64k (const char *source,char *dest, +static int LZ4_decompress_safe_withPrefix64k (const char *source,char *dest,int compressedSize,int maxOutputSize) { return LZ4_decompress_generic(source, dest,Signature · 1 line
2.31.1
Reviewed-by Nick Terrell <[email protected]>
This looks good to me! LZ4_decompress_safe_withPrefix64k() is a deprecated function in the upstream LZ4 API, which isn’t exposed in the kernel API, so can definitely be marked static.
Thanks,
Nick