Commit 73188c91 authored by Davi Arnaut's avatar Davi Arnaut

Backport fixes for some of the more noise compiler warnings in ndb.

parent 7f80eb46
...@@ -203,7 +203,7 @@ Uint32 FsOpenReq::getVersion(const Uint32 fileNumber[]){ ...@@ -203,7 +203,7 @@ Uint32 FsOpenReq::getVersion(const Uint32 fileNumber[]){
inline inline
void FsOpenReq::setVersion(Uint32 fileNumber[], Uint8 val){ void FsOpenReq::setVersion(Uint32 fileNumber[], Uint8 val){
const Uint32 t = fileNumber[3]; const Uint32 t = fileNumber[3];
fileNumber[3] = t & 0x00FFFFFF | (((Uint32)val) << 24); fileNumber[3] = (t & 0x00FFFFFF) | (((Uint32)val) << 24);
} }
inline inline
...@@ -214,7 +214,7 @@ Uint32 FsOpenReq::getSuffix(const Uint32 fileNumber[]){ ...@@ -214,7 +214,7 @@ Uint32 FsOpenReq::getSuffix(const Uint32 fileNumber[]){
inline inline
void FsOpenReq::setSuffix(Uint32 fileNumber[], Uint8 val){ void FsOpenReq::setSuffix(Uint32 fileNumber[], Uint8 val){
const Uint32 t = fileNumber[3]; const Uint32 t = fileNumber[3];
fileNumber[3] = t & 0xFF00FFFF | (((Uint32)val) << 16); fileNumber[3] = (t & 0xFF00FFFF) | (((Uint32)val) << 16);
} }
inline inline
...@@ -225,7 +225,7 @@ Uint32 FsOpenReq::v1_getDisk(const Uint32 fileNumber[]){ ...@@ -225,7 +225,7 @@ Uint32 FsOpenReq::v1_getDisk(const Uint32 fileNumber[]){
inline inline
void FsOpenReq::v1_setDisk(Uint32 fileNumber[], Uint8 val){ void FsOpenReq::v1_setDisk(Uint32 fileNumber[], Uint8 val){
const Uint32 t = fileNumber[3]; const Uint32 t = fileNumber[3];
fileNumber[3] = t & 0xFFFF00FF | (((Uint32)val) << 8); fileNumber[3] = (t & 0xFFFF00FF) | (((Uint32)val) << 8);
} }
inline inline
...@@ -266,7 +266,7 @@ Uint32 FsOpenReq::v1_getP(const Uint32 fileNumber[]){ ...@@ -266,7 +266,7 @@ Uint32 FsOpenReq::v1_getP(const Uint32 fileNumber[]){
inline inline
void FsOpenReq::v1_setP(Uint32 fileNumber[], Uint8 val){ void FsOpenReq::v1_setP(Uint32 fileNumber[], Uint8 val){
const Uint32 t = fileNumber[3]; const Uint32 t = fileNumber[3];
fileNumber[3] = t & 0xFFFFFF00 | val; fileNumber[3] = (t & 0xFFFFFF00) | val;
} }
/****************/ /****************/
......
...@@ -840,13 +840,13 @@ Dbtux::TreeEnt::cmp(const TreeEnt ent) const ...@@ -840,13 +840,13 @@ Dbtux::TreeEnt::cmp(const TreeEnt ent) const
*/ */
const unsigned version_wrap_limit = (1 << (ZTUP_VERSION_BITS - 1)); const unsigned version_wrap_limit = (1 << (ZTUP_VERSION_BITS - 1));
if (m_tupVersion < ent.m_tupVersion) { if (m_tupVersion < ent.m_tupVersion) {
if (ent.m_tupVersion - m_tupVersion < version_wrap_limit) if (unsigned(ent.m_tupVersion - m_tupVersion) < version_wrap_limit)
return -1; return -1;
else else
return +1; return +1;
} }
if (m_tupVersion > ent.m_tupVersion) { if (m_tupVersion > ent.m_tupVersion) {
if (m_tupVersion - ent.m_tupVersion < version_wrap_limit) if (unsigned(m_tupVersion - ent.m_tupVersion) < version_wrap_limit)
return +1; return +1;
else else
return -1; return -1;
......
...@@ -366,8 +366,8 @@ bool ...@@ -366,8 +366,8 @@ bool
TransporterFacade::get_node_stopping(NodeId n) const { TransporterFacade::get_node_stopping(NodeId n) const {
const ClusterMgr::Node & node = theClusterMgr->getNodeInfo(n); const ClusterMgr::Node & node = theClusterMgr->getNodeInfo(n);
return (!node.m_state.getSingleUserMode() && return (!node.m_state.getSingleUserMode() &&
(node.m_state.startLevel == NodeState::SL_STOPPING_1) || ((node.m_state.startLevel == NodeState::SL_STOPPING_1) ||
(node.m_state.startLevel == NodeState::SL_STOPPING_2)); (node.m_state.startLevel == NodeState::SL_STOPPING_2)));
} }
inline inline
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment