activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1478553 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/activemq/core/kernels/ main/activemq/util/ main/activemq/wireformat/openwire/marshal/ test/decaf/util/
Date Thu, 02 May 2013 21:11:08 GMT
Author: tabish
Date: Thu May  2 21:10:59 2013
New Revision: 1478553

URL: http://svn.apache.org/r1478553
Log:
Fix some warnings on Windows.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/UUIDTest.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp?rev=1478553&r1=1478552&r2=1478553&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
Thu May  2 21:10:59 2013
@@ -298,7 +298,7 @@ namespace kernels {
 
         void waitForRedeliveries() {
             if (failoverRedeliveryWaitPeriod > 0 && previouslyDeliveredMessages
!= NULL) {
-                long expiry = System::currentTimeMillis() + failoverRedeliveryWaitPeriod;
+                long long expiry = System::currentTimeMillis() + failoverRedeliveryWaitPeriod;
                 int numberNotReplayed;
                 do {
                     numberNotReplayed = 0;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.cpp?rev=1478553&r1=1478552&r2=1478553&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/MarshallingSupport.cpp
Thu May  2 21:10:59 2013
@@ -42,7 +42,7 @@ void MarshallingSupport::writeString(dec
 
     try {
 
-        if (value.length() <= Short::MAX_VALUE / 4) {
+        if ((int)value.length() <= Short::MAX_VALUE / 4) {
             dataOut.write(PrimitiveValueNode::STRING_TYPE);
             MarshallingSupport::writeString16(dataOut, value);
         } else {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp?rev=1478553&r1=1478552&r2=1478553&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
Thu May  2 21:10:59 2013
@@ -287,7 +287,7 @@ void PrimitiveTypesMarshaller::marshalPr
             if( size == 0 ) {
                 dataOut.writeByte( PrimitiveValueNode::STRING_TYPE );
                 dataOut.writeShort( (short)size );
-            } else if( data.size() > Short::MAX_VALUE / 4 ) {
+            } else if( (int)data.size() > Short::MAX_VALUE / 4 ) {
                 dataOut.writeByte( PrimitiveValueNode::BIG_STRING_TYPE );
                 dataOut.writeInt( size );
                 dataOut.write( (unsigned char*)data.c_str(), size, 0, size );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/UUIDTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/UUIDTest.cpp?rev=1478553&r1=1478552&r2=1478553&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/UUIDTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/UUIDTest.cpp Thu May  2 21:10:59
2013
@@ -250,15 +250,15 @@ void UUIDTest::testNameUUIDFromBytes() {
     CPPUNIT_ASSERT_EQUAL(2, uuid.variant());
     CPPUNIT_ASSERT_EQUAL(3, uuid.version());
 
-    CPPUNIT_ASSERT_EQUAL(0xaff565bc2f771745LL, (unsigned long long) uuid.getLeastSignificantBits());
+    CPPUNIT_ASSERT_EQUAL(0xaff565bc2f771745ULL, (unsigned long long) uuid.getLeastSignificantBits());
     CPPUNIT_ASSERT_EQUAL(0x14cdb9b4de013faaLL, uuid.getMostSignificantBits());
 
     uuid = UUID::nameUUIDFromBytes(std::vector<char>());
     CPPUNIT_ASSERT_EQUAL(2, uuid.variant());
     CPPUNIT_ASSERT_EQUAL(3, uuid.version());
 
-    CPPUNIT_ASSERT_EQUAL(0xa9800998ecf8427eLL, (unsigned long long) uuid.getLeastSignificantBits());
-    CPPUNIT_ASSERT_EQUAL(0xd41d8cd98f003204LL, (unsigned long long) uuid.getMostSignificantBits());
+    CPPUNIT_ASSERT_EQUAL(0xa9800998ecf8427eULL, (unsigned long long) uuid.getLeastSignificantBits());
+    CPPUNIT_ASSERT_EQUAL(0xd41d8cd98f003204ULL, (unsigned long long) uuid.getMostSignificantBits());
 
     CPPUNIT_ASSERT_THROW_MESSAGE(
         "Should throw an NullPointerException exception",
@@ -373,7 +373,7 @@ void UUIDTest::testFromStringStringExcep
     CPPUNIT_ASSERT_EQUAL(0x0LL, uuid.getLeastSignificantBits());
 
     uuid = UUID::fromString("7fffffffffffffff-0-0-0-0");
-    CPPUNIT_ASSERT_EQUAL(0xffffffff00000000LL, (unsigned long long) uuid.getMostSignificantBits());
+    CPPUNIT_ASSERT_EQUAL(0xffffffff00000000ULL, (unsigned long long) uuid.getMostSignificantBits());
     CPPUNIT_ASSERT_EQUAL(0x0LL, uuid.getLeastSignificantBits());
 
     CPPUNIT_ASSERT_THROW_MESSAGE(
@@ -382,12 +382,12 @@ void UUIDTest::testFromStringStringExcep
         NumberFormatException);
 
     uuid = UUID::fromString("7fffffffffffffff-7fffffffffffffff-7fffffffffffffff-0-0");
-    CPPUNIT_ASSERT_EQUAL(0xffffffffffffffffLL, (unsigned long long) uuid.getMostSignificantBits());
+    CPPUNIT_ASSERT_EQUAL(0xffffffffffffffffULL, (unsigned long long) uuid.getMostSignificantBits());
     CPPUNIT_ASSERT_EQUAL(0x0LL, uuid.getLeastSignificantBits());
 
     uuid = UUID::fromString("0-0-0-7fffffffffffffff-7fffffffffffffff");
     CPPUNIT_ASSERT_EQUAL(0x0LL, uuid.getMostSignificantBits());
-    CPPUNIT_ASSERT_EQUAL(0xffffffffffffffffLL, (unsigned long long) uuid.getLeastSignificantBits());
+    CPPUNIT_ASSERT_EQUAL(0xffffffffffffffffULL, (unsigned long long) uuid.getLeastSignificantBits());
 
     CPPUNIT_ASSERT_THROW_MESSAGE(
         "Should throw an IllegalArgumentException exception",



Mime
View raw message