diff options
author | Charles E. Rolke <chug@apache.org> | 2011-09-30 20:58:23 +0000 |
---|---|---|
committer | Charles E. Rolke <chug@apache.org> | 2011-09-30 20:58:23 +0000 |
commit | 072d9bfb6a1deda0f390636fc11ba5b366700105 (patch) | |
tree | 64d472050ce8d60bd819fb3daf3d55b32db1516a | |
parent | aeccf26719f22057b385f9ef3827614fd080913b (diff) | |
download | qpid-python-072d9bfb6a1deda0f390636fc11ba5b366700105.tar.gz |
QPID-2574 Mismatch uint32_t / size_t
There is no logic error in this code.
The explicit type conversions silence conversion warnings.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1177835 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | cpp/include/qpid/console/ObjectId.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/include/qpid/console/ObjectId.h b/cpp/include/qpid/console/ObjectId.h index 7904c85598..0722eaebeb 100644 --- a/cpp/include/qpid/console/ObjectId.h +++ b/cpp/include/qpid/console/ObjectId.h @@ -40,10 +40,10 @@ namespace console { ObjectId() : first(0), second(0) {} ObjectId(framing::Buffer& buffer); - uint8_t getFlags() const { return (first & 0xF000000000000000LL) >> 60; } - uint16_t getSequence() const { return (first & 0x0FFF000000000000LL) >> 48; } - uint32_t getBrokerBank() const { return (first & 0x0000FFFFF0000000LL) >> 28; } - uint32_t getAgentBank() const { return first & 0x000000000FFFFFFFLL; } + uint8_t getFlags() const { return (uint8_t)((first & 0xF000000000000000LL) >> 60); } + uint16_t getSequence() const { return (uint16_t)((first & 0x0FFF000000000000LL) >> 48); } + uint32_t getBrokerBank() const { return (uint32_t)((first & 0x0000FFFFF0000000LL) >> 28); } + uint32_t getAgentBank() const { return (uint32_t) (first & 0x000000000FFFFFFFLL); } uint64_t getObject() const { return second; } bool isDurable() const { return getSequence() == 0; } void decode(framing::Buffer& buffer); |