Re: [PATCH:libxkbfile 1/4] unifdef -UXKB_IN_SERVER

2013-10-26 Thread Ran Benita
On Sat, Oct 26, 2013 at 02:09:59PM -0700, Alan Coopersmith wrote: > Xserver has its own copy of this code now, so we don't need to keep > an unused copy in libxkbfile too. Entire series looks good to me and server still compiles and goes through xkbcomp OK. You can go further with the first patch

Re: [xkb] Do XkbKSIsLower() and XkbKSIsUpper() matter?

2013-10-26 Thread Ran Benita
On Sat, Oct 26, 2013 at 02:04:55PM -0700, Alan Coopersmith wrote: > Does anyone know of any reason to waste time on this function? Can we just > delete it altogther now? (libxkbfile is undocumented, and was originally > considered private API, but we know software like GNOME has used it in the >

[PATCH:xf86-video-sis] Fix HDisplay/VDisplay typos

2013-10-26 Thread Alan Coopersmith
Found by gcc -Wlogicalops: sis_driver.c: In function 'SiS_CheckModeCRT2': sis_driver.c:13754:5: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op] sis_driver.c:13755:6: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op] sis_driver.c:1

-Wlogical-op warning on DeliverEmulatedMotionEvent

2013-10-26 Thread Alan Coopersmith
gcc -Wlogical-op on Xorg git master says: exevents.c: In function 'DeliverEmulatedMotionEvent': exevents.c:1480:13: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op] The relevant snippet of exevents.c: 1479 if (ti->listeners[0].type != LISTENER_PO

[PATCH:libxkbfile 4/4] Constify atom name argument to XkbInternAtom

2013-10-26 Thread Alan Coopersmith
Matches XInternAtom, which it wraps, and quiets a bunch of const warnings in xkbcomp. Signed-off-by: Alan Coopersmith --- include/X11/extensions/XKBfile.h |2 +- src/xkbatom.c|4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/X11/extension

[PATCH:libxkbfile 3/4] Convert sprintf calls to snprintf

2013-10-26 Thread Alan Coopersmith
Signed-off-by: Alan Coopersmith --- src/cout.c |4 +- src/maprules.c |8 +- src/xkbtext.c | 230 ++-- 3 files changed, 128 insertions(+), 114 deletions(-) diff --git a/src/cout.c b/src/cout.c index 7e2c3cf..aa1b22d 100644 --- a/sr

[PATCH:libxkbfile 2/4] Don't dereference xkb pointer until after checking it for NULL

2013-10-26 Thread Alan Coopersmith
Some compilers can perform mind-twistingly evil optimizations if you check for NULL after using it, others just let you segv. Signed-off-by: Alan Coopersmith --- src/xkmout.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/xkmout.c b/src/xkmout.c index

[PATCH:libxkbfile 1/4] unifdef -UXKB_IN_SERVER

2013-10-26 Thread Alan Coopersmith
Xserver has its own copy of this code now, so we don't need to keep an unused copy in libxkbfile too. Signed-off-by: Alan Coopersmith --- include/X11/extensions/XKBfile.h |2 -- include/X11/extensions/XKBrules.h |2 -- src/XKBfileInt.h |2 -- src/maprules.c

Do XkbKSIsLower() and XkbKSIsUpper() matter?

2013-10-26 Thread Alan Coopersmith
I tried a build with gcc's -Wlogicalops flag to see what other fun it would find, and of course, it triggered in XKB code, in libxkbfile: xkbmisc.c: In function '_XkbKSCheckCase': xkbmisc.c:100:13: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op] xkbmisc.c:114:13: