aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-07-31 09:55:04 +0200
committerHarald Welte <laforge@gnumonks.org>2019-07-31 09:59:11 +0200
commitdbdd4f02739a0a7590a2a9cb3d0e3fafbdc6e76d (patch)
tree73e647f312de42e0a9c10de235caea688dc37ee5 /src
parent8c00f9d7535b366f15f9ad33a946b03893d684e5 (diff)
avoid gcc format error on embedded builds
when using gcc 8.3.0 on Debian unstable and doing an embedded build, I'm getting the following error: > fsm.c:621:40: error: format '%ld' expects argument of type > 'long int', but argument 6 has type 'time_t {aka long long int}' > [-Werror=format=] Let's avoid that... Change-Id: I92fb9b08def8475739f0dc6316de43b166f48ac3
Diffstat (limited to 'src')
-rw-r--r--src/fsm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fsm.c b/src/fsm.c
index 337786d9..c8863513 100644
--- a/src/fsm.c
+++ b/src/fsm.c
@@ -620,7 +620,7 @@ static int state_chg(struct osmo_fsm_inst *fi, uint32_t new_state,
else
snprintf(trailer, sizeof(trailer), "(keeping " OSMO_T_FMT
", %ld.%03lds remaining)", OSMO_T_FMT_ARGS(fi->T),
- remaining.tv_sec, remaining.tv_usec / 1000);
+ (long) remaining.tv_sec, remaining.tv_usec / 1000);
} else if (timeout_ms) {
if (timeout_ms % 1000 == 0)
/* keep log output legacy compatible to avoid autotest failures */