activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r774072 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/activemq/core/ main/activemq/transport/failover/ test/decaf/internal/nio/ test/decaf/internal/util/
Date Tue, 12 May 2009 20:38:31 GMT
Author: tabish
Date: Tue May 12 20:38:31 2009
New Revision: 774072

URL: http://svn.apache.org/viewvc?rev=774072&view=rev
Log:
Fix many warnings generated on Windows.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/ByteArrayBufferTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/DoubleArrayBufferTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/LongArrayBufferTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/ByteArrayAdapterTest.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp?rev=774072&r1=774071&r2=774072&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp Tue
May 12 20:38:31 2009
@@ -260,7 +260,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::lang::Pointer<MessageDispatch> ActiveMQConsumer::dequeue( int timeout )
+decaf::lang::Pointer<MessageDispatch> ActiveMQConsumer::dequeue( long long timeout
)
     throw ( cms::CMSException ) {
 
     try {
@@ -681,8 +681,8 @@
             pendingAck.reset( NULL );
 
             // Adjust the counters
-            deliveredCounter = Math::max( 0, deliveredCounter - dispatchedMessages.size());
-            additionalWindowSize = Math::max(0, additionalWindowSize - dispatchedMessages.size());
+            deliveredCounter = Math::max( 0, deliveredCounter - (int)dispatchedMessages.size());
+            additionalWindowSize = Math::max(0, additionalWindowSize - (int)dispatchedMessages.size());
 
             if( !session->isTransacted() ) {
                 dispatchedMessages.clear();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h?rev=774072&r1=774071&r2=774072&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h Tue
May 12 20:38:31 2009
@@ -331,7 +331,7 @@
          * @throws InvalidStateException if this consumer is closed upon
          * entering this method.
          */
-        Pointer<MessageDispatch> dequeue( int timeout )
+        Pointer<MessageDispatch> dequeue( long long timeout )
             throw ( cms::CMSException );
 
         /**

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.h?rev=774072&r1=774071&r2=774072&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.h Tue
May 12 20:38:31 2009
@@ -23,6 +23,7 @@
 #include <activemq/util/Config.h>
 #include <activemq/util/Usage.h>
 #include <activemq/exceptions/ActiveMQException.h>
+#include <activemq/core/ActiveMQTransactionContext.h>
 #include <activemq/commands/ActiveMQTempDestination.h>
 #include <activemq/commands/SessionInfo.h>
 #include <activemq/commands/ConsumerInfo.h>
@@ -45,7 +46,6 @@
 
     using decaf::lang::Pointer;
 
-    class ActiveMQTransactionContext;
     class ActiveMQConnection;
     class ActiveMQConsumer;
     class ActiveMQMessage;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp?rev=774072&r1=774071&r2=774072&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp
Tue May 12 20:38:31 2009
@@ -157,6 +157,8 @@
     synchronized( &listenerMutex ) {
         return this->transportListener;
     }
+
+	return NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/ByteArrayBufferTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/ByteArrayBufferTest.cpp?rev=774072&r1=774071&r2=774072&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/ByteArrayBufferTest.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/ByteArrayBufferTest.cpp
Tue May 12 20:38:31 2009
@@ -564,7 +564,7 @@
 
     for( std::size_t i = 0; i < testBuffer1->capacity(); i++ ) {
         CPPUNIT_ASSERT( testBuffer1->position() == 0 );
-        ByteBuffer& ret = testBuffer1->put(i, i );
+        ByteBuffer& ret = testBuffer1->put( i, (unsigned char)i );
         CPPUNIT_ASSERT( testBuffer1->get(i) == i );
         CPPUNIT_ASSERT( &ret == testBuffer1 );
     }
@@ -612,9 +612,9 @@
 
     std::string str = testBuffer1->toString();
     CPPUNIT_ASSERT( str.find( "Byte" ) == 0 || str.find( "byte" ) == 0 );
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->position() ) ) > 0 );
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->limit() ) ) > 0 );
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->capacity() ) ) > 0 );
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->position() ) ) >
0 );
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->limit() ) ) > 0
);
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->capacity() ) ) >
0 );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -1081,7 +1081,7 @@
          i += sizeof( int ) ) {
 
         testBuffer1->mark();
-        testBuffer1->putInt( i + 48 );
+        testBuffer1->putInt( (int)i + 48 );
         testBuffer1->reset();
         CPPUNIT_ASSERT( testBuffer1->getInt() == (int)( i + 48 ) );
     }
@@ -1109,7 +1109,7 @@
     for( ; ( testBuffer1->capacity() - i ) >= sizeof( int ); i += sizeof( int ) ) {
 
         testBuffer1->mark();
-        testBuffer1->putInt( i, i + 99 );
+        testBuffer1->putInt( i, (int)i + 99 );
         testBuffer1->reset();
         CPPUNIT_ASSERT( testBuffer1->getInt( i ) == (int)(i + 99) );
     }
@@ -1182,7 +1182,7 @@
          i += sizeof( short ) ) {
 
         testBuffer1->mark();
-        testBuffer1->putShort( i + 48 );
+        testBuffer1->putShort( (short)( i + 48 ) );
         testBuffer1->reset();
         CPPUNIT_ASSERT( testBuffer1->getShort() == (short)( i + 48 ) );
     }
@@ -1210,7 +1210,7 @@
     for( ; ( testBuffer1->capacity() - i ) >= sizeof( short ); i += sizeof( short )
) {
 
         testBuffer1->mark();
-        testBuffer1->putShort( i, i + 99 );
+        testBuffer1->putShort( i, (short)(i + 99) );
         testBuffer1->reset();
         CPPUNIT_ASSERT( testBuffer1->getShort( i ) == (short)(i + 99) );
     }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/DoubleArrayBufferTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/DoubleArrayBufferTest.cpp?rev=774072&r1=774071&r2=774072&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/DoubleArrayBufferTest.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/DoubleArrayBufferTest.cpp
Tue May 12 20:38:31 2009
@@ -553,7 +553,7 @@
 
     std::string str = testBuffer1->toString();
     CPPUNIT_ASSERT( str.find("Double") != string::npos );
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->position() ) ) != string::npos
);
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->limit() ) ) != string::npos
);
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->capacity() ) ) != string::npos
);
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->position() ) ) != string::npos
);
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->limit() ) ) != string::npos
);
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->capacity() ) ) != string::npos
);
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/LongArrayBufferTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/LongArrayBufferTest.cpp?rev=774072&r1=774071&r2=774072&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/LongArrayBufferTest.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/nio/LongArrayBufferTest.cpp
Tue May 12 20:38:31 2009
@@ -554,7 +554,7 @@
 
     std::string str = testBuffer1->toString();
     CPPUNIT_ASSERT( str.find("Long") != string::npos );
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->position() ) ) != string::npos
);
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->limit() ) ) != string::npos
);
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->capacity() ) ) != string::npos
);
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->position() ) ) != string::npos
);
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->limit() ) ) != string::npos
);
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->capacity() ) ) != string::npos
);
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/ByteArrayAdapterTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/ByteArrayAdapterTest.cpp?rev=774072&r1=774071&r2=774072&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/ByteArrayAdapterTest.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/ByteArrayAdapterTest.cpp
Tue May 12 20:38:31 2009
@@ -297,7 +297,7 @@
 
     std::size_t i = 0;
     for( ; ( testBuffer1.getCapacity() - i ) >= sizeof(char); i+=sizeof(char) ) {
-        testBuffer1.putChar( i, i + 99 );
+        testBuffer1.putChar( i, (char)( i + 99 ) );
         CPPUNIT_ASSERT( testBuffer1.getChar( i ) == (char)(i + 99) );
     }
 
@@ -331,7 +331,7 @@
 
     std::size_t i = 0;
     for( ; i < testBuffer1.getIntCapacity(); ++i  ) {
-        testBuffer1.putInt( i, i + 99 );
+        testBuffer1.putInt( i, (int)( i + 99 ) );
         CPPUNIT_ASSERT( testBuffer1.getInt( i ) == (int)(i + 99) );
     }
 
@@ -348,7 +348,7 @@
 
     std::size_t i = 0;
     for( ; i < testBuffer1.getShortCapacity(); ++i  ) {
-        testBuffer1.putShort( i, i + 99 );
+        testBuffer1.putShort( i, (short)( i + 99 ) );
         CPPUNIT_ASSERT( testBuffer1.getShort( i ) == (short)(i + 99) );
     }
 
@@ -383,7 +383,7 @@
 
     std::size_t i = 0;
     for( ; i < testBuffer1.getFloatCapacity(); ++i  ) {
-        testBuffer1.putFloat( i, i + 99.025 );
+        testBuffer1.putFloat( i, i + 99.025f );
         CPPUNIT_ASSERT( Float::floatToIntBits( testBuffer1.getFloat( i ) ) ==
                         Float::floatToIntBits( (float)(i + 99.025) ) );
     }



Mime
View raw message