diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2015-10-21 11:58:06 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2015-10-21 11:58:06 (GMT) |
commit | ff3324b8d5ca6d7144a09ce7cc5521284d741bea (patch) | |
tree | 540746de13c61b8b796bee30743bf61eafdb5bd6 /lib/lz4.h | |
parent | 64f8b037eec5a0571bdf2e6ae312f714545c06c9 (diff) | |
download | lz4-ff3324b8d5ca6d7144a09ce7cc5521284d741bea.zip lz4-ff3324b8d5ca6d7144a09ce7cc5521284d741bea.tar.gz lz4-ff3324b8d5ca6d7144a09ce7cc5521284d741bea.tar.bz2 |
Fix : compiler-independent macro to remove deprecation warnings
Diffstat (limited to 'lib/lz4.h')
-rw-r--r-- | lib/lz4.h | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -300,7 +300,6 @@ int LZ4_decompress_safe_usingDict (const char* source, char* dest, int compresse int LZ4_decompress_fast_usingDict (const char* source, char* dest, int originalSize, const char* dictStart, int dictSize); - /************************************** * Obsolete Functions **************************************/ @@ -309,10 +308,11 @@ int LZ4_decompress_fast_usingDict (const char* source, char* dest, int originalS 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 LZ4_DEPRECATE_WARNING_DEFBLOCK. */ -#ifndef LZ4_DEPRECATE_WARNING_DEFBLOCK -# define LZ4_DEPRECATE_WARNING_DEFBLOCK -# define LZ4_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + Otherwise, you can also define LZ4_DISABLE_DEPRECATE_WARNINGS */ +#define LZ4_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) +#ifdef LZ4_DISABLE_DEPRECATE_WARNINGS +# define LZ4_DEPRECATED() /* disable deprecation warnings */ +#else # if (LZ4_GCC_VERSION >= 405) || defined(__clang__) # define LZ4_DEPRECATED(message) __attribute__((deprecated(message))) # elif (LZ4_GCC_VERSION >= 301) @@ -323,10 +323,10 @@ int LZ4_decompress_fast_usingDict (const char* source, char* dest, int originalS # pragma message("WARNING: You need to implement LZ4_DEPRECATED for this compiler") # define LZ4_DEPRECATED(message) # endif -#endif /* LZ4_DEPRECATE_WARNING_DEFBLOCK */ +#endif /* LZ4_DISABLE_DEPRECATE_WARNINGS */ /* Obsolete compression functions */ -/* These functions are planned to start generate warnings by r131 approximately */ +/* These functions will generate warnings in a future release */ int LZ4_compress (const char* source, char* dest, int sourceSize); int LZ4_compress_limitedOutput (const char* source, char* dest, int sourceSize, int maxOutputSize); int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize); @@ -336,7 +336,7 @@ int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_streamPtr, const cha /* Obsolete decompression functions */ /* These function names are completely deprecated and must no longer be used. - They are only provided here for compatibility with older programs. + They are only provided in lz4.c for compatibility with older programs. - LZ4_uncompress is the same as LZ4_decompress_fast - LZ4_uncompress_unknownOutputSize is the same as LZ4_decompress_safe These function prototypes are now disabled; uncomment them only if you really need them. |