mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-03-03 14:52:21 +02:00
Disable -Wclobber compiler warning.
...because it is mostly useless but keep the rest of of -Wextra.
This commit is contained in:
parent
dc1a5c18ac
commit
3b43047e0d
@ -82,6 +82,10 @@
|
||||
<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>
|
||||
</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-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); \
|
||||
\
|
||||
/* 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_BEGIN()
|
||||
|
@ -93,8 +93,6 @@ INCLUDE: const-xs.inc
|
||||
#
|
||||
# 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/random.xs
|
||||
INCLUDE: xs/common/encode.xs
|
||||
|
@ -100,7 +100,7 @@ WriteMakefile
|
||||
AUTHOR => 'David Steele <david@pgbackrest.org>',
|
||||
|
||||
CCFLAGS => join(' ', qw(
|
||||
-Wfatal-errors -Wall -Wextra -Wwrite-strings
|
||||
-Wfatal-errors -Wall -Wextra -Wwrite-strings -Wno-clobbered
|
||||
-o $@
|
||||
-std=c99
|
||||
-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);
|
||||
|
||||
// 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)
|
||||
digest = EVP_get_digestbyname(digestName);
|
||||
|
@ -75,7 +75,7 @@ Check that the encoded string is valid
|
||||
bool
|
||||
decodeToBinValid(EncodeType encodeType, const char *source)
|
||||
{
|
||||
volatile bool valid = true;
|
||||
bool valid = true;
|
||||
|
||||
TRY_BEGIN()
|
||||
{
|
||||
|
@ -316,7 +316,7 @@ sub run
|
||||
|
||||
my $strGccCommand =
|
||||
'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 ' : '') .
|
||||
"-I/$self->{strBackRestBase}/src -I/$self->{strBackRestBase}/test/src test.c " .
|
||||
"/$self->{strBackRestBase}/test/src/common/harnessTest.c " .
|
||||
|
@ -5,7 +5,7 @@ Test Error Handling
|
||||
/***********************************************************************************************************************************
|
||||
testTryRecurse - test to blow up try stack
|
||||
***********************************************************************************************************************************/
|
||||
int testTryRecurseTotal = 0;
|
||||
volatile int testTryRecurseTotal = 0;
|
||||
bool testTryRecurseCatch = false;
|
||||
bool testTryRecurseFinally = false;
|
||||
|
||||
@ -43,7 +43,7 @@ void testRun()
|
||||
// -----------------------------------------------------------------------------------------------------------------------------
|
||||
if (testBegin("TRY with no errors"))
|
||||
{
|
||||
bool tryDone = false;
|
||||
volatile bool tryDone = false;
|
||||
bool catchDone = false;
|
||||
bool finallyDone = false;
|
||||
|
||||
@ -72,9 +72,9 @@ void testRun()
|
||||
// -----------------------------------------------------------------------------------------------------------------------------
|
||||
if (testBegin("TRY with multiple catches"))
|
||||
{
|
||||
bool tryDone = false;
|
||||
bool catchDone = false;
|
||||
bool finallyDone = false;
|
||||
volatile bool tryDone = false;
|
||||
volatile bool catchDone = false;
|
||||
volatile bool finallyDone = false;
|
||||
|
||||
TRY_BEGIN()
|
||||
{
|
||||
@ -136,7 +136,7 @@ void testRun()
|
||||
// -----------------------------------------------------------------------------------------------------------------------------
|
||||
if (testBegin("too deep recursive TRY_ERROR()"))
|
||||
{
|
||||
bool tryDone = false;
|
||||
volatile bool tryDone = false;
|
||||
bool catchDone = false;
|
||||
bool finallyDone = false;
|
||||
|
||||
|
@ -244,7 +244,7 @@ void testRun()
|
||||
// ------------------------------------------------------------------------------------------------------------------------
|
||||
// Successful context new block
|
||||
const char *memContextTestName = "test-new-block";
|
||||
MemContext *memContext;
|
||||
MemContext *memContext = NULL;
|
||||
|
||||
MEM_CONTEXT_NEW_BEGIN(memContextTestName)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user