You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2015/07/13 19:43:59 UTC

activemq-cpp git commit: Several fixes for warnings that show up in newer GCC versions.

Repository: activemq-cpp
Updated Branches:
  refs/heads/master 1fab5425c -> 4d0371df2


Several fixes for warnings that show up in newer GCC versions. 

Project: http://git-wip-us.apache.org/repos/asf/activemq-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-cpp/commit/4d0371df
Tree: http://git-wip-us.apache.org/repos/asf/activemq-cpp/tree/4d0371df
Diff: http://git-wip-us.apache.org/repos/asf/activemq-cpp/diff/4d0371df

Branch: refs/heads/master
Commit: 4d0371df2f2345e772b58ad0d60765baef2e6d93
Parents: 1fab542
Author: Timothy Bish <ta...@gmail.com>
Authored: Mon Jul 13 13:43:51 2015 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Mon Jul 13 13:43:51 2015 -0400

----------------------------------------------------------------------
 .../src/examples/stress-test/CmsStress.cpp      |  4 +-
 .../discovery/AbstractDiscoveryAgent.cpp        |  2 +-
 .../decaf/internal/net/file/FileHandler.cpp     |  4 +-
 .../decaf/internal/net/http/HttpHandler.cpp     |  4 +-
 .../decaf/internal/net/https/HttpsHandler.cpp   |  4 +-
 activemq-cpp/src/main/decaf/util/Random.cpp     |  2 +-
 .../test/openwire/OpenwireSimpleTest.cpp        |  1 -
 .../activemq/util/MarshallingSupportTest.cpp    | 34 ++++++-------
 .../src/test/decaf/io/DataInputStreamTest.cpp   | 24 ++++-----
 .../src/test/decaf/io/DataOutputStreamTest.cpp  | 12 ++---
 activemq-cpp/src/test/decaf/lang/FloatTest.cpp  |  2 +-
 activemq-cpp/src/test/decaf/lang/FloatTest.h    |  2 +-
 .../src/test/decaf/util/zip/DeflaterTest.cpp    |  2 +-
 .../decaf/util/zip/InflaterInputStreamTest.cpp  |  8 +--
 .../src/test/decaf/util/zip/InflaterTest.cpp    | 53 ++++++++++++--------
 15 files changed, 85 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/examples/stress-test/CmsStress.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/examples/stress-test/CmsStress.cpp b/activemq-cpp/src/examples/stress-test/CmsStress.cpp
