mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-06 02:18:06 +02:00
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>
This commit is contained in:
parent
87e10a7b9a
commit
70505468b7
1 changed files with 1 additions and 1 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue