1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Enable -Wstrict-prototypes and update all void functions to conform.

This commit is contained in:
David Steele 2018-08-03 19:19:14 -04:00
parent bec4c176dc
commit 429a356e33
102 changed files with 185 additions and 181 deletions

View File

@ -93,6 +93,10 @@
<p>Add <code>cvtBoolToConstZ()</code> to simplify conversion of boolean to string.</p>
</release-item>
<release-item>
<p>Enable <id>-Wstrict-prototypes</id> and update all void functions to conform.</p>
</release-item>
<release-item>
<p>Rename error-handling variables in <code>Main.pm</code> to conform to standard.</p>
</release-item>

View File

@ -18,7 +18,7 @@ CINCLUDE = -I. -I../libc
# Compile warnings
CWARN = -Wfatal-errors -Wall -Wextra -Wwrite-strings -Wswitch-enum -Wconversion -Wformat=2 -Wformat-nonliteral \
-Wno-clobbered -Wno-missing-field-initializers
-Wno-clobbered -Wno-missing-field-initializers -Wstrict-prototypes
# Automatically generate Perl compile options for the local system
CPERL = `perl -MExtUtils::Embed -e ccopts`

View File

@ -95,7 +95,7 @@ queueNeed(const String *walSegment, bool found, size_t queueSize, size_t walSegm
Push a WAL segment to the repository
***********************************************************************************************************************************/
int
cmdArchiveGet()
cmdArchiveGet(void)
{
FUNCTION_DEBUG_VOID(logLevelDebug);

View File

@ -7,6 +7,6 @@ Archive Get Command
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
int cmdArchiveGet();
int cmdArchiveGet(void);
#endif

View File

@ -19,7 +19,7 @@ Archive Push Command
Push a WAL segment to the repository
***********************************************************************************************************************************/
void
cmdArchivePush()
cmdArchivePush(void)
{
FUNCTION_DEBUG_VOID(logLevelDebug);

View File

@ -7,6 +7,6 @@ Archive Push Command
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
void cmdArchivePush();
void cmdArchivePush(void);
#endif

View File

@ -21,7 +21,7 @@ static TimeMSec timeBegin;
Capture time at the very start of main so total time is more accurate
***********************************************************************************************************************************/
void
cmdInit()
cmdInit(void)
{
FUNCTION_DEBUG_VOID(logLevelTrace);

View File

@ -9,7 +9,7 @@ Common Command Routines
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
void cmdInit();
void cmdInit(void);
void cmdBegin(bool logOption);
void cmdEnd(int code, const String *errorMessage);

View File

@ -132,7 +132,7 @@ helpRenderValue(const Variant *value)
Render help to a string
***********************************************************************************************************************************/
static String *
helpRender()
helpRender(void)
{
FUNCTION_DEBUG_VOID(logLevelDebug);
@ -383,7 +383,7 @@ helpRender()
Render help and output to stdout
***********************************************************************************************************************************/
void
cmdHelp()
cmdHelp(void)
{
FUNCTION_DEBUG_VOID(logLevelDebug);

View File

@ -7,6 +7,6 @@ Help Command
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
void cmdHelp();
void cmdHelp(void);
#endif

View File

@ -135,7 +135,7 @@ errorTypeParent(const ErrorType *errorType)
/***********************************************************************************************************************************
Get the depth of the current try statement (0 if none)
***********************************************************************************************************************************/
unsigned int errorTryDepth()
unsigned int errorTryDepth(void)
{
return (unsigned int)errorContext.tryTotal;
}
@ -166,7 +166,7 @@ errorTypeExtends(const ErrorType *child, const ErrorType *parent)
Error type
***********************************************************************************************************************************/
const ErrorType *
errorType()
errorType(void)
{
return errorContext.error.errorType;
}
@ -175,7 +175,7 @@ errorType()
Error code (pulled from error type)
***********************************************************************************************************************************/
int
errorCode()
errorCode(void)
{
return errorTypeCode(errorType());
}
@ -184,7 +184,7 @@ errorCode()
Error filename
***********************************************************************************************************************************/
const char *
errorFileName()
errorFileName(void)
{
return errorContext.error.fileName;
}
@ -193,7 +193,7 @@ errorFileName()
Error function name
***********************************************************************************************************************************/
const char *
errorFunctionName()
errorFunctionName(void)
{
return errorContext.error.functionName;
}
@ -202,7 +202,7 @@ errorFunctionName()
Error file line number
***********************************************************************************************************************************/
int
errorFileLine()
errorFileLine(void)
{
return errorContext.error.fileLine;
}
@ -211,7 +211,7 @@ errorFileLine()
Error message
***********************************************************************************************************************************/
const char *
errorMessage()
errorMessage(void)
{
return errorContext.error.message;
}
@ -220,7 +220,7 @@ errorMessage()
Error name (pulled from error type)
***********************************************************************************************************************************/
const char *
errorName()
errorName(void)
{
return errorTypeName(errorType());
}
@ -229,7 +229,7 @@ errorName()
Error stack trace
***********************************************************************************************************************************/
const char *
errorStackTrace()
errorStackTrace(void)
{
return errorContext.error.stackTrace;
}
@ -247,7 +247,7 @@ errorInstanceOf(const ErrorType *errorTypeTest)
Return current error context state
***********************************************************************************************************************************/
static ErrorState
errorInternalState()
errorInternalState(void)
{
return errorContext.tryList[errorContext.tryTotal].state;
}
@ -256,7 +256,7 @@ errorInternalState()
True when in try state
***********************************************************************************************************************************/
bool
errorInternalStateTry()
errorInternalStateTry(void)
{
return errorInternalState() == errorStateTry;
}
@ -277,7 +277,7 @@ errorInternalStateCatch(const ErrorType *errorTypeCatch)
True when in final state
***********************************************************************************************************************************/
bool
errorInternalStateFinal()
errorInternalStateFinal(void)
{
return errorInternalState() == errorStateFinal;
}
@ -286,7 +286,7 @@ errorInternalStateFinal()
Return jump buffer for current try
***********************************************************************************************************************************/
jmp_buf *
errorInternalJump()
errorInternalJump(void)
{
return &errorContext.jumpList[errorContext.tryTotal - 1];
}
@ -316,7 +316,7 @@ errorInternalTry(const char *fileName, const char *functionName, int fileLine)
Propogate the error up so it can be caught
***********************************************************************************************************************************/
void
errorInternalPropagate()
errorInternalPropagate(void)
{
// Mark the error as uncaught
errorContext.tryList[errorContext.tryTotal].uncaught = true;

View File

@ -65,20 +65,20 @@ bool errorTypeExtends(const ErrorType *child, const ErrorType *parent);
/***********************************************************************************************************************************
Functions to get information about the current error
***********************************************************************************************************************************/
const ErrorType *errorType();
int errorCode();
const char *errorFileName();
const char *errorFunctionName();
int errorFileLine();
const ErrorType *errorType(void);
int errorCode(void);
const char *errorFileName(void);
const char *errorFunctionName(void);
int errorFileLine(void);
bool errorInstanceOf(const ErrorType *errorTypeTest);
const char *errorMessage();
const char *errorName();
const char *errorStackTrace();
const char *errorMessage(void);
const char *errorName(void);
const char *errorStackTrace(void);
/***********************************************************************************************************************************
Functions to get information about the try stack
***********************************************************************************************************************************/
unsigned int errorTryDepth();
unsigned int errorTryDepth(void);
/***********************************************************************************************************************************
Begin a block where errors can be thrown
@ -171,12 +171,12 @@ Internal functions
These functions are used by the macros to implement the error handler and should never be called independently.
***********************************************************************************************************************************/
bool errorInternalTry(const char *fileName, const char *functionName, int fileLine);
jmp_buf *errorInternalJump();
bool errorInternalStateTry();
jmp_buf *errorInternalJump(void);
bool errorInternalStateTry(void);
bool errorInternalStateCatch(const ErrorType *errorTypeCatch);
bool errorInternalStateFinal();
bool errorInternalStateFinal(void);
bool errorInternalProcess(bool catch);
void errorInternalPropagate() __attribute__((__noreturn__));
void errorInternalPropagate(void) __attribute__((__noreturn__));
void errorInternalThrow(
const ErrorType *errorType, const char *fileName, const char *functionName, int fileLine, const char *message)
__attribute__((__noreturn__));

View File

@ -71,7 +71,7 @@ exitOnSignal(int signalType)
Setup signal handlers
***********************************************************************************************************************************/
void
exitInit()
exitInit(void)
{
FUNCTION_DEBUG_VOID(logLevelTrace);

View File

@ -20,7 +20,7 @@ typedef enum
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
void exitInit();
void exitInit(void);
int exitSafe(int result, bool error, SignalType signalType);
#endif

View File

@ -12,7 +12,7 @@ Fork a new process and detach it so it can continue running after the parent pro
startup because the parent process may continue to run and perform work for some time.
***********************************************************************************************************************************/
void
forkDetach()
forkDetach(void)
{
FUNCTION_DEBUG_VOID(logLevelTrace);

View File

@ -7,6 +7,6 @@ Fork Handler
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
void forkDetach();
void forkDetach(void);
#endif

View File

@ -24,7 +24,7 @@ struct Ini
Create a new Ini object
***********************************************************************************************************************************/
Ini *
iniNew()
iniNew(void)
{
Ini *this = NULL;

View File

@ -14,7 +14,7 @@ typedef struct Ini Ini;
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
Ini *iniNew();
Ini *iniNew(void);
const Variant *iniGet(const Ini *this, const String *section, const String *key);
const Variant *iniGetDefault(const Ini *this, const String *section, const String *key, Variant *defaultValue);
StringList *iniSectionKeyList(const Ini *this, const String *section);

View File

@ -23,7 +23,7 @@ struct IoFilterGroup
Create new filter group
***********************************************************************************************************************************/
IoFilterGroup *
ioFilterGroupNew()
ioFilterGroupNew(void)
{
FUNCTION_DEBUG_VOID(logLevelTrace);

View File

@ -15,7 +15,7 @@ typedef struct IoFilterGroup IoFilterGroup;
/***********************************************************************************************************************************
Constructor
***********************************************************************************************************************************/
IoFilterGroup *ioFilterGroupNew();
IoFilterGroup *ioFilterGroupNew(void);
/***********************************************************************************************************************************
Functions

View File

@ -21,7 +21,7 @@ static size_t bufferSize = (8 * IO_BUFFER_BLOCK_SIZE);
Get/set buffer size
***********************************************************************************************************************************/
size_t
ioBufferSize()
ioBufferSize(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RESULT(SIZE, bufferSize);

View File

@ -9,7 +9,7 @@ IO Functions
/***********************************************************************************************************************************
Getters/Setters
***********************************************************************************************************************************/
size_t ioBufferSize();
size_t ioBufferSize(void);
void ioBufferSizeSet(size_t bufferSize);
#endif

View File

@ -491,7 +491,7 @@ memContextSwitch(MemContext *this)
Return the top context
***********************************************************************************************************************************/
MemContext *
memContextTop()
memContextTop(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RESULT(MEM_CONTEXT, &contextTop);
@ -501,7 +501,7 @@ memContextTop()
Return the current context
***********************************************************************************************************************************/
MemContext *
memContextCurrent()
memContextCurrent(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RESULT(MEM_CONTEXT, contextCurrent);

View File

@ -72,8 +72,8 @@ void memContextFree(MemContext *this);
/***********************************************************************************************************************************
Memory context accessors
***********************************************************************************************************************************/
MemContext *memContextCurrent();
MemContext *memContextTop();
MemContext *memContextCurrent(void);
MemContext *memContextTop(void);
const char *memContextName(MemContext *this);
/***********************************************************************************************************************************

View File

@ -91,19 +91,19 @@ Flag to enable/disable test function logging
bool stackTraceTestFlag = true;
void
stackTraceTestStart()
stackTraceTestStart(void)
{
stackTraceTestFlag = true;
}
void
stackTraceTestStop()
stackTraceTestStop(void)
{
stackTraceTestFlag = false;
}
bool
stackTraceTest()
stackTraceTest(void)
{
return stackTraceTestFlag;
}
@ -248,7 +248,7 @@ stackTraceParamAdd(size_t bufferSize)
Mark that parameters are being logged -- it none appear then the function is void
***********************************************************************************************************************************/
void
stackTraceParamLog()
stackTraceParamLog(void)
{
ASSERT_DEBUG(stackSize > 0);
@ -261,7 +261,7 @@ Pop a function from the stack trace
#ifdef NDEBUG
void
stackTracePop()
stackTracePop(void)
{
stackSize--;
}

View File

@ -36,22 +36,22 @@ Internal Functions
#endif
#ifndef NDEBUG
void stackTraceTestStart();
void stackTraceTestStop();
bool stackTraceTest();
void stackTraceTestStart(void);
void stackTraceTestStop(void);
bool stackTraceTest(void);
#endif
LogLevel stackTracePush(const char *fileName, const char *functionName, LogLevel functionLogLevel);
#ifdef NDEBUG
void stackTracePop();
void stackTracePop(void);
#else
void stackTracePop(const char *fileName, const char *functionName);
#endif
size_t stackTraceToZ(char *buffer, size_t bufferSize, const char *fileName, const char *functionName, unsigned int fileLine);
void stackTraceParamLog();
const char *stackTraceParam();
void stackTraceParamLog(void);
const char *stackTraceParam(void);
char *stackTraceParamBuffer(const char *param);
void stackTraceParamAdd(size_t bufferSize);

View File

@ -16,7 +16,7 @@ Constants describing number of sub-units in an interval
Epoch time in milliseconds
***********************************************************************************************************************************/
TimeMSec
timeMSec()
timeMSec(void)
{
FUNCTION_TEST_VOID();

View File

@ -20,6 +20,6 @@ Constants describing number of sub-units in an interval
Functions
***********************************************************************************************************************************/
void sleepMSec(TimeMSec sleepMSec);
TimeMSec timeMSec();
TimeMSec timeMSec(void);
#endif

View File

@ -37,7 +37,7 @@ typedef struct KeyValuePair
Create a new key/value store
***********************************************************************************************************************************/
KeyValue *
kvNew()
kvNew(void)
{
FUNCTION_TEST_VOID();

View File

@ -14,7 +14,7 @@ typedef struct KeyValue KeyValue;
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
KeyValue *kvNew();
KeyValue *kvNew(void);
KeyValue *kvDup(const KeyValue *source);
KeyValue *kvAdd(KeyValue *this, const Variant *key, const Variant *value);
const VariantList *kvKeyList(const KeyValue *this);

View File

@ -16,7 +16,7 @@ String List Handler
Wrapper for lstNew()
***********************************************************************************************************************************/
StringList *
strLstNew()
strLstNew(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RESULT(STRING_LIST, (StringList *)lstNew(sizeof(String *)));

View File

@ -25,7 +25,7 @@ typedef enum
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
StringList *strLstNew();
StringList *strLstNew(void);
StringList *strLstNewSplit(const String *string, const String *delimiter);
StringList *strLstNewSplitZ(const String *string, const char *delimiter);
StringList *strLstNewSplitSize(const String *string, const String *delimiter, size_t size);

View File

@ -722,7 +722,7 @@ varUInt64Force(const Variant *this)
New key/value variant
***********************************************************************************************************************************/
Variant *
varNewKv()
varNewKv(void)
{
FUNCTION_TEST_VOID();

View File

@ -49,7 +49,7 @@ Variant *varNewInt64(int64_t data);
int64_t varInt64(const Variant *this);
int64_t varInt64Force(const Variant *this);
Variant *varNewKv();
Variant *varNewKv(void);
KeyValue *varKv(const Variant *this);
Variant *varNewStr(const String *data);

View File

@ -14,7 +14,7 @@ Variant List Handler
Wrapper for lstNew()
***********************************************************************************************************************************/
VariantList *
varLstNew()
varLstNew(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RESULT(VARIANT_LIST, (VariantList *)lstNew(sizeof(Variant *)));

View File

@ -15,7 +15,7 @@ typedef struct VariantList VariantList;
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
VariantList *varLstNew();
VariantList *varLstNew(void);
VariantList *varLstNewStrLst(const StringList *stringList);
VariantList *varLstDup(const VariantList *source);
VariantList *varLstAdd(VariantList *this, Variant *data);

View File

@ -119,7 +119,7 @@ static ConfigOptionValue configOptionValue[CFG_OPTION_TOTAL];
Initialize or reinitialize the configuration data
***********************************************************************************************************************************/
void
cfgInit()
cfgInit(void)
{
FUNCTION_TEST_VOID();
@ -155,7 +155,7 @@ cfgInit()
Get/set the current command
***********************************************************************************************************************************/
ConfigCommand
cfgCommand()
cfgCommand(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RESULT(ENUM, command);
@ -179,7 +179,7 @@ cfgCommandSet(ConfigCommand commandParam)
Was help requested?
***********************************************************************************************************************************/
bool
cfgCommandHelp()
cfgCommandHelp(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RESULT(BOOL, help);
@ -258,7 +258,7 @@ cfgCommandName(ConfigCommand commandId)
Command parameters, if any
***********************************************************************************************************************************/
const StringList *
cfgCommandParam()
cfgCommandParam(void)
{
FUNCTION_TEST_VOID();
@ -296,7 +296,7 @@ cfgCommandParamSet(const StringList *param)
Command parameters, if any
***********************************************************************************************************************************/
const String *
cfgExe()
cfgExe(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RESULT(STRING, exe);
@ -324,7 +324,7 @@ cfgExeSet(const String *exeParam)
Does this command require an immediate lock?
***********************************************************************************************************************************/
bool
cfgLockRequired()
cfgLockRequired(void)
{
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_ASSERT(command != cfgCmdNone);
@ -337,7 +337,7 @@ cfgLockRequired()
Get the lock type required for this command
***********************************************************************************************************************************/
LockType
cfgLockType()
cfgLockType(void)
{
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_ASSERT(command != cfgCmdNone);
@ -350,7 +350,7 @@ cfgLockType()
Does this command log to a file?
***********************************************************************************************************************************/
bool
cfgLogFile()
cfgLogFile(void)
{
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_ASSERT(command != cfgCmdNone);
@ -363,7 +363,7 @@ cfgLogFile()
Get default log level -- used for log messages that are common to all commands
***********************************************************************************************************************************/
LogLevel
cfgLogLevelDefault()
cfgLogLevelDefault(void)
{
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_ASSERT(command != cfgCmdNone);
@ -376,7 +376,7 @@ cfgLogLevelDefault()
Get max stderr log level -- used to suppress error output for higher log levels, e.g. local and remote commands
***********************************************************************************************************************************/
LogLevel
cfgLogLevelStdErrMax()
cfgLogLevelStdErrMax(void)
{
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_ASSERT(command != cfgCmdNone);

View File

@ -28,17 +28,17 @@ Command Functions
Access the current command and command parameters.
***********************************************************************************************************************************/
ConfigCommand cfgCommand();
ConfigCommand cfgCommand(void);
const char *cfgCommandName(ConfigCommand commandId);
bool cfgLockRequired();
LockType cfgLockType();
bool cfgLockRequired(void);
LockType cfgLockType(void);
bool cfgLogFile();
LogLevel cfgLogLevelDefault();
LogLevel cfgLogLevelStdErrMax();
bool cfgLogFile(void);
LogLevel cfgLogLevelDefault(void);
LogLevel cfgLogLevelStdErrMax(void);
const StringList *cfgCommandParam();
const StringList *cfgCommandParam(void);
/***********************************************************************************************************************************
Option Functions
@ -81,16 +81,16 @@ Load Functions
Used primarily by modules that need to manipulate the configuration. These modules include, but are not limited to, config/parse.c,
config/load.c, perl/config.c, and perl/exec.c.
***********************************************************************************************************************************/
void cfgInit();
void cfgInit(void);
ConfigDefineCommand cfgCommandDefIdFromId(ConfigCommand commandId);
bool cfgCommandHelp();
bool cfgCommandHelp(void);
void cfgCommandHelpSet(bool helpParam);
ConfigCommand cfgCommandId(const char *commandName);
void cfgCommandParamSet(const StringList *param);
void cfgCommandSet(ConfigCommand commandParam);
const String *cfgExe();
const String *cfgExe(void);
void cfgExeSet(const String *exeParam);
const Variant *cfgOptionDefault(ConfigOption optionId);

View File

@ -260,14 +260,14 @@ cfgDefDataFind(
Command and option define totals
***********************************************************************************************************************************/
unsigned int
cfgDefCommandTotal()
cfgDefCommandTotal(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RESULT(UINT, sizeof(configDefineCommandData) / sizeof(ConfigDefineCommandData));
}
unsigned int
cfgDefOptionTotal()
cfgDefOptionTotal(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RESULT(UINT, sizeof(configDefineOptionData) / sizeof(ConfigDefineOptionData));

View File

@ -26,7 +26,7 @@ Define global section name
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
unsigned int cfgDefCommandTotal();
unsigned int cfgDefCommandTotal(void);
void cfgDefCommandCheck(ConfigDefineCommand commandDefId);
const char *cfgDefCommandHelpDescription(ConfigDefineCommand commandDefId);
const char *cfgDefCommandHelpSummary(ConfigDefineCommand commandDefId);
@ -59,7 +59,7 @@ const char *cfgDefOptionPrefix(ConfigDefineOption optionDefId);
bool cfgDefOptionRequired(ConfigDefineCommand commandDefId, ConfigDefineOption optionDefId);
ConfigDefSection cfgDefOptionSection(ConfigDefineOption optionDefId);
bool cfgDefOptionSecure(ConfigDefineOption optionDefId);
unsigned int cfgDefOptionTotal();
unsigned int cfgDefOptionTotal(void);
int cfgDefOptionType(ConfigDefineOption optionDefId);
bool cfgDefOptionValid(ConfigDefineCommand commandDefId, ConfigDefineOption optionDefId);

View File

@ -18,7 +18,7 @@ Configuration Load
Load log settings
***********************************************************************************************************************************/
void
cfgLoadLogSetting()
cfgLoadLogSetting(void)
{
FUNCTION_DEBUG_VOID(logLevelTrace);
@ -55,7 +55,7 @@ cfgLoadLogSetting()
Update options that have complex rules
***********************************************************************************************************************************/
void
cfgLoadUpdateOption()
cfgLoadUpdateOption(void)
{
FUNCTION_DEBUG_VOID(logLevelTrace);

View File

@ -10,7 +10,7 @@ Configuration Load
Functions
***********************************************************************************************************************************/
void cfgLoad(unsigned int argListSize, const char *argList[]);
void cfgLoadLogSetting();
void cfgLoadUpdateOption();
void cfgLoadLogSetting(void);
void cfgLoadUpdateOption(void);
#endif

View File

@ -18,7 +18,7 @@ static bool cryptoInitDone = false;
Initialize ciphers
***********************************************************************************************************************************/
void
cryptoInit()
cryptoInit(void)
{
FUNCTION_DEBUG_VOID(logLevelTrace);
@ -37,7 +37,7 @@ cryptoInit()
Have the ciphers been initialized?
***********************************************************************************************************************************/
bool
cryptoIsInit()
cryptoIsInit(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RESULT(BOOL, cryptoInitDone);

View File

@ -9,7 +9,7 @@ Crypto Common
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
void cryptoInit();
bool cryptoIsInit();
void cryptoInit(void);
bool cryptoIsInit(void);
#endif

View File

@ -9,7 +9,7 @@ Perl Configuration
Build JSON output from options
***********************************************************************************************************************************/
String *
perlOptionJson()
perlOptionJson(void)
{
FUNCTION_TEST_VOID();

View File

@ -9,6 +9,6 @@ Perl Configuration
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
String *perlOptionJson();
String *perlOptionJson(void);
#endif

View File

@ -55,7 +55,7 @@ Constants used to build perl options
Build list of parameters to use for perl main
***********************************************************************************************************************************/
String *
perlMain()
perlMain(void)
{
FUNCTION_TEST_VOID();
@ -167,7 +167,7 @@ perlEval(const String *statement)
Initialize Perl
***********************************************************************************************************************************/
static void
perlInit()
perlInit(void)
{
FUNCTION_TEST_VOID();
@ -209,7 +209,7 @@ perlInit()
Execute main function in Perl
***********************************************************************************************************************************/
int
perlExec()
perlExec(void)
{
FUNCTION_DEBUG_VOID(logLevelDebug);

View File

@ -12,7 +12,7 @@ Error message for errors thrown from embedded Perl
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
int perlExec();
int perlExec(void);
void perlFree(int result);
#endif

View File

@ -29,7 +29,7 @@ static const String *storageSpoolStanza = NULL;
Create the storage helper memory context
***********************************************************************************************************************************/
static void
storageHelperInit()
storageHelperInit(void)
{
FUNCTION_TEST_VOID();
@ -49,7 +49,7 @@ storageHelperInit()
Get a local storage object
***********************************************************************************************************************************/
const Storage *
storageLocal()
storageLocal(void)
{
FUNCTION_TEST_VOID();
@ -73,7 +73,7 @@ Get a writable local storage object
This should be used very sparingly. If writes are not needed then always use storageLocal() or a specific storage object instead.
***********************************************************************************************************************************/
const Storage *
storageLocalWrite()
storageLocalWrite(void)
{
FUNCTION_TEST_VOID();
@ -130,7 +130,7 @@ storageSpoolPathExpression(const String *expression, const String *path)
Get a spool storage object
***********************************************************************************************************************************/
const Storage *
storageSpool()
storageSpool(void)
{
FUNCTION_TEST_VOID();

View File

@ -15,9 +15,9 @@ Spool storage path constants
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
const Storage *storageLocal();
const Storage *storageLocalWrite();
const Storage *storageLocal(void);
const Storage *storageLocalWrite(void);
const Storage *storageSpool();
const Storage *storageSpool(void);
#endif

View File

@ -85,7 +85,7 @@ storageCopy(StorageFileRead *source, StorageFileWrite *destination)
ioWriteOpen(storageFileWriteIo(destination));
// Copy data from source to destination
Buffer *read = bufNew(ioBufferSize(source));
Buffer *read = bufNew(ioBufferSize());
do
{
@ -183,7 +183,7 @@ storageGet(StorageFileRead *file, StorageGetParam param)
else
{
result = bufNew(0);
Buffer *read = bufNew(ioBufferSize(file));
Buffer *read = bufNew(ioBufferSize());
do
{

View File

@ -371,7 +371,7 @@ sub run
# ($self->{oTest}->{&TEST_VM} ne VM_CO6 && $self->{oTest}->{&TEST_VM} ne VM_U12 &&
# $self->{oTest}->{&TEST_MODULE} ne 'perl' && $self->{oTest}->{&TEST_NAME} ne 'exec' ?
# " -Wpedantic \\\n" : '') .
" -Wformat=2 -Wformat-nonliteral \\\n" .
" -Wformat=2 -Wformat-nonliteral -Wstrict-prototypes\\\n" .
" `perl -MExtUtils::Embed -e ccopts`\n" .
"LDFLAGS=-lcrypto" . (vmCoverage($self->{oTest}->{&TEST_VM}) && $self->{bCoverageUnit} ? " -lgcov" : '') .
(vmWithBackTrace($self->{oTest}->{&TEST_VM}) && $self->{bBackTrace} ? ' -lbacktrace' : '') .

View File

@ -62,7 +62,7 @@ harnessLogOpen(const char *logFile, int flags, int mode)
Initialize log for testing
***********************************************************************************************************************************/
void
harnessLogInit()
harnessLogInit(void)
{
FUNCTION_HARNESS_VOID();
@ -92,7 +92,7 @@ Reset test log level
Set back to info
***********************************************************************************************************************************/
void
harnessLogLevelReset()
harnessLogLevelReset(void)
{
logInit(logLevelTestDefault, logLevelOff, logLevelInfo, false);
}
@ -222,7 +222,7 @@ harnessLogResultRegExp(const char *expression)
Make sure nothing is left in the log after all tests have completed
***********************************************************************************************************************************/
void
harnessLogFinal()
harnessLogFinal(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -15,7 +15,7 @@ void harnessLogResultRegExp(const char *expression);
/***********************************************************************************************************************************
Setters
***********************************************************************************************************************************/
void harnessLogLevelReset();
void harnessLogLevelReset(void);
void harnessLogLevelSet(LogLevel logLevel);
#endif

View File

@ -29,15 +29,15 @@ static const char *testPathData = NULL;
Extern functions
***********************************************************************************************************************************/
#ifndef NO_LOG
void harnessLogInit();
void harnessLogFinal();
void harnessLogInit(void);
void harnessLogFinal(void);
#endif
/***********************************************************************************************************************************
Get and set the test exe
***********************************************************************************************************************************/
const char *
testExe()
testExe(void)
{
FUNCTION_HARNESS_VOID();
FUNCTION_HARNESS_RESULT(STRINGZ, testExeData);
@ -61,7 +61,7 @@ testExeSet(const char *testExe)
Get and set the test path, i.e., the path where this test should write its files
***********************************************************************************************************************************/
const char *
testPath()
testPath(void)
{
FUNCTION_HARNESS_VOID();
FUNCTION_HARNESS_RESULT(STRINGZ, testPathData);
@ -151,7 +151,7 @@ testBegin(const char *name)
testComplete - make sure all expected tests ran
***********************************************************************************************************************************/
void
testComplete()
testComplete(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -14,12 +14,12 @@ C Test Harness
// Functions
void testAdd(int run, bool selected);
bool testBegin(const char *name);
void testComplete();
void testComplete(void);
const char *testExe();
const char *testExe(void);
void testExeSet(const char *testExe);
const char *testPath();
const char *testPath(void);
void testPathSet(const char *testPath);
/***********************************************************************************************************************************

View File

@ -9,7 +9,7 @@ Test Archive Common
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -11,7 +11,7 @@ Test Archive Get Command
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -7,7 +7,7 @@ Test Archive Push Command
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -11,7 +11,7 @@ Test Common Command Routines
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Assert Macros and Routines when Disabled
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Assert Macros and Routines
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Debug Macros and Routines when Disabled
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,14 +6,14 @@ Test Debug Macros and Routines
#include "common/harnessLog.h"
static void
testFunction3()
testFunction3(void)
{
FUNCTION_TEST_VOID();
FUNCTION_TEST_RESULT_VOID();
}
static void
testFunction2()
testFunction2(void)
{
FUNCTION_DEBUG_VOID(logLevelTrace);
@ -41,7 +41,7 @@ testFunction1(int paramInt, bool paramBool, double paramDouble, mode_t paramMode
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Binary to String Encode/Decode
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -24,7 +24,7 @@ bool testTryRecurseCatch = false;
bool testTryRecurseFinally = false;
void
testTryRecurse()
testTryRecurse(void)
{
TRY_BEGIN()
{
@ -48,7 +48,7 @@ testTryRecurse()
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -11,7 +11,7 @@ Test Exit Routines
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -7,7 +7,7 @@ Test Fork Handler
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Ini
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -104,7 +104,7 @@ ioTestFilterSizeNew(const char *type)
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -9,7 +9,7 @@ Test Lock Handler
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -98,7 +98,7 @@ testLogResult(const char *logFile, const char *expected)
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -28,7 +28,7 @@ testFree(MemContext *this)
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Regular Expression Handler
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -7,7 +7,7 @@ Test Stack Trace Handler
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Time Management
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Buffers
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -7,7 +7,7 @@ Test Convert Base Data Types
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Key Value Data Type
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -24,7 +24,7 @@ testComparator(const void *item1, const void *item2)
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -7,7 +7,7 @@ Test String Lists
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -7,7 +7,7 @@ Test Strings
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Variant Lists
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -7,7 +7,7 @@ Test Variant Data Type
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -4,7 +4,7 @@ Test C Types
#include <assert.h>
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Wait Handler
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Configuration Commands and Options
Test run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Configuration Command and Option Definition
Test run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -19,7 +19,7 @@ extern bool logTimestamp;
Test run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -33,7 +33,7 @@ testOptionFind(const char *option, unsigned int value)
Test run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -16,7 +16,7 @@ Data for testing
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Crypto Common
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Cryptographic Hashes
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test Random
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -9,7 +9,7 @@ Test Help Command
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -7,7 +7,7 @@ Test Perl Exec
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -8,7 +8,7 @@ Test Perl Exec
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -6,7 +6,7 @@ Test PostgreSQL Info
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -22,7 +22,7 @@ testPage(unsigned int pageIdx)
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

View File

@ -8,7 +8,7 @@ Test Storage File
Test Run
***********************************************************************************************************************************/
void
testRun()
testRun(void)
{
FUNCTION_HARNESS_VOID();

Some files were not shown because too many files have changed in this diff Show More