summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2015-05-07 12:16:53 +0100
committerRalf Baechle <ralf@linux-mips.org>2015-05-07 12:16:53 +0100
commitc53b7e891a9a481d6237f85962cbc1d634061562 (patch)
tree5a99bb0109eed82dcf559fbb0e4e7a4c84e3aef0
parent8779549de990ea6aa8bc246e15af4e4f01f88bea (diff)
axutils.c: Fix warning.
libtool: compile: gcc -DHAVE_CONFIG_H -I. -DAX25_SYSCONFDIR=\"/usr/local/etc/ax 25/\" -DAX25_LOCALSTATEDIR=\"/usr/local/var/ax25/\" -g -O2 -Wall -MT axutils.lo -MD -MP -MF .deps/axutils.Tpo -c axutils.c -fPIC -DPIC -o .libs/axutils.o axutils.c: In function 'rose_aton': axutils.c:169:3: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=] printf("axutils: invalid rose address '%s' length = %d\n", addr, strlen(addr)); ^ Fixed by using a %z conversion which is a construct introduced for C99. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--axutils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/axutils.c b/axutils.c
index 8833531..ed0b380 100644
--- a/axutils.c
+++ b/axutils.c
@@ -166,7 +166,8 @@ int rose_aton(const char *addr, char *buf)
int i, n;
if (strlen(addr) != 10) {
- printf("axutils: invalid rose address '%s' length = %d\n", addr, strlen(addr));
+ printf("axutils: invalid rose address '%s' length = %zd\n",
+ addr, strlen(addr));
return -1;
}