summaryrefslogtreecommitdiffstats
path: root/lib/lz4.h
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2016-11-14 18:02:01 (GMT)
committerYann Collet <cyan@fb.com>2016-11-14 18:02:01 (GMT)
commitfa158b4118f2d53f6e84ce6ce16aa8d3ccd8a11a (patch)
treea09e35aeb03b5c0ac386e9041b7cc63d82d2a7b1 /lib/lz4.h
parent84af32d491a23e2f160c215e53430c4a8b091cc9 (diff)
downloadlz4-fa158b4118f2d53f6e84ce6ce16aa8d3ccd8a11a.zip
lz4-fa158b4118f2d53f6e84ce6ce16aa8d3ccd8a11a.tar.gz
lz4-fa158b4118f2d53f6e84ce6ce16aa8d3ccd8a11a.tar.bz2
fixed nameless union warnings
Diffstat (limited to 'lib/lz4.h')
-rw-r--r--lib/lz4.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/lz4.h b/lib/lz4.h
index d5ac9cb..c1ea91a 100644
--- a/lib/lz4.h
+++ b/lib/lz4.h
@@ -226,7 +226,7 @@ LZ4LIB_API int LZ4_decompress_safe_partial (const char* source, char* dest, int
/*-*********************************************
* Streaming Compression Functions
***********************************************/
-typedef struct LZ4_stream_s LZ4_stream_t; /* incomplete type (defined later) */
+typedef union LZ4_stream_u LZ4_stream_t; /* incomplete type (defined later) */
/*! LZ4_createStream() and LZ4_freeStream() :
* LZ4_createStream() will allocate and initialize an `LZ4_stream_t` structure.
@@ -272,7 +272,7 @@ LZ4LIB_API int LZ4_saveDict (LZ4_stream_t* streamPtr, char* safeBuffer, int dict
* Streaming Decompression Functions
* Bufferless synchronous API
************************************************/
-typedef struct LZ4_streamDecode_s LZ4_streamDecode_t; /* incomplete type (defined later) */
+typedef union LZ4_streamDecode_u LZ4_streamDecode_t; /* incomplete type (defined later) */
/* creation / destruction of streaming decompression tracking structure */
LZ4LIB_API LZ4_streamDecode_t* LZ4_createStreamDecode(void);
@@ -378,11 +378,9 @@ typedef struct {
*/
#define LZ4_STREAMSIZE_U64 ((1 << (LZ4_MEMORY_USAGE-3)) + 4)
#define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U64 * sizeof(unsigned long long))
-struct LZ4_stream_s {
- union {
+union LZ4_stream_u {
unsigned long long table[LZ4_STREAMSIZE_U64];
LZ4_stream_t_internal internal_donotuse;
- };
} ; /* previously typedef'd to LZ4_stream_t */
@@ -396,11 +394,9 @@ struct LZ4_stream_s {
*/
#define LZ4_STREAMDECODESIZE_U64 4
#define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U64 * sizeof(unsigned long long))
-struct LZ4_streamDecode_s {
- union {
+union LZ4_streamDecode_u {
unsigned long long table[LZ4_STREAMDECODESIZE_U64];
LZ4_streamDecode_t_internal internal_donotuse;
- };
} ; /* previously typedef'd to LZ4_streamDecode_t */