aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-08-11 10:37:35 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2014-08-13 11:22:03 +0200
commit948b730fea6b252eb0e32d7bd285d102de966a73 (patch)
tree8272b8e5c8341b629e15b89efb12391f16c3ce6e
parent5e68ecf3b2b57aec76162caa7894dff5670dca31 (diff)
gbproxy: Fix warnings (signed/unsigned)
Adresses: gbproxy_test.c:1288:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Sponsored-by: On-Waves ehf
-rw-r--r--openbsc/tests/gbproxy/gbproxy_test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c
index cca50949b..964c6da99 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.c
+++ b/openbsc/tests/gbproxy/gbproxy_test.c
@@ -1108,7 +1108,7 @@ static void check_tlv_match(uint8_t **data, size_t *data_len,
OSMO_ASSERT(rc == 0);
rc = tlv_match(data, data_len, tag, &value, &value_len);
- OSMO_ASSERT(rc == value_len + 2);
+ OSMO_ASSERT(rc == (int)value_len + 2);
OSMO_ASSERT(value_len == exp_len);
OSMO_ASSERT(memcmp(value, exp_val, exp_len) == 0);
}
@@ -1123,7 +1123,7 @@ static void check_tv_fixed_match(uint8_t **data, size_t *data_len,
OSMO_ASSERT(rc == 0);
rc = tv_fixed_match(data, data_len, tag, len, &value);
- OSMO_ASSERT(rc == len + 1);
+ OSMO_ASSERT(rc == (int)len + 1);
OSMO_ASSERT(memcmp(value, exp_val, len) == 0);
}
@@ -1134,7 +1134,7 @@ static void check_v_fixed_shift(uint8_t **data, size_t *data_len,
int rc;
rc = v_fixed_shift(data, data_len, len, &value);
- OSMO_ASSERT(rc == len);
+ OSMO_ASSERT(rc == (int)len);
OSMO_ASSERT(memcmp(value, exp_val, len) == 0);
}
@@ -1146,7 +1146,7 @@ static void check_lv_shift(uint8_t **data, size_t *data_len,
int rc;
rc = lv_shift(data, data_len, &value, &value_len);
- OSMO_ASSERT(rc == value_len + 1);
+ OSMO_ASSERT(rc == (int)value_len + 1);
OSMO_ASSERT(value_len == exp_len);
OSMO_ASSERT(memcmp(value, exp_val, exp_len) == 0);
}
@@ -1269,7 +1269,7 @@ static void test_tlv_shift_functions()
uint8_t test_data[1024];
uint8_t buf[1024];
uint8_t *data_end;
- int i, len;
+ unsigned i, len;
uint8_t *data;
size_t data_len;
const uint8_t tag = 0x1a;
@@ -1280,7 +1280,7 @@ static void test_tlv_shift_functions()
test_data[i] = (uint8_t)i;
for (len = 0; len < 256; len++) {
- const int iterations = sizeof(buf) / (len + 2) / 4;
+ const unsigned iterations = sizeof(buf) / (len + 2) / 4;
memset(buf, 0xee, sizeof(buf));
data_end = data = buf;