Skip to content

Commit

Permalink
Fix code inspection warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fruhland committed Oct 16, 2018
1 parent 3b3edc5 commit 6955e8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions cmake/check_addl_ext_counters_support.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ counters=(IB_PC_EXT_ERR_RCV_F IB_PC_EXT_ERR_PHYSRCV_F IB_PC_EXT_ERR_SWITCH_REL_F
IB_PC_EXT_ERR_XMTCONSTR_F IB_PC_EXT_ERR_RCVCONSTR_F IB_PC_EXT_ERR_LOCALINTEG_F \
IB_PC_EXT_ERR_EXCESS_OVR_F IB_PC_EXT_XMT_WAIT_F)

if [ ! -f $MAD_PATH ]; then
if [ ! -f ${MAD_PATH} ]; then
printf "0"
exit
fi

for counter in ${counters[*]}; do
string=$(cat $MAD_PATH 2>/dev/null | grep $counter)
string=$(cat ${MAD_PATH} 2>/dev/null | grep ${counter})

if [ -z $string ]; then
if [ -z ${string} ]; then
printf "0"
exit
fi
Expand Down
8 changes: 4 additions & 4 deletions src/IbPerfLib/IbPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,17 @@ IbPort::IbPort(uint16_t lid, uint8_t portNum) : IbPerfCounter(),
// Get the capability masks from the buffer.
memcpy(&capabilityMask, pmaQueryBuf + 2, sizeof(capabilityMask));
memcpy(&capabilityMask2, pmaQueryBuf + 4, sizeof(capabilityMask2));
capabilityMask2 = htonl(ntohl(capabilityMask2) >> 5);
capabilityMask2 = htonl(ntohl(capabilityMask2) >> 5u);

if (capabilityMask & IB_PM_EXT_WIDTH_SUPPORTED) {
if (capabilityMask & static_cast<uint16_t>(IB_PM_EXT_WIDTH_SUPPORTED)) {
m_isExtendedWidthSupported = true;
}

if (capabilityMask & IB_PM_PC_XMIT_WAIT_SUP) {
if (capabilityMask & static_cast<uint16_t>(IB_PM_PC_XMIT_WAIT_SUP)) {
m_isXmitWaitSupported = true;
}

if (capabilityMask2 & IB_PM_IS_ADDL_PORT_CTRS_EXT_SUP) {
if (capabilityMask2 & static_cast<uint32_t>(IB_PM_IS_ADDL_PORT_CTRS_EXT_SUP)) {
m_isAdditionalExtendedPortCountersSupported = true;
}

Expand Down

0 comments on commit 6955e8d

Please sign in to comment.