diff options
author | Yann Collet <cyan@fb.com> | 2019-04-04 19:47:36 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2019-04-04 19:47:36 (GMT) |
commit | 7a39fb8fb69a47486b91810708bbe796331b26a2 (patch) | |
tree | 84216dd40a46c7d5728827ceaec64130022654e5 /lib/lz4.h | |
parent | ab913005093cb77d2efc430ba50636c2b8dea8d0 (diff) | |
download | lz4-7a39fb8fb69a47486b91810708bbe796331b26a2.zip lz4-7a39fb8fb69a47486b91810708bbe796331b26a2.tar.gz lz4-7a39fb8fb69a47486b91810708bbe796331b26a2.tar.bz2 |
make `_fast*()` decoder generate a deprecation warning
updated modification
Diffstat (limited to 'lib/lz4.h')
-rw-r--r-- | lib/lz4.h | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -563,11 +563,16 @@ union LZ4_streamDecode_u { **************************************/ /*! Deprecation warnings - * Should deprecation warnings be a problem, - * it is generally possible to disable them, + * + * Deprecated functions make the compiler generate a warning when invoked. + * This is meant to invite users to update their source code. + * Should deprecation warnings be a problem, it is generally possible to disable them, * typically with -Wno-deprecated-declarations for gcc * or _CRT_SECURE_NO_WARNINGS in Visual. - * Otherwise, it's also possible to define LZ4_DISABLE_DEPRECATE_WARNINGS */ + * + * Another method is to define LZ4_DISABLE_DEPRECATE_WARNINGS + * before including the header file. + */ #ifdef LZ4_DISABLE_DEPRECATE_WARNINGS # define LZ4_DEPRECATED(message) /* disable deprecation warnings */ #else @@ -640,9 +645,12 @@ LZ4_DEPRECATED("use LZ4_decompress_fast_usingDict() instead") LZ4LIB_API int LZ4 * But they may happen if input data is invalid (error or intentional tampering). * As a consequence, use these functions in trusted environments with trusted data **only**. */ -LZ4LIB_API int LZ4_decompress_fast (const char* src, char* dst, int originalSize); -LZ4LIB_API int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int originalSize); -LZ4LIB_API int LZ4_decompress_fast_usingDict (const char* src, char* dst, int originalSize, const char* dictStart, int dictSize); +LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe() instead") LZ4LIB_API +int LZ4_decompress_fast (const char* src, char* dst, int originalSize); +LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_continue() instead") LZ4LIB_API +int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int originalSize); +LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_usingDict() instead") LZ4LIB_API +int LZ4_decompress_fast_usingDict (const char* src, char* dst, int originalSize, const char* dictStart, int dictSize); #endif /* LZ4_H_2983827168210 */ |