diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2015-12-23 15:12:40 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2015-12-24 16:17:21 +0100 |
commit | 42fff58a45288337110fb2e91d304b07744c7597 (patch) | |
tree | 0fac5bf6922c5fdab58ad9465218ed002b9c9750 /src | |
parent | a2db75f28cfbf096b076058ff89d1ef2cac3e6b1 (diff) |
Fix some recently added formats on 64bit
86ec311896dd5d4 adds compiler warnings on 64bit. The build is clean otherwise,
so let's keep it that way.
Diffstat (limited to 'src')
-rw-r--r-- | src/msgb.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -28,6 +28,7 @@ #include <unistd.h> #include <string.h> #include <stdlib.h> +#include <inttypes.h> #include <osmocom/core/msgb.h> //#include <openbsc/gsm_data.h> @@ -274,14 +275,15 @@ const char *msgb_hexdump(const struct msgb *msg) continue; if (lxhs[i] < msg->data || lxhs[i] > msg->tail) { nchars = snprintf(buf + buf_offs, sizeof(buf) - buf_offs, - "(L%d=data%+d) ", + "(L%d=data%+" PRIdPTR ") ", i+1, lxhs[i] - msg->data); buf_offs += nchars; continue; } if (lxhs[i] < start) { nchars = snprintf(buf + buf_offs, sizeof(buf) - buf_offs, - "(L%d%+d) ", i+1, start - lxhs[i]); + "(L%d%+" PRIdPTR ") ", i+1, + start - lxhs[i]); buf_offs += nchars; continue; } @@ -312,7 +314,7 @@ const char *msgb_hexdump(const struct msgb *msg) } else if (lxhs[i] <= msg->data + msg->data_len && lxhs[i] > msg->tail) { nchars = snprintf(buf + buf_offs, sizeof(buf) - buf_offs, - "(L%d=tail%+d) ", + "(L%d=tail%+" PRIdPTR ") ", i+1, lxhs[i] - msg->tail); } else continue; |