diff options
author | Cyan4973 <Kdo4973@hotmail.com> | 2018-04-13 08:01:54 (GMT) |
---|---|---|
committer | Cyan4973 <Kdo4973@hotmail.com> | 2018-04-13 08:01:54 (GMT) |
commit | 57afa36795f478d0f9b069ad19b578761e3fb16a (patch) | |
tree | 44bd14e8202474338598af7069325cbb81c6dee4 /lib | |
parent | 98811d606808da9f59affd990670ba34e5a9bee2 (diff) | |
download | lz4-57afa36795f478d0f9b069ad19b578761e3fb16a.zip lz4-57afa36795f478d0f9b069ad19b578761e3fb16a.tar.gz lz4-57afa36795f478d0f9b069ad19b578761e3fb16a.tar.bz2 |
compatibility with gcc-4.4 string.h version
Someone found it would be a great idea to define there a global variable under the very generic name "index".
Cause problem with shadow warnings, so no variable can be named "index" now ...
Also : automatically update API manual
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -517,15 +517,15 @@ LZ4_FORCE_INLINE U32 LZ4_hashPosition(const void* const p, tableType_t const tab return LZ4_hash4(LZ4_read32(p), tableType); } -static void LZ4_putIndexOnHash(U32 index, U32 h, void* tableBase, tableType_t const tableType) +static void LZ4_putIndexOnHash(U32 idx, U32 h, void* tableBase, tableType_t const tableType) { switch (tableType) { default: /* fallthrough */ case clearedTable: /* fallthrough */ case byPtr: { /* illegal! */ assert(0); return; } - case byU32: { U32* hashTable = (U32*) tableBase; hashTable[h] = index; return; } - case byU16: { U16* hashTable = (U16*) tableBase; assert(index < 65536); hashTable[h] = (U16)index; return; } + case byU32: { U32* hashTable = (U32*) tableBase; hashTable[h] = idx; return; } + case byU16: { U16* hashTable = (U16*) tableBase; assert(idx < 65536); hashTable[h] = (U16)idx; return; } } } |