Skip to content

Commit

Permalink
lib: zstd: Fix a warning in zstd_reset_cstream()
Browse files Browse the repository at this point in the history
- This fixes the below warning:

../lib/zstd/zstd_compress_module.c: In function 'zstd_reset_cstream':
../lib/zstd/zstd_compress_module.c:136:9: warning: 'ZSTD_resetCStream' is deprecated [-Wdeprecated-declarations]
  136 |         return ZSTD_resetCStream(cstream, pledged_src_size);
      |         ^~~~~~
In file included from ../include/linux/zstd.h:26,
                 from ../lib/zstd/zstd_compress_module.c:15:
../include/linux/zstd_lib.h:2277:8: note: declared here
 2277 | size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pledgedSrcSize);
      |        ^~~~~~~~~~~~~~~~~

ZSTD_resetCstream is deprecated and zstd_CCtx_reset is suggested to use hence let's switch to it.

Signed-off-by: Cyber Knight <[email protected]>
Signed-off-by: onettboots <[email protected]>
Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
  • Loading branch information
cyberknight777 authored and SquareTea committed Jan 16, 2025
1 parent 9653885 commit 435eac8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/zstd/zstd_compress_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ EXPORT_SYMBOL(zstd_init_cstream);
size_t zstd_reset_cstream(zstd_cstream *cstream,
unsigned long long pledged_src_size)
{
return ZSTD_resetCStream(cstream, pledged_src_size);
return ZSTD_CCtx_reset(cstream, pledged_src_size);
}
EXPORT_SYMBOL(zstd_reset_cstream);

Expand Down

0 comments on commit 435eac8

Please sign in to comment.