From 8b4bd46b9503fe5d2ec58d1cfcb17330e2cdd794 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 26 Mar 2018 23:24:14 +0200 Subject: mslot_class: find_free_tfi(): use uint32_t to shift 1 << 31 Avoid runtime error seen on jenkins admin-deb9build slave, when building osmo-pcu with_dsp=None,with_vty=False, during ts_alloc and tbf regression tests: +../../../src/mslot_class.c:242:22: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' The master-osmo-pcu breaks on this since moving to a debian9 build slave. Change-Id: I0cdf10e5fbc1173a7a09bd4fed8a66d06f80aeb1 --- src/mslot_class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mslot_class.c b/src/mslot_class.c index 2a482f18..9d54afee 100644 --- a/src/mslot_class.c +++ b/src/mslot_class.c @@ -239,7 +239,7 @@ int8_t find_free_tfi(uint32_t tfi_map) return -1; for (tfi = 0; tfi < 32; tfi++) { - if (!(tfi_map & (1 << tfi))) + if (!(tfi_map & (((uint32_t)1) << tfi))) return tfi; } -- cgit v1.2.3