cc -ansi -O2 -fomit-frame-pointer -W -Wall -D_GNU_SOURCE   -c -o wall.o wall.c
wall.c: In function ‘main’:
wall.c:113:2: warning: format ‘%d’ expects type ‘int’, but argument 5
has type ‘size_t’
cc   wall.o dowall.o   -o wall

I propose the following patch to escape this warning.

Regards,

-- 
Sébastien Luttringer
www.seblu.net
--- wall.c.old	2010-11-15 01:52:57.491296622 +0100
+++ wall.c	2010-11-15 01:53:33.953640281 +0100
@@ -109,7 +109,7 @@
   }
 
   openlog("wall", LOG_PID, LOG_USER);
-  syslog(LOG_INFO, "wall: user %s broadcasted %d lines (%d chars)",
+  syslog(LOG_INFO, "wall: user %s broadcasted %d lines (%zu chars)",
 	whoami, i, strlen(buf));
   closelog();
 

Reply via email to