diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2017-11-06 21:56:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-06 21:56:44 (GMT) |
commit | 263e398a52e8c11f9add2be8df29d48be16e3f93 (patch) | |
tree | 8e741a7cac42fd235c47291b7d9dd00d5668e2f7 | |
parent | cc4a109b0df7d12cfd0f26960ba3548d9b7915ba (diff) | |
parent | 4fed595dac0a10fb68c77a71370638ad958ccce8 (diff) | |
download | lz4-263e398a52e8c11f9add2be8df29d48be16e3f93.zip lz4-263e398a52e8c11f9add2be8df29d48be16e3f93.tar.gz lz4-263e398a52e8c11f9add2be8df29d48be16e3f93.tar.bz2 |
Merge pull request #417 from sylvestre/dev
When building with a C++ compiler, remove the 'register' keyword to silent a warning
-rw-r--r-- | lib/lz4.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -85,6 +85,17 @@ #endif +/* + * register is ignored when the code built with a C++-17 compiler + * Remove the keyword when built with C++-17 to silent the warning + */ +#if defined(__cplusplus) && __cplusplus > 201402L +# define REGISTER +#else +# define REGISTER register +#endif + + /*-************************************ * Dependency **************************************/ @@ -330,7 +341,7 @@ static const int LZ4_minLength = (MFLIMIT+1); /*-************************************ * Common functions **************************************/ -static unsigned LZ4_NbCommonBytes (register reg_t val) +static unsigned LZ4_NbCommonBytes (REGISTER reg_t val) { if (LZ4_isLittleEndian()) { if (sizeof(val)==8) { |