Declare all format printers with printf format attribute
* defs.h (printllval, printnum_int, printnum_long): Mark with
format(printf) attribute.
* sock.c (sock_ioctl): Fix format string.
diff --git a/defs.h b/defs.h
index 0d08575..b5b0d55 100644
--- a/defs.h
+++ b/defs.h
@@ -491,7 +491,8 @@
((long long)((unsigned long long)(unsigned)(b) | ((unsigned long long)(a)<<32)))
#endif
extern int getllval(struct tcb *, unsigned long long *, int);
-extern int printllval(struct tcb *, const char *, int);
+extern int printllval(struct tcb *, const char *, int)
+ __attribute__ ((format (printf, 2, 0)));
extern void printxval(const struct xlat *, const unsigned int, const char *);
extern int printargs(struct tcb *);
@@ -507,8 +508,10 @@
extern void dumpiov(struct tcb *, int, long);
extern void dumpstr(struct tcb *, long, int);
extern void printstr(struct tcb *, long, long);
-extern void printnum_int(struct tcb *, long, const char *);
-extern void printnum_long(struct tcb *, long, const char *);
+extern void printnum_int(struct tcb *, long, const char *)
+ __attribute__ ((format (printf, 3, 0)));
+extern void printnum_long(struct tcb *, long, const char *)
+ __attribute__ ((format (printf, 3, 0)));
extern void printpath(struct tcb *, long);
extern void printpathn(struct tcb *, long, unsigned int);
#define TIMESPEC_TEXT_BUFSIZE (sizeof(long)*3 * 2 + sizeof("{%u, %u}"))
diff --git a/sock.c b/sock.c
index 6043607..b6fc95c 100644
--- a/sock.c
+++ b/sock.c
@@ -117,7 +117,7 @@
#ifdef SIOCATMARK
case SIOCATMARK:
#endif
- printnum_int(tcp, arg, ", %#d");
+ printnum_int(tcp, arg, ", %d");
case SIOCSIFNAME:
return 1;
case SIOCGIFNAME: