setxkbmap: Changes to 'master'
Peter Hutterer
whot at kemper.freedesktop.org
Mon Feb 11 19:29:35 PST 2013
setxkbmap.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
New commits:
commit cdc2551ef6d644073e3583177ead69ed32045bae
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sun Feb 10 20:31:57 2013 -0800
Use C99 struct initializer for cmdNames in applyComponentNames
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
commit 19734cfead4b8c7a5d592fe0fe5634cb4a1ed34d
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sun Feb 10 20:31:56 2013 -0800
Make len a size_t instead of converting back & forth to an int
Gets rid of a number of clang warnings:
setxkbmap.c:689:28: warning: implicit conversion loses integer precision:
'unsigned long' to 'int' [-Wshorten-64-to-32]
len = strlen(orig) + 1;
~ ~~~~~~~~~~~~~^~~
setxkbmap.c:701:39: warning: implicit conversion changes signedness:
'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
orig = (char *) realloc(orig, len);
~~~~~~~ ^~~
setxkbmap.c:707:32: warning: implicit conversion changes signedness:
'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
orig = (char *) calloc(len, 1);
~~~~~~ ^~~
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
commit 3d5ce417ba1a8973b04516b0395f15e6500c60ea
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sun Feb 10 20:31:55 2013 -0800
Move global rules variable into applyRules, the only function that uses it
Clears gcc warning:
setxkbmap.c: In function `tryLoadRules':
setxkbmap.c:811: warning: declaration of 'rules' shadows a global declaration
setxkbmap.c:132: warning: shadowed declaration is here
No longer marked static, since the function is called exactly once, so
storing the value across calls seems pointless.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
More information about the xorg-commit
mailing list