>>> *wide = new + ((unsigned long) (new < *wide) << 16 << 16);
>>> The comment says "Treating the comparison as a 1 and shifting it
>>> avoids a conditional branch".
>> Only on architectures with conditional moves - and, on those, the
>> version using ? : is likely to compile down to a conditio
Am 17.11.2013 20:20, schrieb Mouse:
*wide = new + ((unsigned long) (new < *wide) << 16 << 16);
The comment says "Treating the comparison as a 1 and shifting it
avoids a conditional branch".
Only on architectures with conditional moves - and, on those, the
version using ? : is likely to compi
Am 17.11.2013 21:30, schrieb Jonas Petersen:
Am 17.11.2013 20:20, schrieb Mouse:
And if it does, something is wrong anyway (from my understanding).
After all this is the trigger of the bug.
Does anyone know whether the bug triggers on systems with 64-bit longs?
I would say no, because there i
Hi,
On 17 November 2013 08:01, Keith Packard wrote:
> The only warning I removed from xorg-macros was -Wcast-qual as that
> makes it impossible to free a const char * pointer. Casts exist to
> work around limitations of the C type system, having it warn when
> we're doing that is annoying.
Yeah,
Am 17.11.2013 20:20, schrieb Mouse:
I guess the sizeof comparison would not be necessary since the
condition should never meet with 64-bit longs.
Unless it's in a code fragment that's used only on machines with
<64-bit longs, it will; X runs on systems with 64-bit longs.
I meant the condition "d
On 11/17/13 10:42 AM, Jonas Petersen wrote:
Am 16.11.2013 23:30, schrieb Alan Coopersmith:
cc'ing the xcb mailing list, since more people there know about how the
Xlib/xcb interaction in xcb_io works. For the people there who didn't
see the patches on xorg-devel, you can find them at:
http://
>*wide = new + ((unsigned long) (new < *wide) << 16 << 16);
> The comment says "Treating the comparison as a 1 and shifting it
> avoids a conditional branch".
Only on architectures with conditional moves - and, on those, the
version using ? : is likely to compile down to a conditional move
an
> From: Alan Coopersmith
> Date: Sun, 17 Nov 2013 09:44:11 -0800
>
> Never enabled in modular builds, was only enabled for SunOS 4.x in imake.
>
> Signed-off-by: Alan Coopersmith
Reviewed-by: Mark Kettenis
> ---
> src/Atoms.c |8 +--
> src/Makefile.am |3 +--
> src/StrToCurs
Am 16.11.2013 23:30, schrieb Alan Coopersmith:
cc'ing the xcb mailing list, since more people there know about how the
Xlib/xcb interaction in xcb_io works. For the people there who didn't
see the patches on xorg-devel, you can find them at:
http://patchwork.freedesktop.org/patch/15501/
http:/
Previously contained MGA HAL code, was left an empty shell by the
removal of USEMGAHAL in commit 94bbeb132c7eda.
Signed-off-by: Alan Coopersmith
---
src/Makefile.am |1 -
src/mga_esc.c | 13 -
2 files changed, 14 deletions(-)
delete mode 100644 src/mga_esc.c
diff --git a/sr
No point building & linking empty *.o files into the drivers.
Signed-off-by: Alan Coopersmith
---
src/Makefile.am | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index c649b3d..36b8d8b 100644
--- a/src/Makefile.am
+++ b/src/Makef
Never enabled in modular builds, was only enabled for SunOS 4.x in imake.
Signed-off-by: Alan Coopersmith
---
src/Atoms.c |8 +--
src/Makefile.am |3 +--
src/StrToCurs.c |2 +-
src/sharedlib.c | 67 ---
4 files changed, 3
Alan Coopersmith writes:
> Why not use _X_ATTRIBUTE_PRINTF from like all the existing
> uses in the X server code? It already has the right compiler/version checks
> built in.
Thanks! Will switch.
--
keith.pack...@intel.com
pgpqvWqXdvi8A.pgp
Description: PGP signature
On 11/17/13 12:01 AM, Keith Packard wrote:
Signed-off-by: Keith Packard
---
hw/xfree86/dri/dri.c | 30 ++
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index 6292e87..959288d 100644
--- a/hw/xfree86/dri/
Am 17.11.2013 09:26, schrieb Keith Packard:
Jonas Petersen writes:
It might take one or two hours, but when it reaches the 4294 million it will
explode into a "Fatal IO error 11".
This reproduces the bug in about 15 minutes on my machine:
/* cc -o nop nop.c `pkg-config --cflags --libs x11` *
Am 17.11.2013 14:06, schrieb Uli Schlachter:
Hi,
On 16.11.2013 22:37, Jonas Petersen wrote:
@@ -83,6 +83,10 @@ static void require_socket(Display *dpy)
"did not own the socket",
xcb_xlib_seq_number
Am 17.11.2013 11:58, schrieb Uli Schlachter:
On 16.11.2013 22:37, Jonas Petersen wrote:
+ /* Set bit 8 of 'request' when a 32-bit wrap has just happened
+* so the sequence stays correct relatively to 'last_flushed'. */
"1 << 32" does not set bit 8 and this doesn't set anything in
Hi,
On 16.11.2013 22:37, Jonas Petersen wrote:
> The assignment might be confusing at first. So I added a note.
>
> Signed-off-by: Jonas Petersen
> ---
> src/xcb_io.c |4
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/xcb_io.c b/src/xcb_io.c
> index f2978d0..acb1e3b 100644
> -
On 13-11-16 01:23 PM, Alan Coopersmith wrote:
> On 11/16/13 07:12 AM, Gaetan Nadon wrote:
>> On 13-11-16 02:05 AM, Alan Coopersmith wrote:
>>> Can't see why they were ever needed.
>>>
>>> Signed-off-by: Alan Coopersmith
>>> ---
>>> Makefile.am |2 +-
>>> x2pmp.c |1 -
>>> 2 files c
On 16.11.2013 22:37, Jonas Petersen wrote:
> By design the Xlib 32-bit internal request sequence numbers may wrap. There
> is two locations within xcb_io.c that are not wrap-safe. The value of
> last_flushed relies on the request to be sequential all the time. This is
> not given when the sequence
Jonas Petersen writes:
> It might take one or two hours, but when it reaches the 4294 million it will
> explode into a "Fatal IO error 11".
This reproduces the bug in about 15 minutes on my machine:
/* cc -o nop nop.c `pkg-config --cflags --libs x11` */
#include
#include
#include
Signed-off-by: Keith Packard
---
hw/xfree86/dri/dri.c | 30 ++
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index 6292e87..959288d 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -100,6 +100
Signed-off-by: Keith Packard
---
hw/xfree86/common/xf86Xinput.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index f563052..5b0b6a1 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xi
defaultFontPath is now a const char * so that it can be initialized
from a string constant. This patch kludges around that by inserting
suitable casts to eliminate warnings. Fixing this 'correctly' would
involve inserting some new variables and conditionals to use them.
Signed-off-by: Keith Packar
Make keys const void *
Signed-off-by: Keith Packard
---
Xext/hashtable.c | 6 +++---
Xext/hashtable.h | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Xext/hashtable.c b/Xext/hashtable.c
index 9d9ef89..76ebc6d 100644
--- a/Xext/hashtable.c
+++ b/Xext/hashtable.c
@@ -118
GC funcs and ops are const.
Remove unused variables.
Signed-off-by: Keith Packard
---
Xext/panoramiX.c | 4 ++--
Xext/xres.c | 2 --
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 2b3a570..90ae0d2 100644
--- a/Xext/panoramiX.c
+++ b/
Declare GC ops/funcs as const.
Use 'typeof' in the 'swap' macro to capture the right type.
Signed-off-by: Keith Packard
---
exa/exa.c | 4 ++--
exa/exa_priv.h | 12 ++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/exa/exa.c b/exa/exa.c
index f8e499c..e961733 100
Signed-off-by: Keith Packard
---
hw/xfree86/common/xf86VGAarbiterPriv.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/common/xf86VGAarbiterPriv.h
b/hw/xfree86/common/xf86VGAarbiterPriv.h
index ba6edfc..f91de0c 100644
--- a/hw/xfree86/common/xf86VGAarbiterPriv
Signed-off-by: Keith Packard
---
hw/xfree86/i2c/bt829.c| 17 +
hw/xfree86/i2c/msp3430.c | 6 +++---
hw/xfree86/vbe/vbeModes.c | 4 +++-
3 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/hw/xfree86/i2c/bt829.c b/hw/xfree86/i2c/bt829.c
index 070cb20..991c26e 10
Unused fPtr variable. Deal with string constants.
Signed-off-by: Keith Packard
---
hw/xfree86/fbdevhw/fbdevhw.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index cbb4093..0450822 100644
--- a/hw/xfree86/f
Lots more const char stuff.
Remove duplicate defs of CoreKeyboardProc and CorePointerProc from
test/xi2/protocol-common.c
Signed-off-by: Keith Packard
---
Xi/extinit.c | 4 ++--
Xi/listdev.c | 2 +-
dix/devices.c | 11 ++-
dix/inpututils.c
Change GC private to match and fix resulting warnings
Signed-off-by: Keith Packard
---
hw/xfree86/shadowfb/shadow.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
index 6145017..6c66ffe 100644
--- a/hw/xfree86
Signed-off-by: Keith Packard
---
include/misc.h | 2 +-
os/utils.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/misc.h b/include/misc.h
index 17de710..165d42e 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -246,7 +246,7 @@ padding_for_int32(const int
mode names are now const
Signed-off-by: Keith Packard
---
hw/xfree86/vbe/vbeModes.c | 2 +-
hw/xfree86/vbe/vbeModes.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/vbe/vbeModes.c b/hw/xfree86/vbe/vbeModes.c
index 40bd985..50ac50d 100644
--- a/hw/xfree86/vbe/vb
Add gnu_printf attributes to debug functions.
PseudoramiXExtensionInit() is not defined in extinit.h if it won't be
used and we get a compiler warning when compiling the pseudoramiX code.
Signed-off-by: Keith Packard
---
Makefile.am | 6 +-
configure.ac | 2 ++
ps
fix exaDDXDriverInit to match.
Signed-off-by: Keith Packard
---
hw/xfree86/exa/examodule.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c
index 4e809ea..76f780a 100644
--- a/hw/xfree86/exa/examodule.c
+++ b/hw/xfree86/e
Adding _X_HIDDEN doesn't actually maange to hide these functions as
the compiler refuses to change the visibility from what was declared
in gl.h
Signed-off-by: Keith Packard
---
glx/glxstubs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/glx/glxstubs.c b/glx/glxstubs.c
ind
Signed-off-by: Keith Packard
---
config/udev.c | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/config/udev.c b/config/udev.c
index b55b78e..23a53f4 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -137,11 +137,13 @@ device_added(struct udev_device *udev_
A coupel of unused variables, and some debug code with mis-matching
printf format and variable types.
Signed-off-by: Keith Packard
---
mi/mieq.c | 4 ++--
mi/mipointer.c | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/mi/mieq.c b/mi/mieq.c
index 4c07480..bc7f945 1006
Signed-off-by: Keith Packard
---
hw/xfree86/common/xf86.h | 4
1 file changed, 4 deletions(-)
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 206a9d7..37ac42c 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -203,10 +203,6 @@ extern _X_EXPORT vo
Add const to lots of strings.
Signed-off-by: Keith Packard
---
include/xkbrules.h | 2 +-
include/xkbsrv.h | 2 +-
xkb/ddxLoad.c | 2 +-
xkb/maprules.c | 73 +-
xkb/xkbInit.c | 10
5 files changed, 47 insertions(+),
This lets them be initialized with string constants
Signed-off-by: Keith Packard
---
include/xkbrules.h | 40
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/include/xkbrules.h b/include/xkbrules.h
index d217318..5b69d0d 100644
--- a/inclu
Also removes DPMS functiosn from Xext/dpmsproc.h
Signed-off-by: Keith Packard
---
hw/xfree86/common/vidmodeproc.h | 2 +-
hw/xfree86/common/xf86.h| 7 +++
hw/xfree86/common/xf86AutoConfig.c | 4 +++-
hw/xfree86/common/xf86Config.c | 32 +++
These are needed by drivers, and it's better to export them from here
rather than redefining them in hw/xfree86 and exporting them from there.
Signed-off-by: Keith Packard
---
Xext/dpmsproc.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Xext/dpmsproc.h b/Xext/dpmsproc.
GC funcs and ops are const now, so all wrappers need to declare them
as such.
Signed-off-by: Keith Packard
---
miext/damage/damage.c| 3 +--
miext/damage/damagestr.h | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index 1
This gets the easy warnings, mostly constant string problems.
Signed-off-by: Keith Packard
---
hw/xfree86/ddc/ddc.c | 2 +-
hw/xfree86/dri2/dri2.c | 2 --
hw/xfree86/i2c/xf86i2c.h | 2 +-
hw/xfree86/int10/helper_exec.c | 42 +
This avoids compiler warnings when initializing with string constants.
Signed-off-by: Keith Packard
---
hw/xfree86/common/xf86str.h | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 4c2d147..0244fd4
As usual, mostly const char changes. However, filter_device_events had
a potentially uninitialized value, 'raw', which I added a bunch of
checks for. I suspect most of those are 'can't happen', but it's hard
to see that inside the function.
Signed-off-by: Keith Packard
---
Xext/xvmc.c |
Signed-off-by: Keith Packard
---
hw/dmx/config/Canvas.c | 8
hw/dmx/config/xdmxconfig.c | 6 +++---
hw/dmx/dmxclient.h | 2 ++
hw/dmx/input/dmxcommon.c| 2 +-
hw/dmx/input/dmxconsole.c | 4 ++--
hw/dmx/input/dmxevents.c| 3 +--
hw/dmx/input/dmxinputinit.c |
Signed-off-by: Keith Packard
---
xkb/xkb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xkb/xkb.c b/xkb/xkb.c
index c78aceb..27e761c 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -4419,7 +4419,7 @@ ProcXkbSetNames(ClientPtr client)
* (swapped) 16 bit string length, non-zero t
Signed-off-by: Keith Packard
---
hw/xfree86/int10/xf86x86emu.c | 3 +++
hw/xfree86/x86emu/x86emu/regs.h | 3 +++
2 files changed, 6 insertions(+)
diff --git a/hw/xfree86/int10/xf86x86emu.c b/hw/xfree86/int10/xf86x86emu.c
index 0f8737b..63268f4 100644
--- a/hw/xfree86/int10/xf86x86emu.c
+++ b/h
and fix resulting warnings
Signed-off-by: Keith Packard
---
hw/xfree86/parser/InputClass.c | 24
hw/xfree86/parser/xf86Parser.h | 2 +-
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/hw/xfree86/parser/InputClass.c b/hw/xfree86/parser/InputClass.c
index
const char in test/xfree86.c. Cast values to (intmax_t) for %ju format
in test/signal-logging.c.
Signed-off-by: Keith Packard
---
test/signal-logging.c | 6 +++---
test/xfree86.c| 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/test/signal-logging.c b/test/signal-lo
Just const char stuff.
Signed-off-by: Keith Packard
---
include/os.h | 4 ++--
os/access.c | 2 +-
os/auth.c| 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/os.h b/include/os.h
index 450e1a8..ca1ee3a 100644
--- a/include/os.h
+++ b/include/os.h
@@ -448,7 +448
Signed-off-by: Keith Packard
---
glx/glxdri2.c| 2 +-
glx/glxdricommon.c | 2 +-
glx/indirect_dispatch.c | 1 +
glx/indirect_dispatch_swap.c | 3 +++
glx/indirect_program.c | 2 ++
5 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/glx/glxdri2.c b/
Ok, I was shamed into fixing all of these warnings when someone
watched over my shoulder as I compiled the X server in the Delta lounge in
Narita. I've tried to break them into small patches so they can be
reviewed separately; there shouldn't be any real inter-dependencies.
The only warning I remo
Signed-off-by: Keith Packard
---
composite/compext.c | 4
1 file changed, 4 deletions(-)
diff --git a/composite/compext.c b/composite/compext.c
index e4821c5..e253f3c 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -335,12 +335,10 @@ ProcCompositeReleaseOverlayWindow(ClientPtr
---
hw/xfree86/common/xf86.h | 2 +-
hw/xfree86/common/xf86Mode.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 37ac42c..143be1e 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -389,7 +38
Make lots of string pointers 'const char' so that we can use constant
strings with them without eliciting warnings.
Signed-off-by: Keith Packard
---
hw/xfree86/common/dgaproc.h | 2 +-
hw/xfree86/common/xf86.h | 2 +-
hw/xfree86/common/xf86Configure.c | 6 ++-
hw/xfree86/common
59 matches
Mail list logo