diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-02-10 19:36:20 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-02-10 19:36:20 +0700 |
commit | af4bad3125724b585763f94718f3f5c5d3b94f23 (patch) | |
tree | 24ebdf540a8769d32ff6230cf09891f52f8ed197 /src/host/layer23/src/mobile | |
parent | f54ebb06b919cab7201b473425d287f53970b451 (diff) |
mobile/primitives.c: fix format string compiler warning
The recent LUA integration code introduced the following
compiler warnings (on GCC 4.8.5):
primitives.c: In function ‘create_timer’:
primitives.c:90:2: warning: format ‘%llu’ expects argument of
type ‘long long unsigned int’,
but argument 7 has type ‘uint64_t’ [-Wformat=]
primitives.c: In function ‘cancel_timer’:
primitives.c:166:3: warning: format ‘%llu’ expects argument of
type ‘long long unsigned int’,
but argument 7 has type ‘uint64_t’ [-Wformat=]
The recommended and portable way of printing an 'uint64_t'
is to use the corresponding macros 'PRIu64'.
Change-Id: Ic7f54063a35a89ad54dfa63868f43009cbe469bb
Diffstat (limited to 'src/host/layer23/src/mobile')
-rw-r--r-- | src/host/layer23/src/mobile/primitives.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/host/layer23/src/mobile/primitives.c b/src/host/layer23/src/mobile/primitives.c index c3f28a5a..96f0f9c2 100644 --- a/src/host/layer23/src/mobile/primitives.c +++ b/src/host/layer23/src/mobile/primitives.c @@ -18,6 +18,8 @@ * */ +#include <inttypes.h> + #include <osmocom/bb/mobile/primitives.h> #include <osmocom/bb/common/logging.h> @@ -87,7 +89,8 @@ static int create_timer(struct mobile_prim_intf *intf, struct mobile_timer_param { struct timer_closure *closure; - LOGP(DPRIM, LOGL_DEBUG, "Creating timer with reference: %llu\n", param->timer_id); + LOGP(DPRIM, LOGL_DEBUG, "Creating timer with reference: " + "%" PRIu64 "\n", param->timer_id); closure = talloc_zero(intf, struct timer_closure); closure->intf = intf; @@ -163,8 +166,9 @@ static int cancel_timer(struct mobile_prim_intf *intf, struct mobile_timer_param if (closure->id != param->timer_id) continue; - LOGP(DPRIM, LOGL_DEBUG, - "Canceling timer with reference: %llu\n", param->timer_id); + LOGP(DPRIM, LOGL_DEBUG, "Canceling timer with reference: " + "%" PRIu64 "\n", param->timer_id); + osmo_timer_del(&closure->timer); llist_del(&closure->entry); talloc_free(closure); |