[PATCH] cellmgr-ng[master]: misc: Attempt to fix various 64bit compiler warnings

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

Holger Freyther gerrit-no-reply at lists.osmocom.org
Mon Aug 15 11:36:28 UTC 2016


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/697

to look at the new patch set (#3).

misc: Attempt to fix various 64bit compiler warnings

Change-Id: I4ed058aba15d9fdc22dde99d60df0aabd6585b75
---
M src/link_udp.c
M src/mgcp_ss7.c
M src/msc_conn.c
M src/sctp_m3ua_client.c
M tests/patching/patching_test.c
5 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/cellmgr-ng refs/changes/97/697/3

diff --git a/src/link_udp.c b/src/link_udp.c
index 85f6c09..d66c1cd 100644
--- a/src/link_udp.c
+++ b/src/link_udp.c
@@ -149,7 +149,7 @@
 	length = ntohl(hdr->data_length);
 	if (length + sizeof(*hdr) > (unsigned int) rc) {
 		LOGP(DINP, LOGL_ERROR,
-		     "The MSU payload does not fit: %u + %u > %d on link %d/%s of %d/%s.\n",
+		     "The MSU payload does not fit: %u + %zu > %d on link %d/%s of %d/%s.\n",
 		     length, sizeof(*hdr), rc,
 		     link->nr, link->name, link->set->nr, link->set->name);
 		rc = 0;
diff --git a/src/mgcp_ss7.c b/src/mgcp_ss7.c
index 6604545..317832c 100644
--- a/src/mgcp_ss7.c
+++ b/src/mgcp_ss7.c
@@ -733,8 +733,8 @@
 		perror("Gateway failed to read");
 		return -1;
 	} else if (slen > sizeof(addr)) {
-		fprintf(stderr, "Gateway received message from outerspace: %d %d\n",
-			slen, sizeof(addr));
+		fprintf(stderr, "Gateway received message from outerspace: %u %zu\n",
+			(unsigned int) slen, sizeof(addr));
 		return -1;
 	}
 
diff --git a/src/msc_conn.c b/src/msc_conn.c
index 82ca811..703c761 100644
--- a/src/msc_conn.c
+++ b/src/msc_conn.c
@@ -605,7 +605,7 @@
 	len = msgb_l2len(msg) - 4;
 
 	if (len != strlen(msc->token)) {
-		LOGP(DMSC, LOGL_ERROR, "Wrong length %u vs. %u\n",
+		LOGP(DMSC, LOGL_ERROR, "Wrong length %u vs. %zu\n",
 			len, strlen(msc->token));
 		goto clean;
 	}
diff --git a/src/sctp_m3ua_client.c b/src/sctp_m3ua_client.c
index 01f2af7..3726dab 100644
--- a/src/sctp_m3ua_client.c
+++ b/src/sctp_m3ua_client.c
@@ -569,7 +569,7 @@
 	dpc = ntohl(proto->dpc);
 	sls = proto->sls;
 	si = proto->si;
-	LOGP(DINP, LOGL_DEBUG, "Got data for OPC(%d)/DPC(%d)/SLS(%d) len(%d)\n",
+	LOGP(DINP, LOGL_DEBUG, "Got data for OPC(%d)/DPC(%d)/SLS(%d) len(%zu)\n",
 		opc, dpc, sls, msgb_l2len(msg) - sizeof(*proto));
 
 
diff --git a/tests/patching/patching_test.c b/tests/patching/patching_test.c
index 9208788..26d4a52 100644
--- a/tests/patching/patching_test.c
+++ b/tests/patching/patching_test.c
@@ -368,7 +368,7 @@
 	}
 
 	if (msgb_l2len(outp) != sizeof(dt1_ass_compl_hardcoded)) {
-		printf("The length's don't match on %u != %u\n",
+		printf("The length's don't match on %u != %zu\n",
 			msgb_l2len(outp), sizeof(dt1_ass_compl_hardcoded));
 		printf("hex: %s\n", osmo_hexdump(outp->l2h, msgb_l2len(outp)));
 		abort();

-- 
To view, visit https://gerrit.osmocom.org/697
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4ed058aba15d9fdc22dde99d60df0aabd6585b75
Gerrit-PatchSet: 3
Gerrit-Project: cellmgr-ng
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list