You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-15 01:04:37 +02:00
Disable -Wclobber compiler warning.
...because it is mostly useless but keep the rest of of -Wextra.
This commit is contained in:
@ -82,6 +82,10 @@
|
|||||||
<release-item>
|
<release-item>
|
||||||
<p>Improve base64 implementation. Different encoded strings could be generated based on compiler optimizations. Even though decoding was still successful the encoded strings did not match the standard.</p>
|
<p>Improve base64 implementation. Different encoded strings could be generated based on compiler optimizations. Even though decoding was still successful the encoded strings did not match the standard.</p>
|
||||||
</release-item>
|
</release-item>
|
||||||
|
|
||||||
|
<release-item>
|
||||||
|
<p>Disable <id>-Wclobber</id> compiler warning because it is mostly useless but keep the rest of of <id>-Wextra</id>.</p>
|
||||||
|
</release-item>
|
||||||
</release-refactor-list>
|
</release-refactor-list>
|
||||||
</release-core-list>
|
</release-core-list>
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ Core context handling macros, only intended to be called from other macros
|
|||||||
MemContext *MEM_CONTEXT_XS_memContextOld = memContextSwitch(memContext); \
|
MemContext *MEM_CONTEXT_XS_memContextOld = memContextSwitch(memContext); \
|
||||||
\
|
\
|
||||||
/* Store any errors to be croaked to Perl at the end */ \
|
/* Store any errors to be croaked to Perl at the end */ \
|
||||||
volatile bool MEM_CONTEXT_XS_croak = false; \
|
bool MEM_CONTEXT_XS_croak = false; \
|
||||||
\
|
\
|
||||||
/* Try the statement block */ \
|
/* Try the statement block */ \
|
||||||
TRY_BEGIN()
|
TRY_BEGIN()
|
||||||
|
@ -93,8 +93,6 @@ INCLUDE: const-xs.inc
|
|||||||
#
|
#
|
||||||
# These modules should map 1-1 with C modules in src directory.
|
# These modules should map 1-1 with C modules in src directory.
|
||||||
# ----------------------------------------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------------------------------------
|
||||||
#pragma GCC diagnostic ignored "-Wclobbered"
|
|
||||||
|
|
||||||
INCLUDE: xs/cipher/block.xs
|
INCLUDE: xs/cipher/block.xs
|
||||||
INCLUDE: xs/cipher/random.xs
|
INCLUDE: xs/cipher/random.xs
|
||||||
INCLUDE: xs/common/encode.xs
|
INCLUDE: xs/common/encode.xs
|
||||||
|
@ -100,7 +100,7 @@ WriteMakefile
|
|||||||
AUTHOR => 'David Steele <david@pgbackrest.org>',
|
AUTHOR => 'David Steele <david@pgbackrest.org>',
|
||||||
|
|
||||||
CCFLAGS => join(' ', qw(
|
CCFLAGS => join(' ', qw(
|
||||||
-Wfatal-errors -Wall -Wextra -Wwrite-strings
|
-Wfatal-errors -Wall -Wextra -Wwrite-strings -Wno-clobbered
|
||||||
-o $@
|
-o $@
|
||||||
-std=c99
|
-std=c99
|
||||||
-D_FILE_OFFSET_BITS=64
|
-D_FILE_OFFSET_BITS=64
|
||||||
|
@ -69,7 +69,7 @@ cipherBlockNew(CipherMode mode, const char *cipherName, const unsigned char *pas
|
|||||||
THROW(AssertError, "unable to load cipher '%s'", cipherName);
|
THROW(AssertError, "unable to load cipher '%s'", cipherName);
|
||||||
|
|
||||||
// Lookup digest. If not defined it will be set to sha1.
|
// Lookup digest. If not defined it will be set to sha1.
|
||||||
const EVP_MD *volatile digest = digest = EVP_sha1();
|
const EVP_MD *digest = digest = EVP_sha1();
|
||||||
|
|
||||||
if (digestName)
|
if (digestName)
|
||||||
digest = EVP_get_digestbyname(digestName);
|
digest = EVP_get_digestbyname(digestName);
|
||||||
|
@ -75,7 +75,7 @@ Check that the encoded string is valid
|
|||||||
bool
|
bool
|
||||||
decodeToBinValid(EncodeType encodeType, const char *source)
|
decodeToBinValid(EncodeType encodeType, const char *source)
|
||||||
{
|
{
|
||||||
volatile bool valid = true;
|
bool valid = true;
|
||||||
|
|
||||||
TRY_BEGIN()
|
TRY_BEGIN()
|
||||||
{
|
{
|
||||||
|
@ -316,7 +316,7 @@ sub run
|
|||||||
|
|
||||||
my $strGccCommand =
|
my $strGccCommand =
|
||||||
'gcc -std=c99 -fprofile-arcs -ftest-coverage -fPIC -O0 ' .
|
'gcc -std=c99 -fprofile-arcs -ftest-coverage -fPIC -O0 ' .
|
||||||
'-Wfatal-errors -Wall -Wextra -Wwrite-strings ' .
|
'-Wfatal-errors -Wall -Wextra -Wwrite-strings -Wno-clobbered ' .
|
||||||
($self->{oTest}->{&TEST_VM} ne VM_CO6 && $self->{oTest}->{&TEST_VM} ne VM_U12 ? '-Wpedantic ' : '') .
|
($self->{oTest}->{&TEST_VM} ne VM_CO6 && $self->{oTest}->{&TEST_VM} ne VM_U12 ? '-Wpedantic ' : '') .
|
||||||
"-I/$self->{strBackRestBase}/src -I/$self->{strBackRestBase}/test/src test.c " .
|
"-I/$self->{strBackRestBase}/src -I/$self->{strBackRestBase}/test/src test.c " .
|
||||||
"/$self->{strBackRestBase}/test/src/common/harnessTest.c " .
|
"/$self->{strBackRestBase}/test/src/common/harnessTest.c " .
|
||||||
|
@ -5,7 +5,7 @@ Test Error Handling
|
|||||||
/***********************************************************************************************************************************
|
/***********************************************************************************************************************************
|
||||||
testTryRecurse - test to blow up try stack
|
testTryRecurse - test to blow up try stack
|
||||||
***********************************************************************************************************************************/
|
***********************************************************************************************************************************/
|
||||||
int testTryRecurseTotal = 0;
|
volatile int testTryRecurseTotal = 0;
|
||||||
bool testTryRecurseCatch = false;
|
bool testTryRecurseCatch = false;
|
||||||
bool testTryRecurseFinally = false;
|
bool testTryRecurseFinally = false;
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ void testRun()
|
|||||||
// -----------------------------------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------------------------------
|
||||||
if (testBegin("TRY with no errors"))
|
if (testBegin("TRY with no errors"))
|
||||||
{
|
{
|
||||||
bool tryDone = false;
|
volatile bool tryDone = false;
|
||||||
bool catchDone = false;
|
bool catchDone = false;
|
||||||
bool finallyDone = false;
|
bool finallyDone = false;
|
||||||
|
|
||||||
@ -72,9 +72,9 @@ void testRun()
|
|||||||
// -----------------------------------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------------------------------
|
||||||
if (testBegin("TRY with multiple catches"))
|
if (testBegin("TRY with multiple catches"))
|
||||||
{
|
{
|
||||||
bool tryDone = false;
|
volatile bool tryDone = false;
|
||||||
bool catchDone = false;
|
volatile bool catchDone = false;
|
||||||
bool finallyDone = false;
|
volatile bool finallyDone = false;
|
||||||
|
|
||||||
TRY_BEGIN()
|
TRY_BEGIN()
|
||||||
{
|
{
|
||||||
@ -136,7 +136,7 @@ void testRun()
|
|||||||
// -----------------------------------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------------------------------
|
||||||
if (testBegin("too deep recursive TRY_ERROR()"))
|
if (testBegin("too deep recursive TRY_ERROR()"))
|
||||||
{
|
{
|
||||||
bool tryDone = false;
|
volatile bool tryDone = false;
|
||||||
bool catchDone = false;
|
bool catchDone = false;
|
||||||
bool finallyDone = false;
|
bool finallyDone = false;
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ void testRun()
|
|||||||
// ------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------
|
||||||
// Successful context new block
|
// Successful context new block
|
||||||
const char *memContextTestName = "test-new-block";
|
const char *memContextTestName = "test-new-block";
|
||||||
MemContext *memContext;
|
MemContext *memContext = NULL;
|
||||||
|
|
||||||
MEM_CONTEXT_NEW_BEGIN(memContextTestName)
|
MEM_CONTEXT_NEW_BEGIN(memContextTestName)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user