diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2015-04-11 18:12:03 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2015-04-11 18:12:03 (GMT) |
commit | 9443f3d9244faedb08527bf684994a0495117833 (patch) | |
tree | 43d3588479b11570f8eb7e2422d6a375490e1306 /lib | |
parent | 973e385fa332485f4617cf16406a8c8ef631a555 (diff) | |
download | lz4-9443f3d9244faedb08527bf684994a0495117833.zip lz4-9443f3d9244faedb08527bf684994a0495117833.tar.gz lz4-9443f3d9244faedb08527bf684994a0495117833.tar.bz2 |
Extended obsolete warning messages to lz4hc
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4.h | 13 | ||||
-rw-r--r-- | lib/lz4hc.h | 35 |
2 files changed, 37 insertions, 11 deletions
@@ -280,9 +280,14 @@ int LZ4_decompress_fast_usingDict (const char* source, char* dest, int originalS /************************************** * Obsolete Functions **************************************/ -/* Warning statements */ -#ifndef _WARNING_STATEMENT_BLOCK -# define _WARNING_STATEMENT_BLOCK +/* Deprecate Warnings */ +/* Should these warnings messages be a problem, + it is generally possible to disable them, + with -Wno-deprecated-declarations for gcc + or _CRT_SECURE_NO_WARNINGS in Visual for example. + You can also define _DEPRECATE_WARNING_DEFBLOCK. */ +#ifndef _DEPRECATE_WARNING_DEFBLOCK +# define _DEPRECATE_WARNING_DEFBLOCK # define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) # if (GCC_VERSION >= 405) || defined(__clang__) # define DEPRECATED(message) __attribute__((deprecated(message))) @@ -294,7 +299,7 @@ int LZ4_decompress_fast_usingDict (const char* source, char* dest, int originalS # pragma message("WARNING: You need to implement DEPRECATED for this compiler") # define DEPRECATED # endif -#endif // _WARNING_STATEMENT_BLOCK +#endif // _DEPRECATE_WARNING_DEFBLOCK /* Obsolete compression functions */ /* These functions are planned to generate warnings by r131 approximately */ diff --git a/lib/lz4hc.h b/lib/lz4hc.h index c257dcc..7a5bb02 100644 --- a/lib/lz4hc.h +++ b/lib/lz4hc.h @@ -137,8 +137,29 @@ using LZ4_saveDictHC(). /************************************** * Deprecated Functions * ************************************/ +/* Deprecate Warnings */ +/* Should these warnings messages be a problem, + it is generally possible to disable them, + with -Wno-deprecated-declarations for gcc + or _CRT_SECURE_NO_WARNINGS in Visual for example. + You can also define _DEPRECATE_WARNING_DEFBLOCK. */ +#ifndef _DEPRECATE_WARNING_DEFBLOCK +# define _DEPRECATE_WARNING_DEFBLOCK +# define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) +# if (GCC_VERSION >= 405) || defined(__clang__) +# define DEPRECATED(message) __attribute__((deprecated(message))) +# elif (GCC_VERSION >= 301) +# define DEPRECATED(message) __attribute__((deprecated)) +# elif defined(_MSC_VER) +# define DEPRECATED(message) __declspec(deprecated(message)) +# else +# pragma message("WARNING: You need to implement DEPRECATED for this compiler") +# define DEPRECATED +# endif +#endif // _DEPRECATE_WARNING_DEFBLOCK /* compression functions */ +/* these functions are planned to trigger warning messages by r131 approximately */ int LZ4_compressHC (const char* source, char* dest, int inputSize); int LZ4_compressHC_limitedOutput (const char* source, char* dest, int inputSize, int maxOutputSize); int LZ4_compressHC2 (const char* source, char* dest, int inputSize, int compressionLevel); @@ -151,13 +172,13 @@ int LZ4_compressHC_continue (LZ4_streamHC_t* LZ4_streamHCPtr, cons int LZ4_compressHC_limitedOutput_continue (LZ4_streamHC_t* LZ4_streamHCPtr, const char* source, char* dest, int inputSize, int maxOutputSize); /* Streaming functions following the older model; should no longer be used */ -void* LZ4_createHC (const char* inputBuffer); -char* LZ4_slideInputBufferHC (void* LZ4HC_Data); -int LZ4_freeHC (void* LZ4HC_Data); -int LZ4_compressHC2_continue (void* LZ4HC_Data, const char* source, char* dest, int inputSize, int compressionLevel); -int LZ4_compressHC2_limitedOutput_continue (void* LZ4HC_Data, const char* source, char* dest, int inputSize, int maxOutputSize, int compressionLevel); -int LZ4_sizeofStreamStateHC(void); -int LZ4_resetStreamStateHC(void* state, const char* inputBuffer); +DEPRECATED("use LZ4_createStreamHC() instead") void* LZ4_createHC (const char* inputBuffer); +DEPRECATED("use LZ4_saveDictHC() instead") char* LZ4_slideInputBufferHC (void* LZ4HC_Data); +DEPRECATED("use LZ4_freeStreamHC() instead") int LZ4_freeHC (void* LZ4HC_Data); +DEPRECATED("use LZ4_compressHC_safe_continue() instead") int LZ4_compressHC2_continue (void* LZ4HC_Data, const char* source, char* dest, int inputSize, int compressionLevel); +DEPRECATED("use LZ4_compressHC_safe_continue() instead") int LZ4_compressHC2_limitedOutput_continue (void* LZ4HC_Data, const char* source, char* dest, int inputSize, int maxOutputSize, int compressionLevel); +DEPRECATED("use LZ4_createStreamHC() instead") int LZ4_sizeofStreamStateHC(void); +DEPRECATED("use LZ4_resetStreamHC() instead") int LZ4_resetStreamStateHC(void* state, const char* inputBuffer); #if defined (__cplusplus) |