summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-11-29 16:12:26 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2014-11-29 16:12:26 (GMT)
commit33dca250ee0afa3aec58bf3bf1a34b09bebf3fb5 (patch)
treef2f5e24bfde50bbdac86eeff3edb44b450d38447
parentdc43a1f6b5373e4e931f09b89ae7680be5afca69 (diff)
downloadlz4-33dca250ee0afa3aec58bf3bf1a34b09bebf3fb5.zip
lz4-33dca250ee0afa3aec58bf3bf1a34b09bebf3fb5.tar.gz
lz4-33dca250ee0afa3aec58bf3bf1a34b09bebf3fb5.tar.bz2
minor : fixed warning under clang
-rw-r--r--lz4hc.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/lz4hc.c b/lz4hc.c
index 8f6f25b..3dbdf1d 100644
--- a/lz4hc.c
+++ b/lz4hc.c
@@ -50,7 +50,7 @@ Memory routines
/**************************************
-CPU Feature Detection
+ CPU Feature Detection
**************************************/
/* 32 or 64 bits ? */
#if (defined(__x86_64__) || defined(_M_X64) || defined(_WIN64) \
@@ -102,7 +102,7 @@ CPU Feature Detection
/**************************************
-Compiler Options
+ Compiler Options
**************************************/
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */
/* "restrict" is a known keyword */
@@ -138,14 +138,14 @@ Compiler Options
/**************************************
-Includes
+ Includes
**************************************/
-#include "lz4hc.h"
#include "lz4.h"
+#include "lz4hc.h"
/**************************************
-Basic Types
+ Basic Types
**************************************/
#if defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */
# include <stdint.h>
@@ -248,9 +248,12 @@ Architecture-specific macros
**************************************/
typedef struct
{
- U32 hashTable[HASHTABLESIZE];
+ union {
+ U64 alignedOn8Bytes; /* force 8-bytes alignment on 32-bits systems */
+ U32 hashTable[HASHTABLESIZE];
+ };
U16 chainTable[MAXD];
- const BYTE* end; /* next block here to keep current prefix as prefix */
+ const BYTE* end; /* next block here to continue on current prefix */
const BYTE* base; /* All index relative to this position */
const BYTE* dictBase; /* alternate base for extDict */
U32 dictLimit; /* below that point, need extDict */