Change in osmo-ggsn[master]: gtp: queue_test: Fix printf gcc warn under ARM

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/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Jul 7 14:04:04 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/19173 )


Change subject: gtp: queue_test: Fix printf gcc warn under ARM
......................................................................

gtp: queue_test: Fix printf gcc warn under ARM

queue_test.c:39:3: warning: format '%ld' expects argument of type
'long int', but argument 9 has type 'unsigned int' [-Wformat=]

Change-Id: Ie9530cdd191386ca3f6c336684f81c4582c4d962
---
M tests/gtp/queue_test.c
1 file changed, 3 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/73/19173/1

diff --git a/tests/gtp/queue_test.c b/tests/gtp/queue_test.c
index bcc6d15..11b653d 100644
--- a/tests/gtp/queue_test.c
+++ b/tests/gtp/queue_test.c
@@ -2,6 +2,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <inttypes.h>
 #include <arpa/inet.h>
 
 #include <osmocom/core/utils.h>
@@ -27,7 +28,7 @@
 			OSMO_ASSERT(memcmp(&qmsg_zero, &queue->qmsga[n], sizeof(qmsg_zero)) == 0);
 			continue;
 		}
-		printf("%d\t%d\t%d\t%d\t%d\t%d\t%u\t%ld\n",
+		printf("%d\t%d\t%d\t%d\t%d\t%d\t%u\t%" PRIuPTR "\n",
 		       n,
 		       queue->qmsga[n].seq,
 		       queue->qmsga[n].next,
@@ -35,7 +36,7 @@
 		       (int)queue->qmsga[n].timeout,
 		       queue->qmsga[n].retrans,
 		       queue->qmsga[n].type,
-		       ((uintptr_t)queue->qmsga[n].cbp & 0xFFFFFFFF)
+		       (uintptr_t)queue->qmsga[n].cbp
 		);
 	}
 	printf("======================================================\n");

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

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Ie9530cdd191386ca3f6c336684f81c4582c4d962
Gerrit-Change-Number: 19173
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200707/e6bc0b14/attachment.htm>


More information about the gerrit-log mailing list