You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2012/08/10 17:14:44 UTC
svn commit: r1371735 - /qpid/trunk/qpid/cpp/src/qpid/broker/IndexedDeque.h
Author: astitcher
Date: Fri Aug 10 15:14:44 2012
New Revision: 1371735
URL: http://svn.apache.org/viewvc?rev=1371735&view=rev
Log:
NO-JIRA: Avoid uninitialised variable warning
Modified:
qpid/trunk/qpid/cpp/src/qpid/broker/IndexedDeque.h
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/IndexedDeque.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/IndexedDeque.h?rev=1371735&r1=1371734&r2=1371735&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/IndexedDeque.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/IndexedDeque.h Fri Aug 10 15:14:44 2012
@@ -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);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org