1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-09-16 09:06:18 +02:00

Fix non-compliant formatting for function declarations.

Per review by Cynthia Shang.
This commit is contained in:
David Steele
2018-01-31 18:22:25 -05:00
parent b4d434b41c
commit 298b33988c
43 changed files with 130 additions and 61 deletions

View File

@@ -127,6 +127,14 @@
<release-item> <release-item>
<p>Refactor code to make valgrind happy.</p> <p>Refactor code to make valgrind happy.</p>
</release-item> </release-item>
<release-item>
<release-item-contributor-list>
<release-item-ideator id="shang.cynthia"/>
</release-item-contributor-list>
<p>Fix non-compliant formatting for function declarations.</p>
</release-item>
</release-development-list> </release-development-list>
</release-core-list> </release-core-list>

View File

@@ -15,7 +15,8 @@ static bool cipherInitDone = false;
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Initialize ciphers Initialize ciphers
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void cipherInit() void
cipherInit()
{ {
if (!cipherInitDone) if (!cipherInitDone)
{ {
@@ -29,7 +30,8 @@ void cipherInit()
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Have the ciphers been initialized? Have the ciphers been initialized?
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
bool cipherIsInit() bool
cipherIsInit()
{ {
return cipherInitDone; return cipherInitDone;
} }
@@ -37,7 +39,8 @@ bool cipherIsInit()
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Free ciphers Free ciphers
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void cipherFree() void
cipherFree()
{ {
if (cipherInitDone) if (cipherInitDone)
{ {

View File

@@ -11,7 +11,8 @@ Common Command Routines
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Begin the command Begin the command
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void cmdBegin() void
cmdBegin()
{ {
MEM_CONTEXT_TEMP_BEGIN() MEM_CONTEXT_TEMP_BEGIN()
{ {
@@ -65,7 +66,8 @@ void cmdBegin()
/*********************************************************************************************************************************** /***********************************************************************************************************************************
End the command End the command
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void cmdEnd(int code) void
cmdEnd(int code)
{ {
MEM_CONTEXT_TEMP_BEGIN() MEM_CONTEXT_TEMP_BEGIN()
{ {

View File

@@ -170,7 +170,8 @@ errorInternalJump()
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Begin the try block Begin the try block
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
bool errorInternalTry(const char *fileName, int fileLine) bool
errorInternalTry(const char *fileName, int fileLine)
{ {
// If try total has been exceeded then throw an error // If try total has been exceeded then throw an error
if (errorContext.tryTotal >= ERROR_TRY_MAX) if (errorContext.tryTotal >= ERROR_TRY_MAX)
@@ -190,7 +191,8 @@ bool errorInternalTry(const char *fileName, int fileLine)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Propogate the error up so it can be caught Propogate the error up so it can be caught
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void errorInternalPropagate() void
errorInternalPropagate()
{ {
// Mark the error as uncaught // Mark the error as uncaught
errorContext.tryList[errorContext.tryTotal].uncaught = true; errorContext.tryList[errorContext.tryTotal].uncaught = true;
@@ -212,7 +214,8 @@ void errorInternalPropagate()
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Process the error through each try and state Process the error through each try and state
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
bool errorInternalProcess(bool catch) bool
errorInternalProcess(bool catch)
{ {
// If a catch statement then return // If a catch statement then return
if (catch) if (catch)
@@ -249,7 +252,8 @@ bool errorInternalProcess(bool catch)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Throw an error Throw an error
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void errorInternalThrow(const ErrorType *errorType, const char *fileName, int fileLine, const char *format, ...) void
errorInternalThrow(const ErrorType *errorType, const char *fileName, int fileLine, const char *format, ...)
{ {
// Setup error data // Setup error data
errorContext.error.errorType = errorType; errorContext.error.errorType = errorType;
@@ -273,7 +277,8 @@ void errorInternalThrow(const ErrorType *errorType, const char *fileName, int fi
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Throw an error Throw an error
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void errorInternalThrowSys(int result, const ErrorType *errorType, const char *fileName, int fileLine, const char *format, ...) void
errorInternalThrowSys(int result, const ErrorType *errorType, const char *fileName, int fileLine, const char *format, ...)
{ {
// Only error if the result is not 0 // Only error if the result is not 0
if (result != 0) if (result != 0)

View File

@@ -133,7 +133,8 @@ errorTypeParent(const ErrorType *errorType)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Does the child error type extend the parent error type? Does the child error type extend the parent error type?
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
bool errorTypeExtends(const ErrorType *child, const ErrorType *parent) bool
errorTypeExtends(const ErrorType *child, const ErrorType *parent)
{ {
// Search for the parent // Search for the parent
for (; child && errorTypeParent(child) != child; child = (ErrorType *)errorTypeParent(child)) for (; child && errorTypeParent(child) != child; child = (ErrorType *)errorTypeParent(child))

View File

@@ -68,7 +68,8 @@ iniGetInternal(const Ini *this, const String *section, const String *key)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Get an ini value -- error if it does not exist Get an ini value -- error if it does not exist
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
const Variant *iniGet(const Ini *this, const String *section, const String *key) const Variant *
iniGet(const Ini *this, const String *section, const String *key)
{ {
// Get the value // Get the value
const Variant *result = iniGetInternal(this, section, key); const Variant *result = iniGetInternal(this, section, key);

View File

@@ -60,7 +60,8 @@ MemContext *contextCurrent = &contextTop;
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Wrapper around malloc() Wrapper around malloc()
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
static void *memAllocInternal(size_t size, bool zero) static void *
memAllocInternal(size_t size, bool zero)
{ {
// Allocate memory // Allocate memory
void *buffer = malloc(size); void *buffer = malloc(size);
@@ -80,7 +81,8 @@ static void *memAllocInternal(size_t size, bool zero)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Wrapper around realloc() Wrapper around realloc()
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
static void *memReAllocInternal(void *bufferOld, size_t sizeOld, size_t sizeNew, bool zeroNew) static void *
memReAllocInternal(void *bufferOld, size_t sizeOld, size_t sizeNew, bool zeroNew)
{ {
// Allocate memory // Allocate memory
void *bufferNew = realloc(bufferOld, sizeNew); void *bufferNew = realloc(bufferOld, sizeNew);
@@ -100,7 +102,8 @@ static void *memReAllocInternal(void *bufferOld, size_t sizeOld, size_t sizeNew,
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Wrapper around free() Wrapper around free()
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
static void memFreeInternal(void *buffer) static void
memFreeInternal(void *buffer)
{ {
// Error if pointer is null // Error if pointer is null
if(!buffer) if(!buffer)

View File

@@ -31,7 +31,8 @@ regExpError(int error)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
New regular expression handler New regular expression handler
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
RegExp *regExpNew(const String *expression) RegExp *
regExpNew(const String *expression)
{ {
RegExp *this = NULL; RegExp *this = NULL;
@@ -60,7 +61,8 @@ RegExp *regExpNew(const String *expression)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Match on a regular expression Match on a regular expression
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
bool regExpMatch(RegExp *this, const String *string) bool
regExpMatch(RegExp *this, const String *string)
{ {
// Test for a match // Test for a match
int result = regexec(&this->regExp, strPtr(string), 0, NULL, 0); int result = regexec(&this->regExp, strPtr(string), 0, NULL, 0);
@@ -75,7 +77,8 @@ bool regExpMatch(RegExp *this, const String *string)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Free regular expression Free regular expression
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void regExpFree(RegExp *this) void
regExpFree(RegExp *this)
{ {
if (this != NULL) if (this != NULL)
{ {
@@ -87,7 +90,8 @@ void regExpFree(RegExp *this)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Match a regular expression in one call for brevity Match a regular expression in one call for brevity
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
bool regExpMatchOne(const String *expression, const String *string) bool
regExpMatchOne(const String *expression, const String *string)
{ {
bool result = false; bool result = false;
RegExp *regExp = regExpNew(expression); RegExp *regExp = regExpNew(expression);

View File

@@ -270,7 +270,8 @@ strLstSort(StringList *this, SortOrder sortOrder)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Wrapper for lstFree() Wrapper for lstFree()
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void strLstFree(StringList *this) void
strLstFree(StringList *this)
{ {
if (this != NULL) if (this != NULL)
lstFree((List *)this); lstFree((List *)this);

View File

@@ -86,7 +86,8 @@ varLstSize(const VariantList *this)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Wrapper for lstFree() Wrapper for lstFree()
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void varLstFree(VariantList *this) void
varLstFree(VariantList *this)
{ {
lstFree((List *)this); lstFree((List *)this);
} }

View File

@@ -14,7 +14,8 @@ Main
#include "perl/exec.h" #include "perl/exec.h"
#include "version.h" #include "version.h"
int main(int argListSize, const char *argList[]) int
main(int argListSize, const char *argList[])
{ {
TRY_BEGIN() TRY_BEGIN()
{ {

View File

@@ -27,7 +27,8 @@ Constants used to build perl options
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Build list of perl options to use for exec Build list of perl options to use for exec
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
StringList *perlCommand() StringList *
perlCommand()
{ {
// Begin arg list for perl exec // Begin arg list for perl exec
StringList *perlArgList = strLstNew(); StringList *perlArgList = strLstNew();
@@ -175,7 +176,8 @@ StringList *perlCommand()
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Exec supplied Perl options Exec supplied Perl options
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void perlExec(StringList *perlArgList) void
perlExec(StringList *perlArgList)
{ {
// Exec perl with supplied arguments // Exec perl with supplied arguments
execvp(strPtr(strLstGet(perlArgList, 0)), (char **)strLstPtr(perlArgList)); execvp(strPtr(strLstGet(perlArgList, 0)), (char **)strLstPtr(perlArgList));

View File

@@ -82,7 +82,8 @@ storageReadError(ssize_t actualBytes, const String *file)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Read from storage into a buffer Read from storage into a buffer
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
Buffer *storageGet(const Storage *storage, const String *fileExp, bool ignoreMissing) Buffer *
storageGet(const Storage *storage, const String *fileExp, bool ignoreMissing)
{ {
Buffer volatile *result = NULL; Buffer volatile *result = NULL;
volatile int fileHandle = -1; volatile int fileHandle = -1;
@@ -156,7 +157,8 @@ Buffer *storageGet(const Storage *storage, const String *fileExp, bool ignoreMis
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Get a list of files from a directory Get a list of files from a directory
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
StringList *storageList(const Storage *storage, const String *pathExp, const String *expression, bool ignoreMissing) StringList *
storageList(const Storage *storage, const String *pathExp, const String *expression, bool ignoreMissing)
{ {
StringList *result = NULL; StringList *result = NULL;
@@ -230,7 +232,8 @@ StringList *storageList(const Storage *storage, const String *pathExp, const Str
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Get the absolute path in the storage Get the absolute path in the storage
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
String *storagePath(const Storage *storage, const String *pathExp) String *
storagePath(const Storage *storage, const String *pathExp)
{ {
String *result = NULL; String *result = NULL;
@@ -341,7 +344,8 @@ storageWriteError(ssize_t actualBytes, size_t expectedBytes, const String *file)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Write a buffer to storage Write a buffer to storage
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void storagePut(const Storage *storage, const String *fileExp, const Buffer *buffer) void
storagePut(const Storage *storage, const String *fileExp, const Buffer *buffer)
{ {
volatile int fileHandle = -1; volatile int fileHandle = -1;
String *file = NULL; String *file = NULL;

View File

@@ -8,7 +8,8 @@ Test Archive Push Command
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("walStatus()")) if (testBegin("walStatus()"))

View File

@@ -18,7 +18,8 @@ Data for testing
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ----------------------------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------------------------
if (testBegin("blockCipherNew() and blockCipherFree()")) if (testBegin("blockCipherNew() and blockCipherFree()"))

View File

@@ -5,7 +5,8 @@ Test Random
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ----------------------------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------------------------
if (testBegin("randomBytes()")) if (testBegin("randomBytes()"))

View File

@@ -10,7 +10,8 @@ Test Common Command Routines
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("cmdBegin() and cmdEnd()")) if (testBegin("cmdBegin() and cmdEnd()"))

View File

@@ -5,7 +5,8 @@ Test Binary to String Encode/Decode
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ----------------------------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------------------------
if (testBegin("base64")) if (testBegin("base64"))

View File

@@ -9,7 +9,8 @@ volatile int testTryRecurseTotal = 0;
bool testTryRecurseCatch = false; bool testTryRecurseCatch = false;
bool testTryRecurseFinally = false; bool testTryRecurseFinally = false;
void testTryRecurse() void
testTryRecurse()
{ {
TRY_BEGIN() TRY_BEGIN()
{ {
@@ -32,7 +33,8 @@ void testTryRecurse()
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ----------------------------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------------------------
if (testBegin("check that try stack is initialized correctly")) if (testBegin("check that try stack is initialized correctly"))

View File

@@ -6,7 +6,8 @@ Test Exit Routines
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("exitSafe()")) if (testBegin("exitSafe()"))

View File

@@ -5,7 +5,8 @@ Test Ini
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("iniNew() and iniFree()")) if (testBegin("iniNew() and iniFree()"))

View File

@@ -10,7 +10,8 @@ Test Log Handler
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("logLevelEnum() and logLevelStr()")) if (testBegin("logLevelEnum() and logLevelStr()"))

View File

@@ -7,7 +7,8 @@ testFree - test callback function
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
MemContext *memContextCallbackArgument = NULL; MemContext *memContextCallbackArgument = NULL;
void testFree(MemContext *this) void
testFree(MemContext *this)
{ {
TEST_RESULT_INT(this->state, memContextStateFreeing, "state should be freeing before memContextFree() in callback"); TEST_RESULT_INT(this->state, memContextStateFreeing, "state should be freeing before memContextFree() in callback");
memContextFree(this); memContextFree(this);
@@ -26,7 +27,8 @@ void testFree(MemContext *this)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ----------------------------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------------------------
if (testBegin("memAllocInternal(), memReAllocInternal(), and memFreeInternal()")) if (testBegin("memAllocInternal(), memReAllocInternal(), and memFreeInternal()"))

View File

@@ -5,7 +5,8 @@ Test Regular Expression Handler
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("regExpNew(), regExpMatch(), and regExpFree()")) if (testBegin("regExpNew(), regExpMatch(), and regExpFree()"))

View File

@@ -5,7 +5,8 @@ Test Time Management
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("timeUSec()")) if (testBegin("timeUSec()"))

View File

@@ -5,7 +5,8 @@ Test Buffers
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("bufNew(), bufNewStr(), bufSize(), bufPtr(), and bufFree()")) if (testBegin("bufNew(), bufNewStr(), bufSize(), bufPtr(), and bufFree()"))

View File

@@ -5,7 +5,8 @@ Test Key Value Data Type
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ----------------------------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------------------------
if (testBegin("kvNew() and kvFree()")) if (testBegin("kvNew() and kvFree()"))

View File

@@ -23,7 +23,8 @@ testComparator(const void *item1, const void *item2)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("lstNew() and lstFree()")) if (testBegin("lstNew() and lstFree()"))

View File

@@ -5,7 +5,8 @@ Test String Lists
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("strLstNew(), strLstAdd, strLstGet(), strLstSize(), and strLstFree()")) if (testBegin("strLstNew(), strLstAdd, strLstGet(), strLstSize(), and strLstFree()"))

View File

@@ -6,7 +6,8 @@ Test Strings
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("strNew(), strNewBuf(), strNewN(), and strFree()")) if (testBegin("strNew(), strNewBuf(), strNewN(), and strFree()"))

View File

@@ -1,7 +1,8 @@
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Types Test Types
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ----------------------------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------------------------
if (testBegin("test int size")) if (testBegin("test int size"))

View File

@@ -5,7 +5,8 @@ Test Variant Lists
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("varLstNew(), varLstAdd(), varLstSize(), varLstGet(), and varListFree()")) if (testBegin("varLstNew(), varLstAdd(), varLstSize(), varLstGet(), and varListFree()"))

View File

@@ -5,7 +5,8 @@ Test Variant Data Type
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ----------------------------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------------------------
if (testBegin("bool")) if (testBegin("bool"))

View File

@@ -5,7 +5,8 @@ Test Wait Handler
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("waitNew(), waitMore, and waitFree()")) if (testBegin("waitNew(), waitMore, and waitFree()"))

View File

@@ -5,7 +5,8 @@ Test Configuration Commands and Options
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test run Test run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// Static tests against known values -- these may break as options change so will need to be kept up to date. The tests have // Static tests against known values -- these may break as options change so will need to be kept up to date. The tests have
// generally been selected to favor values that are not expected to change but adjustments are welcome as long as the type of // generally been selected to favor values that are not expected to change but adjustments are welcome as long as the type of

View File

@@ -5,7 +5,8 @@ Test Configuration Command and Option Definition
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test run Test run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// Static tests against known values -- these may break as options change so will need to be kept up to date. The tests have // Static tests against known values -- these may break as options change so will need to be kept up to date. The tests have
// generally been selected to favor values that are not expected to change but adjustments are welcome as long as the type of // generally been selected to favor values that are not expected to change but adjustments are welcome as long as the type of

View File

@@ -6,7 +6,8 @@ Test Configuration Load
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test run Test run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("cfgLoad()")) if (testBegin("cfgLoad()"))

View File

@@ -12,7 +12,8 @@ Test Configuration Parse
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test run Test run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ----------------------------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------------------------
if (testBegin("configParse()")) if (testBegin("configParse()"))

View File

@@ -8,7 +8,8 @@ Test Help Command
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// Program name a version are used multiple times // Program name a version are used multiple times
const char *helpVersion = PGBACKREST_NAME " " PGBACKREST_VERSION; const char *helpVersion = PGBACKREST_NAME " " PGBACKREST_VERSION;

View File

@@ -12,7 +12,8 @@ Test Perl Exec
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ----------------------------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------------------------
if (testBegin("perlCommand()")) if (testBegin("perlCommand()"))

View File

@@ -10,7 +10,8 @@ Page data for testing -- use 8192 for page size since this is the most common va
// GCC doesn't like this elements of this array being used as both char * and struct * so wrap it in a function to disable the // GCC doesn't like this elements of this array being used as both char * and struct * so wrap it in a function to disable the
// optimizations that cause warnings // optimizations that cause warnings
unsigned char *testPage(int pageIdx) unsigned char *
testPage(int pageIdx)
{ {
static unsigned char testPageBuffer[TEST_PAGE_TOTAL][TEST_PAGE_SIZE]; static unsigned char testPageBuffer[TEST_PAGE_TOTAL][TEST_PAGE_SIZE];
return testPageBuffer[pageIdx]; return testPageBuffer[pageIdx];
@@ -19,7 +20,8 @@ unsigned char *testPage(int pageIdx)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ----------------------------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------------------------
if (testBegin("pageChecksum()")) if (testBegin("pageChecksum()"))

View File

@@ -5,7 +5,8 @@ Test Storage Helper
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ----------------------------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------------------------
if (testBegin("storageLocal()")) if (testBegin("storageLocal()"))

View File

@@ -21,7 +21,8 @@ storageTestPathExpression(const String *expression, const String *path)
/*********************************************************************************************************************************** /***********************************************************************************************************************************
Test Run Test Run
***********************************************************************************************************************************/ ***********************************************************************************************************************************/
void testRun() void
testRun()
{ {
// ***************************************************************************************************************************** // *****************************************************************************************************************************
if (testBegin("storageNew()")) if (testBegin("storageNew()"))