Author: tabish
Date: Wed Nov 12 16:39:06 2008
New Revision: 713582
URL: http://svn.apache.org/viewvc?rev=713582&view=rev
Log:
AMQCPP-205
Fixing warnings found on windows build
Modified:
activemq/activemq-cpp/trunk/src/main/decaf/internal/util/HexStringParser.cpp
activemq/activemq-cpp/trunk/src/main/decaf/lang/Integer.cpp
activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.cpp
activemq/activemq-cpp/trunk/src/main/decaf/util/concurrent/TimeUnit.cpp
Modified:
activemq/activemq-cpp/trunk/src/main/decaf/internal/util/HexStringParser.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/internal/util/HexStringParser.cpp?rev=713582&r1=713581&r2=713582&view=diff
==============================================================================
---
activemq/activemq-cpp/trunk/src/main/decaf/internal/util/HexStringParser.cpp
(original)
+++
activemq/activemq-cpp/trunk/src/main/decaf/internal/util/HexStringParser.cpp
Wed Nov 12 16:39:06 2008
@@ -233,7 +233,7 @@
////////////////////////////////////////////////////////////////////////////////
void HexStringParser::discardTrailingBits( long long num ) {
long long mask = ~( -1L << num );
- abandonedNumber += ( mantissa & mask );
+ abandonedNumber += (char)( mantissa & mask );
mantissa >>= num;
}
@@ -284,14 +284,14 @@
replaceFirst( strIntegerPart2, "^0+", "" );
- //If the Interger part is a nonzero number.
+ //If the Integer part is a nonzero number.
if( strIntegerPart.length() != 0 ) {
std::string leadingNumber = strIntegerPart.substr( 0, 1 );
- return ( strIntegerPart.length() - 1) * 4 +
- countBitsLength(Long::parseLong( leadingNumber,HEX_RADIX ) ) -
1;
+ return (int)( ( strIntegerPart.length() - 1) * 4 +
+ countBitsLength(Long::parseLong( leadingNumber,HEX_RADIX ) ) -
1 );
}
- //If the Interger part is a zero number.
+ //If the Integer part is a zero number.
int i;
for( i = 0; (std::size_t)i < strDecimalPart.length() &&
strDecimalPart.at(i) == '0'; i++ );
Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/Integer.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/Integer.cpp?rev=713582&r1=713581&r2=713582&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/Integer.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/Integer.cpp Wed Nov 12
16:39:06 2008
@@ -15,6 +15,10 @@
* limitations under the License.
*/
+#ifdef _WIN32
+#pragma warning( disable: 4146 )
+#endif
+
#include <decaf/lang/Integer.h>
#include <decaf/lang/Character.h>
#include <sstream>
Modified: activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.cpp?rev=713582&r1=713581&r2=713582&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/lang/Thread.cpp Wed Nov 12
16:39:06 2008
@@ -17,6 +17,10 @@
#include "Thread.h"
+#ifdef _WIN32
+#pragma warning( disable: 4311 )
+#endif
+
#include <apr_time.h>
#include <apr_portable.h>
Modified:
activemq/activemq-cpp/trunk/src/main/decaf/util/concurrent/TimeUnit.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/util/concurrent/TimeUnit.cpp?rev=713582&r1=713581&r2=713582&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/util/concurrent/TimeUnit.cpp
(original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/util/concurrent/TimeUnit.cpp Wed
Nov 12 16:39:06 2008
@@ -102,7 +102,7 @@
if( timeout > 0 ) {
long long ms = toMillis( timeout );
int ns = excessNanos( timeout, ms );
- Thread::sleep( ms );
+ Thread::sleep( (int)ms );
// TODO - Only have a wait for Milliseconds currently.
//Thread::sleep( ms, ns );
}
@@ -113,7 +113,7 @@
if( timeout > 0 ) {
long ms = toMillis( timeout );
int ns = excessNanos( timeout, ms );
- obj->wait( ms );
+ obj->wait( (unsigned long)ms );
// TODO - Only have a wait for Milliseconds currently.
//obj.wait( ms, ns );
}