DESTDIR=
PREFIX = /usr
CC := $(CC)
-CFLAGS+= -I. -std=c99 -O3 -Wall -Wextra -Wundef -Wshadow -DLZ4_VERSION=\"$(RELEASE)\"
+CFLAGS+= -I. -std=c99 -O3 -Wall -Wextra -Wundef -Wshadow -Wstrict-prototypes -DLZ4_VERSION=\"$(RELEASE)\"
LIBDIR?= $(PREFIX)/lib
INCLUDEDIR=$(PREFIX)/include
****************************/
#if LZ4_ARCH64
-int LZ4_NbCommonBytes (register U64 val)
+static int LZ4_NbCommonBytes (register U64 val)
{
# if defined(LZ4_BIG_ENDIAN)
# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT)
#else
-int LZ4_NbCommonBytes (register U32 val)
+static int LZ4_NbCommonBytes (register U32 val)
{
# if defined(LZ4_BIG_ENDIAN)
# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT)
}
-void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, const BYTE* src)
+static void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, const BYTE* src)
{
if ((LZ4_dict->currentOffset > 0x80000000) ||
((size_t)LZ4_dict->currentOffset > (size_t)src)) /* address space overflow */
int LZ4_sizeofStreamState() { return LZ4_STREAMSIZE; }
-void LZ4_init(LZ4_stream_t_internal* lz4ds, const BYTE* base)
+static void LZ4_init(LZ4_stream_t_internal* lz4ds, const BYTE* base)
{
MEM_INIT(lz4ds, 0, LZ4_STREAMSIZE);
lz4ds->bufferStart = base;
DESTDIR=
PREFIX=/usr
CC:=$(CC)
-CFLAGS+= -std=c99 -O3 -Wall -Wextra -Wundef -Wshadow -DLZ4_VERSION=\"$(RELEASE)\"
+CFLAGS+= -std=c99 -O3 -Wall -Wextra -Wundef -Wshadow -Wstrict-prototypes -DLZ4_VERSION=\"$(RELEASE)\"
FLAGS= -I.. $(CFLAGS)
BINDIR=$(PREFIX)/bin
// Unix Large Files support (>4GB)
#define _FILE_OFFSET_BITS 64
#if (defined(__sun__) && (!defined(__LP64__))) // Sun Solaris 32-bits requires specific definitions
-# define _LARGEFILE_SOURCE
+# define _LARGEFILE_SOURCE
#elif ! defined(__LP64__) // No point defining Large file for 64 bit
# define _LARGEFILE64_SOURCE
#endif
DISPLAY("- %i iterations -\n", nbIterations);
}
-void BMK_SetPause() { BMK_pause = 1; }
+void BMK_SetPause(void) { BMK_pause = 1; }
//*********************************************************
#else
-static int BMK_GetMilliStart()
+static int BMK_GetMilliStart(void)
{
// Based on newer gettimeofday()
// Use GetMilliSpan to correct for rollover
// Parameters
void BMK_SetBlocksize(int bsize);
void BMK_SetNbIterations(int nbLoops);
-void BMK_SetPause();
+void BMK_SetPause(void);
}
-int CDG_usage()
+int CDG_usage(void)
{
DISPLAY( "Compressible data generator\n");
DISPLAY( "Usage :\n");
DISPLAY("- %i iterations -\n", nbIterations);
}
-void BMK_SetPause()
+void BMK_SetPause(void)
{
BMK_pause = 1;
}
#else
-static int BMK_GetMilliStart()
+static int BMK_GetMilliStart(void)
{
// Based on newer gettimeofday()
// Use GetMilliSpan to correct for rollover
return 0;
}
-int usage_advanced()
+int usage_advanced(void)
{
DISPLAY( "\nAdvanced options :\n");
DISPLAY( " -c# : test only compression function # [1-%i]\n", NB_COMPRESSION_ALGORITHMS);
/*********************************************************
Fuzzer functions
*********************************************************/
-static int FUZ_GetMilliStart()
+static int FUZ_GetMilliStart(void)
{
struct timeb tb;
int nCount;
// No longer useful; included into issue 134
-int FUZ_Issue52()
+int FUZ_Issue52(void)
{
char* output;
char* input;
#define MAX_NB_BUFF_I134 150
#define BLOCKSIZE_I134 (32 MB)
-int FUZ_Issue134()
+int FUZ_Issue134(void)
{
char* buffers[MAX_NB_BUFF_I134+1] = {0};
int i, nbBuff=0;
}
-int FUZ_usage()
+int FUZ_usage(void)
{
DISPLAY( "Usage :\n");
DISPLAY( " %s [args]\n", programName);
//****************************
// Functions
//****************************
-int usage()
+int usage(void)
{
DISPLAY( "Usage :\n");
DISPLAY( " %s [arg] [input] [output]\n", programName);
return 0;
}
-int usage_advanced()
+int usage_advanced(void)
{
DISPLAY(WELCOME_MESSAGE);
usage();
return 0;
}
-int usage_longhelp()
+int usage_longhelp(void)
{
DISPLAY( "\n");
DISPLAY( "Which values can get [output] ? \n");
return 0;
}
-int badusage()
+int badusage(void)
{
DISPLAYLEVEL(1, "Incorrect parameters\n");
if (displayLevel >= 1) usage();
}
-void waitEnter()
+void waitEnter(void)
{
DISPLAY("Press enter to continue...\n");
getchar();