GCC warnings and possible SocketFactory bug on 64-bit Linux
-----------------------------------------------------------

                 Key: AMQCPP-56
                 URL: https://issues.apache.org/activemq/browse/AMQCPP-56
             Project: ActiveMQ C++ Client
          Issue Type: Bug
    Affects Versions: 2.0
            Reporter: Albert Strasheim
         Assigned To: Nathan Mittler
            Priority: Minor
             Fix For: 2.0


When compiling on 64-bit Linux with GCC 4.0.3, I see the following warnings:

{noformat}
activemq/concurrent/PooledThread.cpp:56: warning: 'task$first' may be used 
uninitialized in this function
activemq/concurrent/PooledThread.cpp:56: warning: 'task$second' may be used 
uninitialized in this function
activemq/network/SocketFactory.cpp:46: warning: comparison is always false due 
to limited range of data type
activemq/connector/openwire/marshal/v2/ConnectionControlMarshaller.cpp:82: 
warning: unused variable 'info'
activemq/connector/openwire/marshal/v2/IntegerResponseMarshaller.cpp:60: 
warning: unused variable 'info'
activemq/connector/openwire/marshal/v2/ReplayCommandMarshaller.cpp:61: warning: 
unused variable 'info'
activemq/connector/openwire/marshal/v2/ResponseMarshaller.cpp:60: warning: 
unused variable 'info'
{noformat}

The first three warnings probably need to be looked at, especially the one in 
SocketFactory.

In my opinion, AMQCPP is using ints and unsigned ints in places where 
std::size_t might be more appropriate. MSVC's warning level 3 catches many of 
these issues, so we might consider upping the warning level and properly 
dealing with the type conversion issues: mostly use std::size_t and static_cast 
where we really intend to convert. I can prepare a few patches along these 
lines if you think this is worthwhile.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to