From c53b7e891a9a481d6237f85962cbc1d634061562 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 7 May 2015 12:16:53 +0100 Subject: 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 --- axutils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'axutils.c') 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; } -- cgit v1.2.3