From b956c955bc474e31f8664af55208440f07b907db Mon Sep 17 00:00:00 2001 From: Martin Ebourne Date: Thu, 23 Apr 2009 00:38:39 +0000 Subject: Fixes for gcc 4.4. --- lib/common/Test.cpp | 2 +- lib/common/Test.h | 2 +- lib/raidfile/RaidFileUtil.h | 2 +- lib/server/ServerControl.cpp | 1 + test/backupdiff/difftestfiles.cpp | 1 + test/bbackupd/testbbackupd.cpp | 2 +- test/common/testcommon.cpp | 2 +- test/raidfile/testraidfile.cpp | 1 + 8 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/common/Test.cpp b/lib/common/Test.cpp index e903f41e..787cf0a2 100644 --- a/lib/common/Test.cpp +++ b/lib/common/Test.cpp @@ -416,7 +416,7 @@ void terminate_bbackupd(int pid) // Wait a given number of seconds for something to complete -void wait_for_operation(int seconds, char* message) +void wait_for_operation(int seconds, const char* message) { if (Logging::GetGlobalLevel() >= Log::TRACE) { diff --git a/lib/common/Test.h b/lib/common/Test.h index 344af979..ce967041 100644 --- a/lib/common/Test.h +++ b/lib/common/Test.h @@ -158,7 +158,7 @@ void sync_and_wait(); void terminate_bbackupd(int pid); // Wait a given number of seconds for something to complete -void wait_for_operation(int seconds, char* message); +void wait_for_operation(int seconds, const char* message); void safe_sleep(int seconds); #endif // TEST__H diff --git a/lib/raidfile/RaidFileUtil.h b/lib/raidfile/RaidFileUtil.h index 16670bf1..a581047c 100644 --- a/lib/raidfile/RaidFileUtil.h +++ b/lib/raidfile/RaidFileUtil.h @@ -37,7 +37,7 @@ public: AsRaidWithMissingNotRecoverable = 4 } ExistType; - typedef enum + enum { Stripe1Exists = 1, Stripe2Exists = 2, diff --git a/lib/server/ServerControl.cpp b/lib/server/ServerControl.cpp index c4668b57..b9650cee 100644 --- a/lib/server/ServerControl.cpp +++ b/lib/server/ServerControl.cpp @@ -1,6 +1,7 @@ #include "Box.h" #include +#include #ifdef HAVE_SYS_TYPES_H #include diff --git a/test/backupdiff/difftestfiles.cpp b/test/backupdiff/difftestfiles.cpp index 881876ca..33690f6b 100644 --- a/test/backupdiff/difftestfiles.cpp +++ b/test/backupdiff/difftestfiles.cpp @@ -10,6 +10,7 @@ #include "Box.h" #include +#include #include "FileStream.h" #include "PartialReadStream.h" diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp index 91c883cc..d69741bb 100644 --- a/test/bbackupd/testbbackupd.cpp +++ b/test/bbackupd/testbbackupd.cpp @@ -87,7 +87,7 @@ // two cycles and a bit #define TIME_TO_WAIT_FOR_BACKUP_OPERATION 12 -void wait_for_backup_operation(char* message) +void wait_for_backup_operation(const char* message) { wait_for_operation(TIME_TO_WAIT_FOR_BACKUP_OPERATION, message); } diff --git a/test/common/testcommon.cpp b/test/common/testcommon.cpp index da2133cd..e633969b 100644 --- a/test/common/testcommon.cpp +++ b/test/common/testcommon.cpp @@ -368,7 +368,7 @@ int test(int argc, const char *argv[]) // Leave timers initialised for rest of test. // Test main() will cleanup after test finishes. - static char *testfilelines[] = + static const char *testfilelines[] = { "First line", "Second line", diff --git a/test/raidfile/testraidfile.cpp b/test/raidfile/testraidfile.cpp index f15fec27..530fb7f8 100644 --- a/test/raidfile/testraidfile.cpp +++ b/test/raidfile/testraidfile.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #ifdef HAVE_SYSCALL -- cgit v1.2.3