Change in ...libosmocore[master]: avoid gcc format error on embedded builds

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Jul 31 08:13:52 UTC 2019


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/15003


Change subject: avoid gcc format error on embedded builds
......................................................................

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
---
M src/fsm.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/15003/1

diff --git a/src/fsm.c b/src/fsm.c
index 337786d..c886351 100644
--- a/src/fsm.c
+++ b/src/fsm.c
@@ -620,7 +620,7 @@
 			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 */

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15003
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I92fb9b08def8475739f0dc6316de43b166f48ac3
Gerrit-Change-Number: 15003
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at gnumonks.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190731/8b1354b2/attachment.htm>


More information about the gerrit-log mailing list