[PATCH libxkbcommon 04/11] makekeys: make buf local to main()

Alan Coopersmith alan.coopersmith at oracle.com
Sat Feb 25 09:21:35 PST 2012


On 02/25/12 02:13 AM, Ran Benita wrote:
> All the functions already accept it as a parameter. This clears -Wshadow
> warnings.
>
> Signed-off-by: Ran Benita<ran234 at gmail.com>
> ---
>   makekeys/makekeys.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/makekeys/makekeys.c b/makekeys/makekeys.c
> index 21d70f5..751b719 100644
> --- a/makekeys/makekeys.c
> +++ b/makekeys/makekeys.c
> @@ -50,7 +50,6 @@ static char tab[KTNUM];
>   static unsigned short offsets[KTNUM];
>   static unsigned short indexes[KTNUM];
>   static KeySym values[KTNUM];
> -static char buf[1024];
>
>   /*
>    * XFree86 special action keys - for some reason, these have an
> @@ -181,6 +180,7 @@ main(int argc, char *argv[])
>       int num_found;
>       KeySym val;
>       char key[128];
> +    char buf[1024];
>
>
>       while (fgets(buf, sizeof(buf), stdin)) {

Looks pretty much like the fix made to the libX11 copy to fix the same warning.

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list