Commit 1a9e4bfa authored by Davi Arnaut's avatar Davi Arnaut

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

parent c2ea5b31
......@@ -203,7 +203,7 @@ Uint32 FsOpenReq::getVersion(const Uint32 fileNumber[]){
inline
void FsOpenReq::setVersion(Uint32 fileNumber[], Uint8 val){
const Uint32 t = fileNumber[3];
fileNumber[3] = t & 0x00FFFFFF | (((Uint32)val) << 24);
fileNumber[3] = (t & 0x00FFFFFF) | (((Uint32)val) << 24);
}
inline
......@@ -214,7 +214,7 @@ Uint32 FsOpenReq::getSuffix(const Uint32 fileNumber[]){
inline
void FsOpenReq::setSuffix(Uint32 fileNumber[], Uint8 val){
const Uint32 t = fileNumber[3];
fileNumber[3] = t & 0xFF00FFFF | (((Uint32)val) << 16);
fileNumber[3] = (t & 0xFF00FFFF) | (((Uint32)val) << 16);
}
inline
......@@ -225,7 +225,7 @@ Uint32 FsOpenReq::v1_getDisk(const Uint32 fileNumber[]){
inline
void FsOpenReq::v1_setDisk(Uint32 fileNumber[], Uint8 val){
const Uint32 t = fileNumber[3];
fileNumber[3] = t & 0xFFFF00FF | (((Uint32)val) << 8);
fileNumber[3] = (t & 0xFFFF00FF) | (((Uint32)val) << 8);
}
inline
......@@ -266,7 +266,7 @@ Uint32 FsOpenReq::v1_getP(const Uint32 fileNumber[]){
inline
void FsOpenReq::v1_setP(Uint32 fileNumber[], Uint8 val){
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
*/
const unsigned version_wrap_limit = (1 << (ZTUP_VERSION_BITS - 1));
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;
else
return +1;
}
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;
else
return -1;
......
......@@ -366,8 +366,8 @@ bool
TransporterFacade::get_node_stopping(NodeId n) const {
const ClusterMgr::Node & node = theClusterMgr->getNodeInfo(n);
return (!node.m_state.getSingleUserMode() &&
(node.m_state.startLevel == NodeState::SL_STOPPING_1) ||
(node.m_state.startLevel == NodeState::SL_STOPPING_2));
((node.m_state.startLevel == NodeState::SL_STOPPING_1) ||
(node.m_state.startLevel == NodeState::SL_STOPPING_2)));
}
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