This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: TBF: fix compiler warning in test
......................................................................
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(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
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: merged
Gerrit-Change-Id: Idf9e5f15faa7810411ed9d68ed43cf907eea2545
Gerrit-PatchSet: 3
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>