aboutsummaryrefslogtreecommitdiffstats
path: root/src/fsm.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-06-18 12:23:00 +0200
committerHarald Welte <laforge@gnumonks.org>2017-06-22 18:14:18 +0000
commit4f8857e50a9df027fab39d42e70acf84be374356 (patch)
tree91411b16d51e9918ea2cd5a9b42cbc9ab1e27fd1 /src/fsm.c
parent648f87883aad87b6e946fa23a8d8ec4cfd0523db (diff)
fsm.c: Fix compilation warning: Use PRIu32 for uint32_t
Diffstat (limited to 'src/fsm.c')
-rw-r--r--src/fsm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fsm.c b/src/fsm.c
index fbe22d72..16f5d654 100644
--- a/src/fsm.c
+++ b/src/fsm.c
@@ -21,6 +21,7 @@
#include <errno.h>
#include <stdbool.h>
#include <string.h>
+#include <inttypes.h>
#include <osmocom/core/fsm.h>
#include <osmocom/core/talloc.h>
@@ -284,7 +285,7 @@ const char *osmo_fsm_event_name(struct osmo_fsm *fsm, uint32_t event)
{
static char buf[32];
if (!fsm->event_names) {
- snprintf(buf, sizeof(buf), "%u", event);
+ snprintf(buf, sizeof(buf), "%"PRIu32, event);
return buf;
} else
return get_value_string(fsm->event_names, event);
@@ -314,7 +315,7 @@ const char *osmo_fsm_state_name(struct osmo_fsm *fsm, uint32_t state)
{
static char buf[32];
if (state >= fsm->num_states) {
- snprintf(buf, sizeof(buf), "unknown %u", state);
+ snprintf(buf, sizeof(buf), "unknown %"PRIu32, state);
return buf;
} else
return fsm->states[state].name;
@@ -408,7 +409,7 @@ int _osmo_fsm_inst_dispatch(struct osmo_fsm_inst *fi, uint32_t event, void *data
if (!fi) {
LOGPSRC(DLGLOBAL, LOGL_ERROR, file, line,
- "Trying to dispatch event %u to non-existent"
+ "Trying to dispatch event %"PRIu32" to non-existent"
" FSM instance!\n", event);
osmo_log_backtrace(DLGLOBAL, LOGL_ERROR);
return -ENODEV;