summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-13 19:58:30 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-23 17:52:07 -0800
commit70505468b7c4a7068cc39be42e421dcee34ec595 (patch)
treeaef176e686e988d003d463c4377b7a57eb50b389
parent87e10a7b9a97c951ab4d477f61177779ac0a6a66 (diff)
makekeys: move buf declaration from global to main to silence gcc -Wshadow
The global was only referenced in the main() function, which passes it as an argument of the same name to the parse_line() function, leading to gcc -Wshadow warnings: makekeys.c: In function ‘parse_line’: makekeys.c:58:24: warning: declaration of ‘buf’ shadows a global declaration makekeys.c:54:13: warning: shadowed declaration is here Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/util/makekeys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/makekeys.c b/src/util/makekeys.c
index 36d4d4b6..5613e42f 100644
--- a/src/util/makekeys.c
+++ b/src/util/makekeys.c
@@ -51,7 +51,6 @@ static char tab[KTNUM];
static unsigned short offsets[KTNUM];
static unsigned short indexes[KTNUM];
static KeySym values[KTNUM];
-static char buf[1024];
static int ksnum = 0;
static int
@@ -112,6 +111,7 @@ main(int argc, char *argv[])
int num_found;
KeySym val;
char key[128], prefix[128];
+ static char buf[1024];
for (l = 1; l < argc; l++) {
fptr = fopen(argv[l], "r");