aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-12-01 17:54:39 +0100
committerHarald Welte <laforge@gnumonks.org>2017-12-05 18:47:21 +0000
commitb4d368b5769e2808cddd15917ef3f06583e920df (patch)
tree692bf0d17f1d7bd82aa656f5f1b0c13e3cd96bfe /tests
parentda0a194b577df4088de1cc41da19363d014ab94c (diff)
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
Diffstat (limited to 'tests')
-rw-r--r--tests/tbf/TbfTest.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 195bec5f..d4b51fe2 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -2785,8 +2785,7 @@ static void egprs_spb_to_normal_validation(BTS *the_bts,
== 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 @@ static void egprs_spb_to_normal_validation(BTS *the_bts,
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 @@ static void egprs_spb_to_normal_validation(BTS *the_bts,
/* 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);