From 12001d6c1ac08e188587d67d888aa008b2e1ceba Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Wed, 6 May 2020 14:36:56 -0500 Subject: Avoid old-style function definitions Define 0-argument functions like foo(void) instead of foo(), in order to avoid a warning with -Wold-style-definition. This makes it easier to embed lz4.c in projects that compile with -Werror -Wold-style-definition. --- lib/lz4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lz4.c b/lib/lz4.c index 9808d70..8900c40 100644 --- a/lib/lz4.c +++ b/lib/lz4.c @@ -605,7 +605,7 @@ typedef enum { noDictIssue = 0, dictSmall } dictIssue_directive; int LZ4_versionNumber (void) { return LZ4_VERSION_NUMBER; } const char* LZ4_versionString(void) { return LZ4_VERSION_STRING; } int LZ4_compressBound(int isize) { return LZ4_COMPRESSBOUND(isize); } -int LZ4_sizeofState() { return LZ4_STREAMSIZE; } +int LZ4_sizeofState(void) { return LZ4_STREAMSIZE; } /*-************************************ @@ -2374,7 +2374,7 @@ int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, /* Obsolete Streaming functions */ -int LZ4_sizeofStreamState() { return LZ4_STREAMSIZE; } +int LZ4_sizeofStreamState(void) { return LZ4_STREAMSIZE; } int LZ4_resetStreamState(void* state, char* inputBuffer) { -- cgit v0.12