summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2012-08-10 15:14:44 +0000
committerAndrew Stitcher <astitcher@apache.org>2012-08-10 15:14:44 +0000
commit53764dd23baa294b8e63a007b0b75fb99631b9c2 (patch)
treef8f21fb36cdd845f2c9a8f49ba71c4b76e1a36d6 /cpp/src
parentd48aedc687f43c02f631a288db524075bdf3698d (diff)
downloadqpid-python-53764dd23baa294b8e63a007b0b75fb99631b9c2.tar.gz
NO-JIRA: Avoid uninitialised variable warning
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1371735 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/broker/IndexedDeque.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/IndexedDeque.h b/cpp/src/qpid/broker/IndexedDeque.h
index c64f321789..229b4e3009 100644
--- a/cpp/src/qpid/broker/IndexedDeque.h
+++ b/cpp/src/qpid/broker/IndexedDeque.h
@@ -131,7 +131,7 @@ template <typename T> class IndexedDeque
T* next(QueueCursor& cursor)
{
- size_t i;
+ size_t i = 0;
if (reset(cursor)) i = head; //start from head
else index(cursor, i); //get first message that is greater than position
@@ -166,7 +166,7 @@ template <typename T> class IndexedDeque
T* find(const qpid::framing::SequenceNumber& position, QueueCursor* cursor)
{
- size_t i;
+ size_t i = 0;
if (index(position, i)){
T& m = messages[i];
if (cursor) cursor->setPosition(position, version);