diff options
author | Yann Collet <cyan@fb.com> | 2018-09-13 21:29:41 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2018-09-13 21:29:41 (GMT) |
commit | 86023f01f207f3561766bf33a0c3d935786ae5f9 (patch) | |
tree | 66129f7c089e4e701ce99577291910e5e00aa835 /lib | |
parent | 4a84836c132781e12bafd5f68923c2647b34e2b7 (diff) | |
download | lz4-86023f01f207f3561766bf33a0c3d935786ae5f9.zip lz4-86023f01f207f3561766bf33a0c3d935786ae5f9.tar.gz lz4-86023f01f207f3561766bf33a0c3d935786ae5f9.tar.bz2 |
avoid final trailing comma for enum lists
as detected in #485 by @JoachimSchneider.
Refactored the c_standards tests
so that these issues get automatically detected in CI tests.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4frame.c | 10 | ||||
-rw-r--r-- | lib/lz4frame.h | 20 | ||||
-rw-r--r-- | lib/lz4hc.c | 2 |
3 files changed, 16 insertions, 16 deletions
diff --git a/lib/lz4frame.c b/lib/lz4frame.c index 08bf0fa..a30de48 100644 --- a/lib/lz4frame.c +++ b/lib/lz4frame.c @@ -33,8 +33,8 @@ You can contact the author at : */ /* LZ4F is a stand-alone API to create LZ4-compressed Frames -* in full conformance with specification v1.5.0 -* All related operations, including memory management, are handled by the library. +* in full conformance with specification v1.6.1 . +* This library rely upon memory management capabilities. * */ @@ -63,9 +63,9 @@ You can contact the author at : * Memory routines **************************************/ #include <stdlib.h> /* malloc, calloc, free */ -#define ALLOC(s) malloc(s) -#define ALLOC_AND_ZERO(s) calloc(1,s) -#define FREEMEM free +#define ALLOC(s) malloc(s) +#define ALLOC_AND_ZERO(s) calloc(1,(s)) +#define FREEMEM(p) free(p) #include <string.h> /* memset, memcpy, memmove */ #define MEM_INIT memset diff --git a/lib/lz4frame.h b/lib/lz4frame.h index 75f1fd9..fc30f6f 100644 --- a/lib/lz4frame.h +++ b/lib/lz4frame.h @@ -427,15 +427,15 @@ LZ4FLIB_API void LZ4F_resetDecompressionContext(LZ4F_dctx* dctx); /* always su extern "C" { #endif -/* These declarations are not stable and may change in the future. They are - * therefore only safe to depend on when the caller is statically linked - * against the library. To access their declarations, define - * LZ4F_STATIC_LINKING_ONLY. +/* These declarations are not stable and may change in the future. + * They are therefore only safe to depend on + * when the caller is statically linked against the library. + * To access their declarations, define LZ4F_STATIC_LINKING_ONLY. * - * There is a further protection mechanism where these symbols aren't published - * into shared/dynamic libraries. You can override this behavior and force - * them to be published by defining LZ4F_PUBLISH_STATIC_FUNCTIONS. Use at - * your own risk. + * By default, these symbols aren't published into shared/dynamic libraries. + * You can override this behavior and force them to be published + * by defining LZ4F_PUBLISH_STATIC_FUNCTIONS. + * Use at your own risk. */ #ifdef LZ4F_PUBLISH_STATIC_FUNCTIONS #define LZ4FLIB_STATIC_API LZ4FLIB_API @@ -471,12 +471,12 @@ extern "C" { #define LZ4F_GENERATE_ENUM(ENUM) LZ4F_##ENUM, /* enum list is exposed, to handle specific errors */ -typedef enum { LZ4F_LIST_ERRORS(LZ4F_GENERATE_ENUM) } LZ4F_errorCodes; +typedef enum { LZ4F_LIST_ERRORS(LZ4F_GENERATE_ENUM) + _LZ4F_dummy_error_enum_for_c89_never_used } LZ4F_errorCodes; LZ4FLIB_STATIC_API LZ4F_errorCodes LZ4F_getErrorCode(size_t functionResult); - /********************************** * Bulk processing dictionary API *********************************/ diff --git a/lib/lz4hc.c b/lib/lz4hc.c index e913ee7..87f4cdb 100644 --- a/lib/lz4hc.c +++ b/lib/lz4hc.c @@ -400,7 +400,7 @@ int LZ4HC_InsertAndFindBestMatch(LZ4HC_CCtx_internal* const hc4, /* Index tabl typedef enum { noLimit = 0, limitedOutput = 1, - limitedDestSize = 2, + limitedDestSize = 2 } limitedOutput_directive; /* LZ4HC_encodeSequence() : |