index bde4d6e..056642a 100644
--- a/activemq-cpp/src/examples/stress-test/CmsStress.cpp
+++ b/activemq-cpp/src/examples/stress-test/CmsStress.cpp
@@ -56,9 +56,9 @@ void DisplayResults() {
     printf("\nT E S T   S U M M A R Y\n");
 
     if (days > 0) {
-        printf("Elapsed time = %d:%02.2d:%02.2d:%02.2d.%03.3d\n", days, hrs % 24, mins % 60, secs % 60, mills % 1000);
+        printf("Elapsed time = %d:%2.2d:%2.2d:%2.2d.%3.3d\n", days, hrs % 24, mins % 60, secs % 60, (int)(mills % 1000));
     } else {
-        printf("Elapsed time = %02.2d:%02.2d:%02.2d.%03.3d\n", hrs % 24, mins % 60, secs % 60, mills % 1000);
+        printf("Elapsed time = %2.2d:%2.2d:%2.2d.%3.3d\n", hrs % 24, mins % 60, secs % 60, (int)(mills % 1000));
     }
 
     printf("Threads used = %d\n", TestResults.threadCount);

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/main/activemq/transport/discovery/AbstractDiscoveryAgent.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/activemq/transport/discovery/AbstractDiscoveryAgent.cpp b/activemq-cpp/src/main/activemq/transport/discovery/AbstractDiscoveryAgent.cpp
index 48f2574..f933ff8 100644
--- a/activemq-cpp/src/main/activemq/transport/discovery/AbstractDiscoveryAgent.cpp
+++ b/activemq-cpp/src/main/activemq/transport/discovery/AbstractDiscoveryAgent.cpp
@@ -147,7 +147,7 @@ namespace discovery {
                     return false;
                 }
 
-                int maxReconnectAttempts = maxReconnectAttempts;
+                int maxReconnectAttempts = this->maxReconnectAttempts;
 
                 // Are we done trying to recover this guy?
                 if (maxReconnectAttempts > 0 && service->getFailureCount() > maxReconnectAttempts) {

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/main/decaf/internal/net/file/FileHandler.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/decaf/internal/net/file/FileHandler.cpp b/activemq-cpp/src/main/decaf/internal/net/file/FileHandler.cpp
index 774d863..9f2c539 100644
--- a/activemq-cpp/src/main/decaf/internal/net/file/FileHandler.cpp
+++ b/activemq-cpp/src/main/decaf/internal/net/file/FileHandler.cpp
@@ -31,12 +31,12 @@ FileHandler::~FileHandler() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::net::URLConnection* FileHandler::openConnection(const decaf::net::URL& url) {
+decaf::net::URLConnection* FileHandler::openConnection(const decaf::net::URL& url DECAF_UNUSED) {
     return NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::net::URLConnection* FileHandler::openConnection(const decaf::net::URL& url,
+decaf::net::URLConnection* FileHandler::openConnection(const decaf::net::URL& url DECAF_UNUSED,
                                                        const decaf::net::Proxy* proxy) {
 
     if (proxy == NULL) {

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/main/decaf/internal/net/http/HttpHandler.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/decaf/internal/net/http/HttpHandler.cpp b/activemq-cpp/src/main/decaf/internal/net/http/HttpHandler.cpp
index 1af0bd9..6e17568 100644
--- a/activemq-cpp/src/main/decaf/internal/net/http/HttpHandler.cpp
+++ b/activemq-cpp/src/main/decaf/internal/net/http/HttpHandler.cpp
@@ -31,12 +31,12 @@ HttpHandler::~HttpHandler() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::net::URLConnection* HttpHandler::openConnection(const decaf::net::URL& url) {
+decaf::net::URLConnection* HttpHandler::openConnection(const decaf::net::URL& url DECAF_UNUSED) {
     return NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::net::URLConnection* HttpHandler::openConnection(const decaf::net::URL& url,
+decaf::net::URLConnection* HttpHandler::openConnection(const decaf::net::URL& url DECAF_UNUSED,
                                                        const decaf::net::Proxy* proxy) {
 
     if (proxy == NULL) {

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/main/decaf/internal/net/https/HttpsHandler.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/decaf/internal/net/https/HttpsHandler.cpp b/activemq-cpp/src/main/decaf/internal/net/https/HttpsHandler.cpp
index 68c6c0c..e7cb850 100644
--- a/activemq-cpp/src/main/decaf/internal/net/https/HttpsHandler.cpp
+++ b/activemq-cpp/src/main/decaf/internal/net/https/HttpsHandler.cpp
@@ -31,12 +31,12 @@ HttpsHandler::~HttpsHandler() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::net::URLConnection* HttpsHandler::openConnection(const decaf::net::URL& url) {
+decaf::net::URLConnection* HttpsHandler::openConnection(const decaf::net::URL& url DECAF_UNUSED) {
     return NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-decaf::net::URLConnection* HttpsHandler::openConnection(const decaf::net::URL& url,
+decaf::net::URLConnection* HttpsHandler::openConnection(const decaf::net::URL& url DECAF_UNUSED,
                                                         const decaf::net::Proxy* proxy) {
 
     if (proxy == NULL) {

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/main/decaf/util/Random.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/decaf/util/Random.cpp b/activemq-cpp/src/main/decaf/util/Random.cpp
index b20d8c7..ca455e5 100644
--- a/activemq-cpp/src/main/decaf/util/Random.cpp
+++ b/activemq-cpp/src/main/decaf/util/Random.cpp
@@ -99,7 +99,7 @@ double Random::nextDouble() {
 
 ////////////////////////////////////////////////////////////////////////////////
 float Random::nextFloat() {
-    return (next(24) / 16777216.0f);
+    return ((float) next(24) / 16777216.0f);
 }
 
 ////////////////////////////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireSimpleTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireSimpleTest.cpp b/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireSimpleTest.cpp
index 5ce97d4..34ab42f 100644
--- a/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireSimpleTest.cpp
+++ b/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireSimpleTest.cpp
@@ -373,7 +373,6 @@ void OpenwireSimpleTest::testMessageIdSetOnSend() {
 
     // Create CMS Object for Comms
     cms::Session* session(cmsProvider->getSession());
-    cms::MessageConsumer* consumer = cmsProvider->getConsumer();
     cms::MessageProducer* producer = cmsProvider->getProducer();
     producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp b/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp
index aa5e343..44fa647 100644
--- a/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp
+++ b/activemq-cpp/src/test/activemq/util/MarshallingSupportTest.cpp
@@ -62,16 +62,16 @@ void MarshallingSupportTest::testAsciiToModifiedUtf8() {
         unsigned char input[] = {0x00, 0x0B, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64};
         unsigned char expect[] = {0xC0, 0x80, 0x0B, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64};
 
-        writeTestHelper( input, sizeof(input)/sizeof(unsigned char),
-                         expect, sizeof(expect)/sizeof(unsigned char) );
+        writeTestHelper( input, (int) sizeof(input) / (int) sizeof(unsigned char),
+                         expect, (int) sizeof(expect) / (int) sizeof(unsigned char) );
     }
 
     // Test data with 2-byte UT8 encoding.
     {
         unsigned char input[] = {0x00, 0xC2, 0xA9, 0xC3, 0xA6 };
         unsigned char expect[] = {0xC0, 0x80, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC2, 0xA6 };
-        writeTestHelper( input, sizeof(input)/sizeof(unsigned char),
-                         expect, sizeof(expect)/sizeof(unsigned char)  );
+        writeTestHelper( input, (int) sizeof(input) / (int) sizeof(unsigned char),
+                         expect, (int) sizeof(expect) / (int) sizeof(unsigned char)  );
     }
 
     // Test data with 1-byte and 2-byte encoding with embedded NULL's.
@@ -79,8 +79,8 @@ void MarshallingSupportTest::testAsciiToModifiedUtf8() {
         unsigned char input[] = {0x00, 0x04, 0xC2, 0xA9, 0xC3, 0x00, 0xA6 };
         unsigned char expect[] = {0xC0, 0x80, 0x04, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC0, 0x80, 0xC2, 0xA6 };
 
-        writeTestHelper( input, sizeof(input)/sizeof(unsigned char),
-                         expect, sizeof(expect)/sizeof(unsigned char) );
+        writeTestHelper( input, (int) sizeof(input) / (int) sizeof(unsigned char),
+                         expect, (int) sizeof(expect) / (int) sizeof(unsigned char) );
     }
 
 }
@@ -105,16 +105,16 @@ void MarshallingSupportTest::testModifiedUtf8ToAscii() {
         unsigned char expect[] = { 0x00, 0x0B, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64 };
         unsigned char input[] = { 0xC0, 0x80, 0x0B, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64 };
 
-        readTestHelper( input, sizeof(input)/sizeof(unsigned char),
-                        expect, sizeof(expect)/sizeof(unsigned char) );
+        readTestHelper( input, (int) sizeof(input) / (int) sizeof(unsigned char),
+                        expect, (int) sizeof(expect)/ (int) sizeof(unsigned char) );
     }
 
     // Test data with 2-byte UT8 encoding.
     {
         unsigned char expect[] = { 0x00, 0xC2, 0xA9, 0xC3, 0xA6 };
         unsigned char input[] = { 0xC0, 0x80, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC2, 0xA6 };
-        readTestHelper( input, sizeof(input)/sizeof(unsigned char),
-                        expect, sizeof(expect)/sizeof(unsigned char)  );
+        readTestHelper( input, (int) sizeof(input) / (int) sizeof(unsigned char),
+                        expect, (int) sizeof(expect) / (int) sizeof(unsigned char)  );
     }
 
     // Test data with 1-byte and 2-byte encoding with embedded NULL's.
@@ -122,14 +122,14 @@ void MarshallingSupportTest::testModifiedUtf8ToAscii() {
         unsigned char expect[] = { 0x00, 0x04, 0xC2, 0xA9, 0xC3, 0x00, 0xA6 };
         unsigned char input[] = { 0xC0, 0x80, 0x04, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC0, 0x80, 0xC2, 0xA6 };
 
-        readTestHelper( input, sizeof(input)/sizeof(unsigned char),
-                        expect, sizeof(expect)/sizeof(unsigned char) );
+        readTestHelper( input, (int) sizeof(input) / (int) sizeof(unsigned char),
+                        expect, (int) sizeof(expect) / (int) sizeof(unsigned char) );
     }
 
     // Test with bad UTF-8 encoding, missing 2nd byte of two byte value
     {
         unsigned char input[] = { 0xC0, 0x80, 0x04, 0xC3, 0x82, 0xC2, 0xC2, 0xC3, 0x83, 0xC0, 0x80, 0xC2, 0xA6 };
-        std::string inputString( (char*)input, sizeof(input)/sizeof(unsigned char) );
+        std::string inputString( (char*)input, (int) sizeof(input) / (int) sizeof(unsigned char) );
 
         CPPUNIT_ASSERT_THROW_MESSAGE(
             "Should throw a UTFDataFormatException",
@@ -140,7 +140,7 @@ void MarshallingSupportTest::testModifiedUtf8ToAscii() {
     // Test with bad UTF-8 encoding, encoded value greater than 255
     {
         unsigned char input[] = { 0xC0, 0x80, 0x04, 0xC3, 0x82, 0xC2, 0xC2, 0xC3, 0x83, 0xC0, 0x80, 0xC2, 0xA6 };
-        std::string inputString( (char*)input, sizeof(input)/sizeof(unsigned char) );
+        std::string inputString( (char*)input, (int) sizeof(input) / (int) sizeof(unsigned char) );
 
         CPPUNIT_ASSERT_THROW_MESSAGE(
             "Should throw a UTFDataFormatException",
@@ -151,7 +151,7 @@ void MarshallingSupportTest::testModifiedUtf8ToAscii() {
     // Test data with value greater than 255 in 2-byte encoding.
     {
         unsigned char input[] = { 0xC8, 0xA9, 0xC3, 0xA6};
-        std::string inputString( (char*)input, sizeof(input)/sizeof(unsigned char) );
+        std::string inputString( (char*)input, (int) sizeof(input) / (int) sizeof(unsigned char) );
 
         CPPUNIT_ASSERT_THROW_MESSAGE(
             "Should throw a UTFDataFormatException",
@@ -162,7 +162,7 @@ void MarshallingSupportTest::testModifiedUtf8ToAscii() {
     // Test data with value greater than 255 in 3-byte encoding.
     {
         unsigned char input[] = { 0xE8, 0xA8, 0xA9, 0xC3, 0xA6};
-        std::string inputString( (char*)input, sizeof(input)/sizeof(unsigned char) );
+        std::string inputString( (char*)input, (int) sizeof(input) / (int) sizeof(unsigned char) );
 
         CPPUNIT_ASSERT_THROW_MESSAGE(
             "Should throw a UTFDataFormatException",
@@ -173,7 +173,7 @@ void MarshallingSupportTest::testModifiedUtf8ToAscii() {
     // Test with three byte encode that's missing a last byte.
     {
         unsigned char input[] = { 0x00, 0x00, 0x00, 0x02, 0xE8, 0xA8};
-        std::string inputString( (char*)input, sizeof(input)/sizeof(unsigned char) );
+        std::string inputString( (char*)input, (int) sizeof(input) / (int) sizeof(unsigned char) );
 
         CPPUNIT_ASSERT_THROW_MESSAGE(
             "Should throw a UTFDataFormatException",

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/test/decaf/io/DataInputStreamTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test/decaf/io/DataInputStreamTest.cpp b/activemq-cpp/src/test/decaf/io/DataInputStreamTest.cpp
index f168f44..8a703a3 100644
--- a/activemq-cpp/src/test/decaf/io/DataInputStreamTest.cpp
+++ b/activemq-cpp/src/test/decaf/io/DataInputStreamTest.cpp
@@ -386,7 +386,7 @@ void DataInputStreamTest::test_skipBytes() {
 
         CPPUNIT_ASSERT_NO_THROW_MESSAGE(
             "Should throw an EOFException",
-			skipped = (std::size_t)is->skip( 500000 ) );
+            skipped = (std::size_t)is->skip( 500000 ) );
 
         CPPUNIT_ASSERT_MESSAGE(
             "Skipped should report " +
@@ -592,16 +592,16 @@ void DataInputStreamTest::testUTFDecoding() {
         unsigned char expect[] = {0x00, 0x0B, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64};
         unsigned char input[] = { 0x00, 0x0E ,0xC0, 0x80, 0x0B, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64};
 
-        testHelper( input, sizeof(input)/sizeof(unsigned char),
-                    expect, sizeof(expect)/sizeof(unsigned char) );
+        testHelper( input, (int) sizeof(input) / (int) sizeof(unsigned char),
+                    expect, (int) sizeof(expect) / (int) sizeof(unsigned char) );
     }
 
     // Test data with 2-byte UT8 encoding.
     {
         unsigned char expect[] = {0x00, 0xC2, 0xA9, 0xC3, 0xA6 };
         unsigned char input[] = { 0x00, 0x0A, 0xC0, 0x80, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC2, 0xA6 };
-        testHelper( input, sizeof(input)/sizeof(unsigned char),
-                    expect, sizeof(expect)/sizeof(unsigned char)  );
+        testHelper( input, (int) sizeof(input) / (int) sizeof(unsigned char),
+                    expect, (int) sizeof(expect) / (int) sizeof(unsigned char)  );
     }
 
     // Test data with 1-byte and 2-byte encoding with embedded NULL's.
@@ -609,15 +609,15 @@ void DataInputStreamTest::testUTFDecoding() {
         unsigned char expect[] = {0x00, 0x04, 0xC2, 0xA9, 0xC3, 0x00, 0xA6 };
         unsigned char input[] = { 0x00, 0x0D, 0xC0, 0x80, 0x04, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC0, 0x80, 0xC2, 0xA6 };
 
-        testHelper( input, sizeof(input)/sizeof(unsigned char),
-                    expect, sizeof(expect)/sizeof(unsigned char) );
+        testHelper( input, (int) sizeof(input) / (int) sizeof(unsigned char),
+                    expect, (int) sizeof(expect) / (int) sizeof(unsigned char) );
     }
 
     // Test with bad UTF-8 encoding, missing 2nd byte of two byte value
     {
         unsigned char input[] = { 0x00, 0x0D, 0xC0, 0x80, 0x04, 0xC3, 0x82, 0xC2, 0xC2, 0xC3, 0x83, 0xC0, 0x80, 0xC2, 0xA6 };
 
-        ByteArrayInputStream myStream( input, sizeof(input)/sizeof(unsigned char) );
+        ByteArrayInputStream myStream( input, (int) sizeof(input) / (int) sizeof(unsigned char) );
         DataInputStream reader( &myStream );
 
         CPPUNIT_ASSERT_THROW_MESSAGE(
@@ -630,7 +630,7 @@ void DataInputStreamTest::testUTFDecoding() {
     {
         unsigned char input[] = { 0x00, 0x0D, 0xC0, 0x80, 0x04, 0xC3, 0x82, 0xC2, 0xC2, 0xC3, 0x83, 0xC0, 0x80, 0xC2, 0xA6 };
 
-        ByteArrayInputStream myStream( input, sizeof(input)/sizeof(unsigned char) );
+        ByteArrayInputStream myStream( input, (int) sizeof(input) / (int) sizeof(unsigned char) );
         DataInputStream reader( &myStream );
 
         CPPUNIT_ASSERT_THROW_MESSAGE(
@@ -642,7 +642,7 @@ void DataInputStreamTest::testUTFDecoding() {
     // Test data with value greater than 255 in 2-byte encoding.
     {
         unsigned char input[] = {0x00, 0x04, 0xC8, 0xA9, 0xC3, 0xA6};
-        ByteArrayInputStream myStream( input, sizeof(input)/sizeof(unsigned char) );
+        ByteArrayInputStream myStream( input, (int) sizeof(input) / (int) sizeof(unsigned char) );
         DataInputStream reader( &myStream );
 
         CPPUNIT_ASSERT_THROW_MESSAGE(
@@ -654,7 +654,7 @@ void DataInputStreamTest::testUTFDecoding() {
     // Test data with value greater than 255 in 3-byte encoding.
     {
         unsigned char input[] = {0x00, 0x05, 0xE8, 0xA8, 0xA9, 0xC3, 0xA6};
-        ByteArrayInputStream myStream( input, sizeof(input)/sizeof(unsigned char) );
+        ByteArrayInputStream myStream( input, (int) sizeof(input) / (int) sizeof(unsigned char) );
         DataInputStream reader( &myStream );
 
         CPPUNIT_ASSERT_THROW_MESSAGE(
@@ -666,7 +666,7 @@ void DataInputStreamTest::testUTFDecoding() {
     // Test with three byte encode that's missing a last byte.
     {
         unsigned char input[] = {0x00, 0x02, 0xE8, 0xA8};
-        ByteArrayInputStream myStream( input, sizeof(input)/sizeof(unsigned char) );
+        ByteArrayInputStream myStream( input, (int) sizeof(input) / (int) sizeof(unsigned char) );
         DataInputStream reader( &myStream );
 
         CPPUNIT_ASSERT_THROW_MESSAGE(

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.cpp b/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.cpp
index 652da3d..c138e04 100644
--- a/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.cpp
+++ b/activemq-cpp/src/test/decaf/io/DataOutputStreamTest.cpp
@@ -327,16 +327,16 @@ void DataOutputStreamTest::testWriteUTFEncoding() {
         unsigned char input[] = {0x00, 0x0B, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64};
         unsigned char expect[] = {0xC0, 0x80, 0x0B, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F, 0x72, 0x6C, 0x64};
 
-        testHelper( input, sizeof(input)/sizeof(unsigned char),
-                    expect, sizeof(expect)/sizeof(unsigned char) );
+        testHelper( input, (int) sizeof(input) / (int) sizeof(unsigned char),
+                    expect, (int) sizeof(expect) / (int) sizeof(unsigned char) );
     }
 
     // Test data with 2-byte UT8 encoding.
     {
         unsigned char input[] = {0x00, 0xC2, 0xA9, 0xC3, 0xA6 };
         unsigned char expect[] = {0xC0, 0x80, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC2, 0xA6 };
-        testHelper( input, sizeof(input)/sizeof(unsigned char),
-                    expect, sizeof(expect)/sizeof(unsigned char)  );
+        testHelper( input, (int) sizeof(input) / (int) sizeof(unsigned char),
+                    expect, (int) sizeof(expect) / (int) sizeof(unsigned char)  );
     }
 
     // Test data with 1-byte and 2-byte encoding with embedded NULL's.
@@ -344,8 +344,8 @@ void DataOutputStreamTest::testWriteUTFEncoding() {
         unsigned char input[] = {0x00, 0x04, 0xC2, 0xA9, 0xC3, 0x00, 0xA6 };
         unsigned char expect[] = {0xC0, 0x80, 0x04, 0xC3, 0x82, 0xC2, 0xA9, 0xC3, 0x83, 0xC0, 0x80, 0xC2, 0xA6 };
 
-        testHelper( input, sizeof(input)/sizeof(unsigned char),
-                    expect, sizeof(expect)/sizeof(unsigned char) );
+        testHelper( input, (int) sizeof(input) / (int) sizeof(unsigned char),
+                    expect, (int) sizeof(expect) / (int) sizeof(unsigned char) );
     }
 }
 

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/test/decaf/lang/FloatTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test/decaf/lang/FloatTest.cpp b/activemq-cpp/src/test/decaf/lang/FloatTest.cpp
index fd554f9..11f35f4 100644
--- a/activemq-cpp/src/test/decaf/lang/FloatTest.cpp
+++ b/activemq-cpp/src/test/decaf/lang/FloatTest.cpp
@@ -63,7 +63,7 @@ const std::string FloatTest::expectedStringFor3_4eN38To38[] = {
     "3.4028236E34", "3.4028234E35", "3.4028236E36", "3.4028235E37", "3.4028235E38" };
 
 ////////////////////////////////////////////////////////////////////////////////
-const int FloatTest::rawBitsFor1_17eN38To38[] = {
+const unsigned int FloatTest::rawBitsFor1_17eN38To38[] = {
     0x80800000, 0x82200000, 0x83c80000,
     0x857a0000, 0x871c4000, 0x88c35000, 0x8a742400, 0x8c189680, 0x8dbebc20, 0x8f6e6b28,
     0x911502f9, 0x92ba43b7, 0x9468d4a5, 0x961184e7, 0x97b5e621, 0x99635fa9, 0x9b0e1bca,

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/test/decaf/lang/FloatTest.h
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test/decaf/lang/FloatTest.h b/activemq-cpp/src/test/decaf/lang/FloatTest.h
index 4a4acc5..e3473cf 100644
--- a/activemq-cpp/src/test/decaf/lang/FloatTest.h
+++ b/activemq-cpp/src/test/decaf/lang/FloatTest.h
@@ -49,7 +49,7 @@ namespace lang{
 
         static const int rawBitsFor3_4eN38To38[];
         static const std::string expectedStringFor3_4eN38To38[];
-        static const int rawBitsFor1_17eN38To38[];
+        static const unsigned int rawBitsFor1_17eN38To38[];
         static const std::string expectedStringFor1_17eN38To38[];
 
         FloatTest();

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/test/decaf/util/zip/DeflaterTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test/decaf/util/zip/DeflaterTest.cpp b/activemq-cpp/src/test/decaf/util/zip/DeflaterTest.cpp
index 3499b24..7e8e2a6 100644
--- a/activemq-cpp/src/test/decaf/util/zip/DeflaterTest.cpp
+++ b/activemq-cpp/src/test/decaf/util/zip/DeflaterTest.cpp
@@ -1018,7 +1018,7 @@ void DeflaterTest::testDeflateBeforeSetInput() {
 
     CPPUNIT_ASSERT_EQUAL( 8, (int)deflater.deflate( buffer ) );
 
-    unsigned char expectedBytes[] = { 120, -100, 3, 0, 0, 0, 0, 1 };
+    unsigned char expectedBytes[] = { 120, (unsigned char) -100, 3, 0, 0, 0, 0, 1 };
 
     for( int i = 0; i < 8; i++ ) {
         CPPUNIT_ASSERT_EQUAL( expectedBytes[i], buffer[i] );

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp b/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp
index 4e34e84..e147043 100644
--- a/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp
+++ b/activemq-cpp/src/test/decaf/util/zip/InflaterInputStreamTest.cpp
@@ -210,7 +210,7 @@ void InflaterInputStreamTest::testRead() {
 void InflaterInputStreamTest::testAvailableNonEmptySource() {
 
     // this unsigned char[] is a deflation of these bytes: { 1, 3, 4, 6 }
-    unsigned char deflated[] = {72, -119, 99, 100, 102, 97, 3, 0, 0, 31, 0, 15, 0};
+    unsigned char deflated[] = {72, (unsigned char) -119, 99, 100, 102, 97, 3, 0, 0, 31, 0, 15, 0};
 
     ByteArrayInputStream bais( deflated, 13 );
     InflaterInputStream in( &bais );
@@ -233,7 +233,7 @@ void InflaterInputStreamTest::testAvailableNonEmptySource() {
 void InflaterInputStreamTest::testAvailableSkip() {
 
     // this unsigned char[] is a deflation of these bytes: { 1, 3, 4, 6 }
-    unsigned char deflated[] = { 72, -119, 99, 100, 102, 97, 3, 0, 0, 31, 0, 15, 0 };
+    unsigned char deflated[] = { 72, (unsigned char) -119, 99, 100, 102, 97, 3, 0, 0, 31, 0, 15, 0 };
     ByteArrayInputStream bais( deflated, 13 );
     InflaterInputStream in( &bais );
 
@@ -246,7 +246,7 @@ void InflaterInputStreamTest::testAvailableSkip() {
 void InflaterInputStreamTest::testAvailableEmptySource() {
 
     // this unsigned char[] is a deflation of the empty file
-    unsigned char deflated[] = { 120, -100, 3, 0, 0, 0, 0, 1 };
+    unsigned char deflated[] = { 120, (unsigned char) -100, 3, 0, 0, 0, 0, 1 };
     ByteArrayInputStream bais( deflated, 13 );
     InflaterInputStream in( &bais );
 
@@ -391,7 +391,7 @@ void InflaterInputStreamTest::testSkip2() {
 void InflaterInputStreamTest::testAvailable() {
 
     // this unsigned char[] is a deflation of these bytes: { 1, 3, 4, 6 }
-    unsigned char deflated[] = {72, -119, 99, 100, 102, 97, 3, 0, 0, 31, 0, 15, 0};
+    unsigned char deflated[] = {72, (unsigned char) -119, 99, 100, 102, 97, 3, 0, 0, 31, 0, 15, 0};
 
     ByteArrayInputStream bais( deflated, 13 );
     InflaterInputStream iis( &bais );

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/4d0371df/activemq-cpp/src/test/decaf/util/zip/InflaterTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test/decaf/util/zip/InflaterTest.cpp b/activemq-cpp/src/test/decaf/util/zip/InflaterTest.cpp
index f55b9d7..92c2ce3 100644
--- a/activemq-cpp/src/test/decaf/util/zip/InflaterTest.cpp
+++ b/activemq-cpp/src/test/decaf/util/zip/InflaterTest.cpp
@@ -171,11 +171,14 @@ void InflaterTest::testInflateVector() {
 
     static const std::size_t SIZE = 39;
 
-    unsigned char byteArray[] = { 120, -38, 75, -54, 73, -52, 80, 40,
-                                  46, 41, -54, -52, 75, 87, 72, -50,
-                                  -49, 43, 73, -52, -52, 43, 86, 72,
-                                  2, 10, 34, 99, -123, -60, -68, 20,
-                                  -80, 32, 0, -101, -69, 17, 84 };
+    unsigned char byteArray[] = { 120, (unsigned char) -38, 75, (unsigned char) -54, 73,
+                                  (unsigned char) -52, 80, 40, 46, 41, (unsigned char) -54,
+                                  (unsigned char) -52, 75, 87, 72, (unsigned char) -50,
+                                  (unsigned char) -49, 43, 73, (unsigned char) -52,
+                                  (unsigned char) -52, 43, 86, 72, 2, 10, 34, 99,
+                                  (unsigned char) -123, (unsigned char) -60, (unsigned char) -68, 20,
+                                  (unsigned char) -80, 32, 0, (unsigned char) -101, (unsigned char) -69,
+                                  17, 84 };
 
     std::string codedString = "blah string contains blahblahblahblah and blah";
 
@@ -248,11 +251,13 @@ void InflaterTest::testInflateB1() {
 
     static const std::size_t CODEDATA_SIZE = 39;
 
-    unsigned char codedData[] = { 120, -38, 75, -54, 73, -52, 80, 40,
-                                  46, 41, -54, -52, 75, 87, 72, -50,
-                                  -49, 43, 73, -52, -52, 43, 86, 72,
-                                  2, 10, 34, 99, -123, -60, -68, 20,
-                                  -80, 32, 0, -101, -69, 17, 84 };
+    unsigned char codedData[] = { 120, (unsigned char) -38, 75, (unsigned char) -54, 73,
+                                  (unsigned char) -52, 80, 40, 46, 41, (unsigned char) -54,
+                                  (unsigned char) -52, 75, 87, 72, (unsigned char) -50,
+                                  (unsigned char) -49, 43, 73, (unsigned char) -52, (unsigned char) -52,
+                                  43, 86, 72, 2, 10, 34, 99, (unsigned char) -123, (unsigned char) -60,
+                                  (unsigned char) -68, 20, (unsigned char) -80, 32, 0, (unsigned char) -101,
+                                  (unsigned char) -69, 17, 84 };
     std::string codedString = "blah string contains blahblahblahblah and blah";
 
     Inflater infl1;
@@ -287,11 +292,14 @@ void InflaterTest::testInflateBII() {
 
     static const std::size_t SIZE = 39;
 
-    unsigned char byteArray[] = { 120, -38, 75, -54, 73, -52, 80, 40,
-                                  46, 41, -54, -52, 75, 87, 72, -50,
-                                  -49, 43, 73, -52, -52, 43, 86, 72,
-                                  2, 10, 34, 99, -123, -60, -68, 20,
-                                  -80, 32, 0, -101, -69, 17, 84 };
+    unsigned char byteArray[] = { 120, (unsigned char) -38, 75, (unsigned char) -54, 73,
+                                  (unsigned char) -52, 80, 40, 46, 41, (unsigned char) -54,
+                                  (unsigned char) -52, 75, 87, 72, (unsigned char) -50,
+                                  (unsigned char) -49, 43, 73, (unsigned char) -52,
+                                  (unsigned char) -52, 43, 86, 72, 2, 10, 34, 99,
+                                  (unsigned char) -123, (unsigned char) -60, (unsigned char) -68,
+                                  20, (unsigned char) -80, 32, 0, (unsigned char) -101,
+                                  (unsigned char) -69, 17, 84 };
 
     std::string codedString = "blah string contains blahblahblahblah and blah";
 
@@ -340,9 +348,14 @@ void InflaterTest::testInflateBII() {
 void InflaterTest::testInflateBII1() {
 
     static const std::size_t CODEDATA_SIZE = 39;
-    unsigned char codedData[] = { 120, -38, 75, -54, 73, -52, 80, 40, 46, 41, -54, -52, 75,
-                                  87, 72, -50, -49, 43, 73, -52, -52, 43, 86, 72, 2, 10,
-                                  34, 99, -123, -60, -68, 20, -80, 32, 0, -101, -69, 17, 84 };
+    unsigned char codedData[] = { 120, (unsigned char) -38, 75, (unsigned char) -54, 73,
+                                  (unsigned char) -52, 80, 40, 46, 41, (unsigned char) -54,
+                                  (unsigned char) -52, 75, 87, 72, (unsigned char) -50,
+                                  (unsigned char) -49, 43, 73, (unsigned char) -52,
+                                  (unsigned char) -52, 43, 86, 72, 2, 10,
+                                  34, 99, (unsigned char) -123, (unsigned char) -60,
+                                  (unsigned char) -68, 20, (unsigned char) -80, 32, 0,
+                                  (unsigned char) -101, (unsigned char) -69, 17, 84 };
 
     std::string codedString = "blah string";
 
@@ -703,7 +716,7 @@ void InflaterTest::testInflate() {
 
     {
         Inflater inflater;
-        unsigned char array[] = { -1 };
+        unsigned char array[] = { (unsigned char) -1 };
         inflater.setInput( array, 1, 0, 1 );
         try {
             inflater.inflate( b );
@@ -720,7 +733,7 @@ void InflaterTest::testInflate() {
 
     {
         Inflater inflater2;
-        unsigned char array[] = { -1, -1, -1 };
+        unsigned char array[] = { (unsigned char) -1, (unsigned char) -1, (unsigned char) -1 };
         inflater2.setInput( array, 3, 0, 3);
         try {
             inflater2.inflate( b );