summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorCyan4973 <Kdo4973@hotmail.com>2018-04-13 08:01:54 (GMT)
committerCyan4973 <Kdo4973@hotmail.com>2018-04-13 08:01:54 (GMT)
commit57afa36795f478d0f9b069ad19b578761e3fb16a (patch)
tree44bd14e8202474338598af7069325cbb81c6dee4 /lib
parent98811d606808da9f59affd990670ba34e5a9bee2 (diff)
downloadlz4-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index 21892d3..f55e4e1 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -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; }
}
}