Re: [PATCH] dix: use BUG_WARN for xi2mask size issues

2011-11-09 Thread Peter Hutterer
@@ -990,8 +991,9 @@ xi2mask_isset(XI2Mask* mask, const DeviceIntPtr dev, int event_type) void xi2mask_set(XI2Mask *mask, int deviceid, int event_type) { -if (deviceid 0 || deviceid= mask-nmasks || event_type= mask-mask_size) -return; +BUG_WARN(devicid 0); I should

Re: [PATCH 01/12] include: fix mask size calculation

2011-11-09 Thread Daniel Stone
Hi, On 9 November 2011 02:27, Peter Hutterer peter.hutte...@who-t.net wrote: On Tue, Nov 08, 2011 at 02:00:53PM +, Daniel Stone wrote: On 7 November 2011 21:39, Peter Hutterer peter.hutte...@who-t.net wrote:  * this number here is bumped.  */  #define XI2LASTEVENT    17 /*

Re: [PATCH 7/7] Fix gcc -Wwrite-strings warnings in xf86Modes code

2011-11-09 Thread walter harms
jus 2 minor remarks, re, wh Am 08.11.2011 21:42, schrieb Alan Coopersmith: Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- hw/xfree86/modes/xf86Crtc.c |8 hw/xfree86/modes/xf86Crtc.h |2 +- hw/xfree86/modes/xf86EdidModes.c |2 +-

Re: [PATCH 11/12] Add a new XI2Mask struct and a few helper functions.

2011-11-09 Thread walter harms
Am 09.11.2011 05:04, schrieb Peter Hutterer: On Tue, Nov 08, 2011 at 11:00:21AM +0100, walter harms wrote: Am 07.11.2011 22:39, schrieb Peter Hutterer: The current XI2 mask handling is handy for copying (fixed size arrays) but a pain to deal with otherwise. Add a struct for XI2 masks and

Re: [PATCH] Save major/minor opcodes in ClientRec for RecordAReply

2011-11-09 Thread Rami Ylimäki
On 11/08/2011 08:22 PM, Keith Packard wrote: The record extension needs the major and minor opcodes in the reply hook, but the request buffer may have been freed by the time the hook is invoked. Saving the request major and minor codes as the request is executed avoids fetching from the defunct

Re: [PATCH v2 11/12] Add a new XI2Mask struct and a few helper functions.

2011-11-09 Thread Chase Douglas
On 11/08/2011 09:13 PM, Peter Hutterer wrote: The current XI2 mask handling is handy for copying (fixed size arrays) but a pain to deal with otherwise. Add a struct for XI2 masks and the required accessors. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net Reviewed-by: Chase Douglas

Re: [PATCH] include: add BUG_WARN macro for internal bug cases.

2011-11-09 Thread Chase Douglas
On 11/08/2011 09:14 PM, Peter Hutterer wrote: There are plenty of cases that can only be triggered by a real bug in the server and doing the ErrorF dance manually everywhere is a tad painful and the error message is usually used only to find the spot in the file anyway. Plus, reading

Re: [PATCH] dix: use BUG_WARN for xi2mask size issues

2011-11-09 Thread Chase Douglas
On 11/08/2011 09:15 PM, Peter Hutterer wrote: Yes, we're likely corrupting memory here but really this is unlikely to be triggered other than a real bug in the server. In which case a stacktrace is going to be more useful than any silent error handling. Signed-off-by: Peter Hutterer

Re: [PATCH 1/2] Xext: don't swap CARD8 in SProcSELinuxQueryVersion

2011-11-09 Thread Julien Cristau
On Wed, Nov 9, 2011 at 15:34:37 +1000, Peter Hutterer wrote: xselinux_ext.c: In function 'SELinuxSendItemsToClient': xselinux_ext.c:340:16: warning: unused variable 'n' [-Wunused-variable] xselinux_ext.c: In function 'SProcSELinuxQueryVersion': xselinux_ext.c:532:62: error: call to

Re: [PATCH libpciaccess] OpenBSD VGA arbiter support

2011-11-09 Thread Julien Cristau
On Sun, Nov 6, 2011 at 17:53:48 +, Matthieu Herrb wrote: Hi, Those 2 patches by Mark Kettenis have been shipped into OpenBSD's version of libpciaccess for more than one year. Before we start adapting the VGA legacy stuff, I'd like to push them... As this is all openbsd stuff I think

Re: [PATCH] dix: use BUG_WARN for xi2mask size issues

2011-11-09 Thread Alan Coopersmith
On 11/08/11 21:15, Peter Hutterer wrote: Yes, we're likely corrupting memory here but really this is unlikely to be triggered other than a real bug in the server. In which case a stacktrace is going to be more useful than any silent error handling. Is it going to cause static analyzers to

Re: [PATCH] include: add BUG_WARN macro for internal bug cases.

2011-11-09 Thread Alan Coopersmith
On 11/08/11 21:14, Peter Hutterer wrote: There are plenty of cases that can only be triggered by a real bug in the server and doing the ErrorF dance manually everywhere is a tad painful and the error message is usually used only to find the spot in the file anyway. Plus, reading BUG_WARN

Re: [PATCH] dix: use BUG_WARN for xi2mask size issues

2011-11-09 Thread Chase Douglas
On 11/09/2011 03:55 PM, Alan Coopersmith wrote: On 11/08/11 21:15, Peter Hutterer wrote: Yes, we're likely corrupting memory here but really this is unlikely to be triggered other than a real bug in the server. In which case a stacktrace is going to be more useful than any silent error

Re: [PATCH 7/7] Fix gcc -Wwrite-strings warnings in xf86Modes code

2011-11-09 Thread Alan Coopersmith
On 11/09/11 05:54, walter harms wrote: -static char *direction[4] = { +static const char *direction[4] = { normal, left, inverted, just nit picking: this would be more consistent e.g with below. static const char *direction[]= { Perhaps, though the number of

Re: [PATCH 7/7] Fix gcc -Wwrite-strings warnings in xf86Modes code

2011-11-09 Thread Alan Coopersmith
On 11/09/11 16:47, Alan Coopersmith wrote: On 11/09/11 05:54, walter harms wrote: this looks like a case for asprintf() Yes it does, though that wouldn't belong in this patch, since it has nothing to do with clearing the -Wwrite-strings warnings. Separate patch to come. After further

[PULL updated] input fixed from Nov 9

2011-11-09 Thread Peter Hutterer
Updated with the build fixes for selinux and the warning fix Commit e7cb8f802adf6fc22e7a930c0dfc5c1076781c96 The following changes since commit 9cc44b955b27de33348d6a20bebc9704930ee18e: randr: Make the RRConstrainCursorHarder logic the same as miPointerSetPosition (2011-11-03 14:12:21 -0700)

[PATCH:libICE 0/6] gcc -Wwrite-strings warning fixes

2011-11-09 Thread Alan Coopersmith
plus a bonus cleanup of ancient cruft noticed in the process. Changes the definition of one public API function to take const char * arguments instead of char *, otherwise all changes are internal API or local functions only. Before this series, there were 62 -Wwrite-strings warnings in libICE.

[PATCH:libICE 1/6] Fix gcc -Wwrite-strings warnings in _IceDefaultErrorHandler

2011-11-09 Thread Alan Coopersmith
Had to split char *str into two variables, const char *str for the string literals just being passed to fprintf etal. and char *estr for use by EXTRACT_STRING for the results of malloc calls that get written to and then freed. Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com ---

[PATCH:libICE 4/6] Fix gcc -Wwrite-strings warnings in AuthNames handling

2011-11-09 Thread Alan Coopersmith
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- src/ICElibint.h | 26 +- src/getauth.c| 40 src/globals.h|2 +- src/process.c| 11 ++- src/protosetup.c |2 +- 5 files changed, 41

[PATCH:libICE 6/6] Remove ancient workaround for System V/386 Release 4.2 compiler bug

2011-11-09 Thread Alan Coopersmith
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- src/process.c | 12 +--- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/src/process.c b/src/process.c index b566010..1e53ef9 100644 --- a/src/process.c +++ b/src/process.c @@ -2279,17 +2279,7 @@

[PATCH:libICE 3/6] constify arguments to IceGetAuthFileEntry

2011-11-09 Thread Alan Coopersmith
Needed to clear gcc -Wwrite-strings warnings in callers Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- doc/ICElib.xml|6 +++--- include/X11/ICE/ICEutil.h |6 +++--- src/authutil.c|6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-)

[PATCH:libICE 2/6] Fix gcc -Wwrite-strings warnings in _IceError* functions

2011-11-09 Thread Alan Coopersmith
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- src/ICElibint.h | 10 +- src/error.c | 10 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ICElibint.h b/src/ICElibint.h index c112690..1254f6a 100644 --- a/src/ICElibint.h +++

[PATCH:libICE 5/6] Fix gcc -Wwrite-strings warnings in process.c

2011-11-09 Thread Alan Coopersmith
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- src/process.c | 24 +--- 1 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/process.c b/src/process.c index 2bb8d55..b566010 100644 --- a/src/process.c +++ b/src/process.c @@ -650,8 +650,8 @@