1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
From bf7d7e7c1b6aaa526ddf11e57c2773372e55a260 Mon Sep 17 00:00:00 2001
From: Bernhard R. Link <brlink@debian.org>
Date: Tue, 20 Sep 2011 17:41:56 +0200
Subject: warn against format errors and fix one
---
xchain.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/xchain.c b/xchain.c
index cbe4e56..d578a16 100644
--- a/xchain.c
+++ b/xchain.c
@@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#define DEF_WISH_PATH "/usr/bin/wish"
-void wprintf(char *, ...);
+static void wprintf(char *, ...) __attribute__((format (printf, 1, 2)));
void draw_screen(void);
void my_exit(void);
int doclick(int,int,int);
@@ -449,7 +449,7 @@ void draw_screen() {
wprintf("frame .b -relief sunk -borderwidth 1");
for(i=0;i<64;i++) {
- wprintf("button .b.b%d -text 0 -command {puts stdout zz%.2d}",i,i,i);
+ wprintf("button .b.b%d -text 0 -command {puts stdout zz%.2d}",i,i);
wprintf("grid .b.b%d -row %d -column %d",i,i/8,i%8);
}
wprintf("pack .b -fill both -padx 3 -pady 3");
|