Review at https://gerrit.osmocom.org/5119
TBF: fix compiler warning in test tbf/TbfTest.cpp: In function ‘void egprs_spb_to_normal_validation(BTS*, unsigned int, unsigned int)’: tbf/TbfTest.cpp:2788:26: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] bsn1 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) ~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2788:53: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] bsn1 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) ~~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2825:26: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] bsn2 = (egprs3->bsn1_hi << 9) || (egprs3->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2825:53: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] bsn2 = (egprs3->bsn1_hi << 9) || (egprs3->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2844:26: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] bsn3 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~^~~~~ tbf/TbfTest.cpp:2844:53: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context] bsn3 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) || ~~~~~~~~~~~~~~~~~~^~~~~ Change-Id: Idf9e5f15faa7810411ed9d68ed43cf907eea2545 --- M tests/tbf/TbfTest.cpp 1 file changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/19/5119/1 diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 195bec5..d4b51fe 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -2785,8 +2785,7 @@ == mcs); egprs2 = (struct gprs_rlc_dl_header_egprs_2 *) msg->data; - bsn1 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) - || (egprs2->bsn1_lo); + bsn1 = (egprs2->bsn1_hi << 9) | (egprs2->bsn1_mid << 1) | (egprs2->bsn1_lo); dl_tbf->m_window.m_v_b.mark_nacked(0); OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0)); OSMO_ASSERT(bsn1 == 0); @@ -2822,8 +2821,7 @@ egprs3 = (struct gprs_rlc_dl_header_egprs_3 *) msg->data; /* Table 10.4.8a.3.1 of 44.060 */ OSMO_ASSERT(egprs3->spb == 3); - bsn2 = (egprs3->bsn1_hi << 9) || (egprs3->bsn1_mid << 1) || - (egprs3->bsn1_lo); + bsn2 = (egprs3->bsn1_hi << 9) | (egprs3->bsn1_mid << 1) | (egprs3->bsn1_lo); OSMO_ASSERT(bsn2 == bsn1); /* Table 10.4.8a.3.1 of 44.060 */ @@ -2841,8 +2839,7 @@ /* Table 10.4.8a.3.1 of 44.060 */ OSMO_ASSERT(egprs2->cps == 0); - bsn3 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) || - (egprs2->bsn1_lo); + bsn3 = (egprs2->bsn1_hi << 9) | (egprs2->bsn1_mid << 1) | (egprs2->bsn1_lo); OSMO_ASSERT(bsn3 == bsn2); tbf_cleanup(dl_tbf); -- To view, visit https://gerrit.osmocom.org/5119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf9e5f15faa7810411ed9d68ed43cf907eea2545 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max <msur...@sysmocom.de>