[ 
https://issues.apache.org/jira/browse/QPID-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13095592#comment-13095592
 ] 

Chuck Rolke commented on QPID-2574:
-----------------------------------

This condition of the source code is a major annoyance for those who compile on 
64-bit windows. A single build of qpid produces 874 warnings and makes build 
logs hard to read. If you are interested in seeing where the issues are please 
see: http://people.apache.org/~chug/QPID-2574-error-enumeration.txt (sorted and 
unique for easier reading).

With the -pedantic nature of the compile switch set I think a great addition 
would be -Wconversion. Then gcc builds would get the same errors as windows 
builds.

Failing that, I propose adding "/wd4267" in CMakeLists.txt to suppress the 
warnings in windows builds. Then one day when the warnings are actually fixed 
we can remove warning switch in windows and add the warning switch in gcc.

> Mismatch uint32_t / size_t generates many compile warnings, esp in 64-bit
> -------------------------------------------------------------------------
>
>                 Key: QPID-2574
>                 URL: https://issues.apache.org/jira/browse/QPID-2574
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker, C++ Client, Code Generator
>    Affects Versions: 0.6
>            Reporter: Steve Huston
>            Priority: Minor
>
> There are many places in the C++ code that mix uint32_t, usually in the form 
> of an encoding or Buffer size, with size_t, usually the result of a size() 
> call to a string or some other container. In a Windows 64-bit build this 
> produces a warning for each occurrence similar to:
> 3>C:\ace\exported\qpid\trunk\qpid\cpp\src\qpid/broker/Exchange.h(122) : 
> warning C4267: 'return' : conversion from 'size_t' to 'uint32_t', possible 
> loss of data
> This type of code is present in both hand-written and generated code, which 
> is why I included the Code generator in the Components.
> Some can be removed with a cast - for example, the Uuid::encodedSize method 
> isn't going to return a value greater than 2^32-1, so it can be safely cast 
> away. But the problem should be dealt with more cleanly, I think.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to