misc: Fix warnings about size of size_t in printf
Fixes warnings like:
warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat]
diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c
index e3da0f8..60f223a 100644
--- a/openbsc/src/gprs/gprs_subscriber.c
+++ b/openbsc/src/gprs/gprs_subscriber.c
@@ -197,7 +197,7 @@
struct sgsn_subscriber_data *sdata = subscr->sgsn_data;
LOGGSUBSCRP(LOGL_INFO, subscr,
- "Got SendAuthenticationInfoResult, num_auth_tuples = %d\n",
+ "Got SendAuthenticationInfoResult, num_auth_tuples = %zu\n",
gsup_msg->num_auth_tuples);
if (gsup_msg->num_auth_tuples > 0) {
@@ -210,10 +210,10 @@
for (idx = 0; idx < gsup_msg->num_auth_tuples; idx++) {
size_t key_seq = gsup_msg->auth_tuples[idx].key_seq;
LOGGSUBSCRP(LOGL_DEBUG, subscr,
- "Adding auth tuple, cksn = %d\n", key_seq);
+ "Adding auth tuple, cksn = %zu\n", key_seq);
if (key_seq >= ARRAY_SIZE(sdata->auth_triplets)) {
LOGGSUBSCRP(LOGL_NOTICE, subscr,
- "Skipping auth triplet with invalid cksn %d\n",
+ "Skipping auth triplet with invalid cksn %zu\n",
key_seq);
continue;
}
@@ -275,14 +275,14 @@
if (pdp_info->apn_enc_len >= sizeof(pdp_data->apn_str)-1) {
LOGGSUBSCRP(LOGL_ERROR, subscr,
- "APN too long, context id = %d, APN = %s\n",
+ "APN too long, context id = %zu, APN = %s\n",
ctx_id, osmo_hexdump(pdp_info->apn_enc,
pdp_info->apn_enc_len));
continue;
}
LOGGSUBSCRP(LOGL_INFO, subscr,
- "Will set PDP info, context id = %d, APN = %s\n",
+ "Will set PDP info, context id = %zu, APN = %s\n",
ctx_id, osmo_hexdump(pdp_info->apn_enc, pdp_info->apn_enc_len));
/* Set PDP info [ctx_id] */