You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Ted Ross (JIRA)" <qp...@incubator.apache.org> on 2008/06/27 22:49:45 UTC

[jira] Commented: (QPID-1153) managementgen/schema.py initializes unsigned value with -1

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

Ted Ross commented on QPID-1153:
--------------------------------

This patch does squelch the compiler error but it also breaks the tracking of minimum values.  It causes the minimum value to always be reported as zero.

-1 was used to mean "the highest value representable by the type" since the types are unsigned.  Perhaps the logic should be changed such that when "Count" is zero, no inequality tests are done but both the Min and Max values are set to the first value.

-Ted


> managementgen/schema.py initializes unsigned value with -1
> ----------------------------------------------------------
>
>                 Key: QPID-1153
>                 URL: https://issues.apache.org/jira/browse/QPID-1153
>             Project: Qpid
>          Issue Type: Bug
>          Components: Code Generator
>    Affects Versions: M3
>         Environment: Red Hat Enterprise Linux 4, g++ 3.4.6
>            Reporter: Steve Huston
>            Assignee: Ted Ross
>            Priority: Minor
>         Attachments: qpid1153.diff
>
>
> The cpp/managementgen/schema.py script generates gen/qpid/management/Queue.cpp that causes compile warnings which are promoted to errors by the build settings. The warnings are:
> gen/qpid/management/Queue.cpp: In constructor `qpid::management::Queue::Queue(qpid::management::Manageable*, qpid::management::Manageable*, std::string, uint8_t, uint8_t, uint8_t)':
> gen/qpid/management/Queue.cpp:80: warning: converting of negative value `-0x000000001' to `uint64_t'
> gen/qpid/management/Queue.cpp: In member function `virtual void qpid::management::Queue::writeStatistics(qpid::framing::Buffer&, bool)':
> gen/qpid/management/Queue.cpp:527: warning: converting of negative value `-0x000000001' to `uint64_t'
> The attached patch resolves the warnings by initializing using the value set in the spec. At this time, that turns out to be 0.

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