summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Summers <ben@fluffy.co.uk>2006-02-01 19:50:54 +0000
committerBen Summers <ben@fluffy.co.uk>2006-02-01 19:50:54 +0000
commit45d64d4d38b698f0945fd04f1fce484e008dba99 (patch)
treeda0fc6d9ba24d00f2ee787c6420a565e9db031e6 /lib
parentcea3d8219a4b025e63238e08421cc1b6da74e796 (diff)
Get rid of the non-test compiler warnings seen on Darwin with gcc4
Diffstat (limited to 'lib')
-rw-r--r--lib/backupclient/BackupStoreDirectory.cpp2
-rw-r--r--lib/backupclient/BackupStoreFile.cpp24
-rw-r--r--lib/backupclient/BackupStoreFile.h3
-rw-r--r--lib/backupclient/BackupStoreFileDiff.cpp6
-rw-r--r--lib/crypto/Random.cpp2
5 files changed, 33 insertions, 4 deletions
diff --git a/lib/backupclient/BackupStoreDirectory.cpp b/lib/backupclient/BackupStoreDirectory.cpp
index 6b5a55d1..61e6461d 100644
--- a/lib/backupclient/BackupStoreDirectory.cpp
+++ b/lib/backupclient/BackupStoreDirectory.cpp
@@ -36,7 +36,7 @@ typedef struct
// Then a StreamableMemBlock for attributes
} dir_StreamFormat;
-enum
+typedef enum
{
Option_DependencyInfoPresent = 1
} dir_StreamFormatOptions;
diff --git a/lib/backupclient/BackupStoreFile.cpp b/lib/backupclient/BackupStoreFile.cpp
index 28d88d27..fd1a8918 100644
--- a/lib/backupclient/BackupStoreFile.cpp
+++ b/lib/backupclient/BackupStoreFile.cpp
@@ -1499,3 +1499,27 @@ void BackupStoreFile::EncodingBuffer::Reallocate(int NewSize)
}
+// --------------------------------------------------------------------------
+//
+// Function
+// Name: DiffTimer::DiffTimer();
+// Purpose: Constructor
+// Created: 2005/02/01
+//
+// --------------------------------------------------------------------------
+DiffTimer::DiffTimer()
+{
+}
+
+
+// --------------------------------------------------------------------------
+//
+// Function
+// Name: DiffTimer::DiffTimer();
+// Purpose: Destructor
+// Created: 2005/02/01
+//
+// --------------------------------------------------------------------------
+DiffTimer::~DiffTimer()
+{
+}
diff --git a/lib/backupclient/BackupStoreFile.h b/lib/backupclient/BackupStoreFile.h
index 27b2ef98..437b4232 100644
--- a/lib/backupclient/BackupStoreFile.h
+++ b/lib/backupclient/BackupStoreFile.h
@@ -47,6 +47,9 @@ typedef struct
class DiffTimer
{
public:
+ DiffTimer();
+ virtual ~DiffTimer();
+public:
virtual void DoKeepAlive() = 0;
virtual time_t GetTimeMgmtEpoch() = 0;
virtual int GetMaximumDiffingTime() = 0;
diff --git a/lib/backupclient/BackupStoreFileDiff.cpp b/lib/backupclient/BackupStoreFileDiff.cpp
index 571f4351..78890008 100644
--- a/lib/backupclient/BackupStoreFileDiff.cpp
+++ b/lib/backupclient/BackupStoreFileDiff.cpp
@@ -835,7 +835,9 @@ static bool SecondStageMatch(BlocksAvailableEntry *pFirstInHashList, RollingChec
ASSERT(pFirstInHashList != 0);
ASSERT(pIndex != 0);
- uint16_t Hash = fastSum.GetComponentForHashing();
+#ifndef NDEBUG
+ uint16_t DEBUG_Hash = fastSum.GetComponentForHashing();
+#endif
uint32_t Checksum = fastSum.GetChecksum();
// Before we go to the expense of the MD5, make sure it's a darn good match on the checksum we already know.
@@ -873,7 +875,7 @@ static bool SecondStageMatch(BlocksAvailableEntry *pFirstInHashList, RollingChec
{
//TRACE3("scan size %d, block size %d, hash %d\n", scan->mSize, BlockSize, Hash);
ASSERT(scan->mSize == BlockSize);
- ASSERT(RollingChecksum::ExtractHashingComponent(scan->mWeakChecksum) == Hash);
+ ASSERT(RollingChecksum::ExtractHashingComponent(scan->mWeakChecksum) == DEBUG_Hash);
// Compare?
if(strong.DigestMatches(scan->mStrongChecksum))
diff --git a/lib/crypto/Random.cpp b/lib/crypto/Random.cpp
index c64e7d50..30049ff7 100644
--- a/lib/crypto/Random.cpp
+++ b/lib/crypto/Random.cpp
@@ -69,7 +69,7 @@ void Random::Generate(void *pOutput, int Length)
std::string Random::GenerateHex(int Length)
{
uint8_t r[256];
- if(Length > sizeof(r))
+ if(Length > (int)sizeof(r))
{
THROW_EXCEPTION(CipherException, LengthRequestedTooLongForRandomHex)
}