Eric Anholt [Wed, 18 Dec 2013 00:32:17 +0000 (16:32 -0800)]
glamor: Remove compat code for building out of tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Adam Jackson [Wed, 30 Oct 2013 13:56:46 +0000 (09:56 -0400)]
glamor: Remove copy of sna's compiler.h
Xfuncproto.h has equivalents for these already.
v2: Adjust a couple more likelies after the rebase (anholt)
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Eric Anholt [Thu, 9 Jan 2014 10:23:39 +0000 (18:23 +0800)]
glamor: Fix up some indentation damage on header prototypes.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Eric Anholt [Fri, 27 Dec 2013 19:46:30 +0000 (11:46 -0800)]
glamor: Fix some indent damage of putting a ' ' after the '*' for pointers.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Eric Anholt [Tue, 24 Dec 2013 23:59:14 +0000 (15:59 -0800)]
glamor: Fix some mangling of shader strings by indent.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Eric Anholt [Wed, 18 Dec 2013 19:59:07 +0000 (11:59 -0800)]
glamor: Apply x-indent.sh.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Eric Anholt [Wed, 18 Dec 2013 19:56:15 +0000 (11:56 -0800)]
glamor: Touch up some code so indent doesn't get confused.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Keith Packard [Wed, 22 Jan 2014 19:01:59 +0000 (11:01 -0800)]
dix: Praise clients which haven't run for a while, rather than idle clients
A client which is ready, but hasn't run for a while, should receive
the same benefit as one which has simply been idle for a while. Use
the smart_stop_tick to see how long it has been since a client has
run instead of smart_check_tick, which got reset each time a client
was ready, even if it didn't get to run.
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Keith Packard [Sun, 12 Jan 2014 18:53:31 +0000 (10:53 -0800)]
test/signal-formatting: Ignore compiler warnings
The signal formatting tests intentionally include code which generates
warnings with the current X server warning flags. Turn the compiler
warnings off
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Sun, 12 Jan 2014 18:44:22 +0000 (10:44 -0800)]
test/hashtabletest: Clean up -Wshadow errors
Declare 'XID id' local to each scope it is used in, rather than having
the first use be a function-wide declaration.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Sun, 12 Jan 2014 18:42:37 +0000 (10:42 -0800)]
test/xi2: Clean up -Wshadow warnings
protocol-common declares a bunch of pretty generic names; fix shadows
of these names.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Sun, 12 Jan 2014 18:42:01 +0000 (10:42 -0800)]
kdrive/ephyr: Remove extra 'i' variable in ProcXF86DRIGetDrawableInfo
Just re-use the top-level one
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Sun, 15 Dec 2013 09:57:09 +0000 (01:57 -0800)]
randr: Eliminate -Wshadow warnings
Don't use rrScrPriv for nested screen private fetching.
Eliminate a duplicate fetch of the randr screen private in rrCheckPixmapBounding.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Sun, 15 Dec 2013 09:56:36 +0000 (01:56 -0800)]
hw/xnest: Eliminate shadowed names
Just rename stuff; nothing fancy here.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Sun, 15 Dec 2013 09:55:43 +0000 (01:55 -0800)]
hw/vfb: Rename screenInfo parameter to screen_info
Avoid shadowing the global screenInfo value.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Sun, 15 Dec 2013 09:55:06 +0000 (01:55 -0800)]
kdrive: Fix -Wshadow errors
Just rename stuff to avoid conflicts.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Sun, 15 Dec 2013 09:53:50 +0000 (01:53 -0800)]
exa: Fix -Wshadow warnings
In exa_accel, there was a duplicate fetch of a pixmap private field.
exa_render just had a regular shadowed value.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Sun, 15 Dec 2013 09:52:58 +0000 (01:52 -0800)]
composite: Remove duplicate window pixmap fetch
There's nothing between the previous fetch and this one that could
cause the window pixmap to have changed.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Sun, 15 Dec 2013 09:41:19 +0000 (01:41 -0800)]
xfree86: Fix -Wshadow warnings
Just rename variables to eliminate -Wshadow warnings.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Sun, 15 Dec 2013 09:40:04 +0000 (01:40 -0800)]
Xi: Use 'void *' instead of 'Pointer' (which is going away)
There's no reason for XI to declare 'typedef char *Pointer' in a
shared header file; assume it will eventually go away and stop using
it here.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Sun, 15 Dec 2013 09:12:22 +0000 (01:12 -0800)]
os: Fix -Wshadow errors
Rename variables to avoid shadowing globals
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Fri, 13 Dec 2013 19:25:45 +0000 (11:25 -0800)]
Add 'FONT_PATH_NAME_ELEMENT_CONST' to dix-config.h and xorg-server.h
This signals to the fontsproto code that the X server has been fixed
to allow the name member in a FontPathElement struct to be declared
const to eliminate piles of warnings when assigning string constants
to them.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Fri, 13 Dec 2013 19:24:00 +0000 (11:24 -0800)]
Ignore a couple of format-nonliteral warnings
These are generated in code which uses sprintf as a convenient way to
construct strings from various pieces.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Wed, 11 Dec 2013 19:55:37 +0000 (11:55 -0800)]
include: GetClientResolutions is declared in font.h
No need to have a duplicate definition here.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Wed, 22 Jan 2014 19:33:53 +0000 (11:33 -0800)]
Merge remote-tracking branch 'whot/for-keith'
Keith Packard [Wed, 22 Jan 2014 19:32:35 +0000 (11:32 -0800)]
Merge remote-tracking branch 'dlespiau/
20131216-4k'
Alan Coopersmith [Sat, 4 Jan 2014 08:09:45 +0000 (00:09 -0800)]
If EAGAIN == EWOULDBLOCK, only need to check errno for one of them
Solaris <sys/errno.h> has:
#define EWOULDBLOCK EAGAIN
so checking (errno == EAGAIN || errno == EWOULDBLOCK) is overkill.
This leads cppcheck 1.62 to complain:
[xserver/os/io.c:365] -> [xserver/os/io.c:365]: (style) Same expression on both sides of '||'.
[xserver/os/io.c:941] -> [xserver/os/io.c:941]: (style) Same expression on both sides of '||'.
This quiets it, and reduces the number of calls Solaris Studio cc
generates to the __errno() function to get the thread-specific errno value.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Keith Packard [Wed, 22 Jan 2014 19:28:54 +0000 (11:28 -0800)]
Merge remote-tracking branch 'jeremyhu/master'
Keith Packard [Wed, 22 Jan 2014 19:27:36 +0000 (11:27 -0800)]
Merge remote-tracking branch 'anholt/xserver-unifdef'
Keith Packard [Wed, 22 Jan 2014 19:22:35 +0000 (11:22 -0800)]
Merge remote-tracking branch 'anholt/glamor-external-rebase'
Gaetan Nadon [Sun, 22 Dec 2013 00:58:32 +0000 (19:58 -0500)]
autoconf: fix warning by replacing AC_WARN with AC_MSG_WARN
A warning about the macro generating the warnings to the user...
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Gaetan Nadon [Sun, 22 Dec 2013 00:58:31 +0000 (19:58 -0500)]
xorg-tls: fix warning, replace AC_TRY_COMPILE with AC_COMPILE_IFELSE
The code produced in the configure script is identical.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Gaetan Nadon [Sun, 22 Dec 2013 00:58:30 +0000 (19:58 -0500)]
autoconf: fix warning, replace AC_TRY_COMPILE with AC_COMPILE_IFELSE
The code produced in the configure script is identical.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Gaetan Nadon [Sun, 22 Dec 2013 00:58:29 +0000 (19:58 -0500)]
autoconf: fix warning, replace AC_TRY_LINK with AC_LINK_IFELSE
The code produced in the configure script is identical.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Gaetan Nadon [Sun, 22 Dec 2013 00:58:28 +0000 (19:58 -0500)]
autoconf: fix warning by replacing deprecated AC_HELP_STRING
We can also make do without the workaround introduced in 2005.
The 2.60 autoconf minimum version covers that now.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Gaetan Nadon [Wed, 4 Dec 2013 18:28:04 +0000 (13:28 -0500)]
libtool: bump minimum required version to 2.2
LT_PREREQ([2.2])
LT_INIT
AC_CONFIG_MACRO_DIR([m4]) is recommended to locate local macros,
which is fully used starting automake 1.14.
ACLOCAL_AMFLAGS in Makefile.am is deprecated since automake 1.14.
The comment is to prevent developers from removing the statement
as suggested in 1.14 which would break earlier versions.
Automake 1.14 is already in use by many.
This patch works on versions prior and post 1.14
References:
Building the X Window System from Source:
http://www.x.org/wiki/Building_the_X_Window_System/#index2h3
Discussion on xorg minimum autotools requirements:
http://lists.x.org/archives/xorg-devel/2013-October/038325.html
Tested with autoconf 2.60, automake 1.10.3 and libtool 2.2
The same upgrade will be applied to libraries and drivers.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
Peter Hutterer [Mon, 13 Jan 2014 07:00:23 +0000 (17:00 +1000)]
os: restrict display names to digits
We call atoi() on the server's display to get the socket but otherwise use the
unmodified display for log file name, xkb paths, etc. This results in
Xorg :banana being the equivalent of Xorg :0, except for the log files being
in /var/log/Xorg.banana.log. I'm not sure there's a good use-case for this
behaviour.
Check the display for something that looks reasonable, i.e. digits only, but
do allow for :0.0 (i.e. digits, followed by a period, followed by one or two
digits).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Jeremy Huddleston Sequoia [Wed, 1 Jan 2014 19:10:41 +0000 (11:10 -0800)]
XQuartz: Avoid passing uninitialized pointers to X11ApplicationSetWindowMenu in AppleWMSetWindowMenu
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Jeremy Huddleston Sequoia [Wed, 1 Jan 2014 19:04:07 +0000 (11:04 -0800)]
XQuartz: Check for allocated memory before using it in AppleWMSetWindowMenu
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Jeremy Huddleston Sequoia [Wed, 1 Jan 2014 19:00:40 +0000 (11:00 -0800)]
XQuartz: Silence a clang static analysis warning about a memory leak
It seems the alanyzer can't comprehend dixSetPrivate().
quartz.c:119:12: warning: Potential leak of memory pointed to by 'displayInfo'
return quartzProcs->AddScreen(index, pScreen);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Jeremy Huddleston Sequoia [Wed, 1 Jan 2014 18:55:10 +0000 (10:55 -0800)]
XQuartz: Silence a clang static analysis warning about a possible memory leak on exit
stub.c:356:9: warning: Potential leak of memory pointed to by 'newargv'
asl_log(aslc, NULL, ASL_LEVEL_ERR,
^~~~~~~
stub.c:356:9: warning: Potential leak of memory pointed to by 'newenvp'
asl_log(aslc, NULL, ASL_LEVEL_ERR,
^~~~~~~
2 warnings generated.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Jeremy Huddleston Sequoia [Wed, 1 Jan 2014 18:47:52 +0000 (10:47 -0800)]
XQuartz: Validate length in appledri before swapping
Avoids potential memory corruption from bad requests
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Jeremy Huddleston Sequoia [Wed, 1 Jan 2014 18:39:56 +0000 (10:39 -0800)]
XQuartz: Validate screen in AppleDRIQueryDirectRenderingCapable requests
Return an error to the caller rather than crashing the server on
invalid screens.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Jeremy Huddleston Sequoia [Sun, 29 Dec 2013 20:45:23 +0000 (12:45 -0800)]
XQuartz: Simplify hook_run to quiet static analyzer
x-hook.c:96:9: warning: Called function pointer is an uninitalized pointer value
(*fun[i])(arg, data[i]);
^~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Jeremy Huddleston Sequoia [Sun, 29 Dec 2013 20:41:18 +0000 (12:41 -0800)]
XQuartz: Mark applicationWillTerminate: noreturn
X11Controller.m:938:1: warning: method 'applicationWillTerminate:' could be declared with attribute 'noreturn'
[-Wmissing-noreturn,Semantic Issue]
{
^
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Jeremy Huddleston Sequoia [Sun, 29 Dec 2013 20:36:51 +0000 (12:36 -0800)]
XQuartz: Fix get_proc_address signature
indirect.c:675:28: warning: incompatible pointer types passing 'glx_gpa_proc (*)(const char *)' to parameter of type
'glx_gpa_proc' (aka 'glx_func_ptr (*)(const char *)') [-Wincompatible-pointer-types,Semantic Issue]
__glXsetGetProcAddress(&get_proc_address);
^~~~~~~~~~~~~~~~~
../../../glx/glxserver.h:122:42: note: passing argument to parameter 'get_proc_address' here [Semantic Issue]
void __glXsetGetProcAddress(glx_gpa_proc get_proc_address);
^
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Jeremy Huddleston Sequoia [Sun, 29 Dec 2013 20:31:23 +0000 (12:31 -0800)]
XQuartz: Fix darwinfb.h header guard
./darwinfb.h:28:9: warning: '_DARWIN_FB_H' is used as a header guard here, followed by #define of a different macro
[-Wheader-guard,Lexical or Preprocessor Issue]
^~~~~~~~~~~~
./darwinfb.h:29:9: note: '_DARWIN_DB_H' is defined here; did you mean '_DARWIN_FB_H'? [Lexical or Preprocessor Issue]
^~~~~~~~~~~~
_DARWIN_FB_H
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Jeremy Huddleston Sequoia [Sun, 29 Dec 2013 20:22:55 +0000 (12:22 -0800)]
XQuartz: Silence some static analyzer warnings by annotating referencing counts
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Keith Packard [Sun, 29 Dec 2013 23:18:28 +0000 (15:18 -0800)]
Clean up a few function prototypes to not place formals in /**/
This just removes the comment markers from around the formals in
several function prototypes near where pointer -> void * changes were
made. There are plenty more of these to fix.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Keith Packard [Sun, 15 Dec 2013 09:05:51 +0000 (01:05 -0800)]
Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
is used throughout the X server for other things, and having duplicate
names generates compiler warnings.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Keith Packard [Wed, 11 Dec 2013 20:18:49 +0000 (12:18 -0800)]
Don't build dmx by default
It's clearly un-loved, having piles and piles of warnings. If someone
wants to fix it up to compile without warnings, we can re-enable it.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Wed, 11 Dec 2013 20:18:16 +0000 (12:18 -0800)]
hw/xfree86: nobus.c shouldn't define a static function
Having this function be static generates a compiler warning.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Wed, 11 Dec 2013 20:17:45 +0000 (12:17 -0800)]
kdrive/ephyr; Don't redeclare monitorResolution
It's already declared in globals.h
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Wed, 11 Dec 2013 20:16:51 +0000 (12:16 -0800)]
kdrive/ephyr: ddxUseMsg is supposed to return
I'm not sure why ephyr thinks that ddxUseMsg shouldn't return, but
it's not declared to exit.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Wed, 11 Dec 2013 19:55:01 +0000 (11:55 -0800)]
vfb: Remove unused pXWDCmap variable
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Wed, 11 Dec 2013 19:32:19 +0000 (11:32 -0800)]
xfree86: Switch int10 code to stdint types
CARD32 is not type compatible with uint32_t and ends up generating a
pile of warnings. Fix this by replacing all of the CARD* types with
stdint types.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Wed, 11 Dec 2013 19:31:46 +0000 (11:31 -0800)]
xfree86: Don't complain when the SDK dependency file doesn't exist yet
It won't exist until the build is complete, so don't complain about it
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:35:21 +0000 (23:35 -0800)]
xkb: Make XkbWriteCountedString take a const char * input parameter
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:34:59 +0000 (23:34 -0800)]
os: xstrtokenize takes and returns const char * now
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:33:59 +0000 (23:33 -0800)]
xfree86/vbe: Make VBEValidateModes take const char **
mode names are now const
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:33:18 +0000 (23:33 -0800)]
xfree86/shadowfb: GCFuncs and GCOps are now const
Change GC private to match and fix resulting warnings
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:32:40 +0000 (23:32 -0800)]
xfree86/parser: make strings in xf86MatchGroup const
and fix resulting warnings
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:31:55 +0000 (23:31 -0800)]
xfree86/int10: mark printk as _X_ATTRIBUTE_PRINTF
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:31:06 +0000 (23:31 -0800)]
xfree86/fbdevhw: Fix warnings
Unused fPtr variable. Deal with string constants.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:30:29 +0000 (23:30 -0800)]
xfree86/exa: xf86GetOptValString returns const char * now
fix exaDDXDriverInit to match.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:29:30 +0000 (23:29 -0800)]
xfree86/dri: Mark DRIDrvMsg and dri_drm_debug_print _X_ATTRIBUTE_PRINTF
And fix resulting warnings.
v2: (Adam Jackson) Cast handles through uintptr_t to avoid size change warnings
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:28:48 +0000 (23:28 -0800)]
xfree86/common: handle string constants in xf86Xinput configuration
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:28:16 +0000 (23:28 -0800)]
xfree86/common: Const GC funcs and ops in xf86VAarbiter
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:26:19 +0000 (23:26 -0800)]
xfree86/config: Kludge around const strings
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 Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:25:50 +0000 (23:25 -0800)]
config/udev: handle const strings
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:24:03 +0000 (23:24 -0800)]
composite: Remove unused pScreen variables
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 14:02:05 +0000 (06:02 -0800)]
test: Warning cleanup
const char in test/xfree86.c. Cast values to (intmax_t) for %ju format
in test/signal-logging.c.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 14:00:44 +0000 (06:00 -0800)]
xi: More warning cleanup for input
Lots more const char stuff.
Remove duplicate defs of CoreKeyboardProc and CorePointerProc from
test/xi2/protocol-common.c
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 13:55:38 +0000 (05:55 -0800)]
Xext: Clean up warnings in hashtable code
Make keys const void *
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 13:41:54 +0000 (05:41 -0800)]
exa: Clean up warnings
Declare GC ops/funcs as const.
Use 'typeof' in the 'swap' macro to capture the right type.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 13:28:47 +0000 (05:28 -0800)]
xkb: Clean up warnings
Add const to lots of strings.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 13:19:24 +0000 (05:19 -0800)]
os: Clean up warnings
Just const char stuff.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 13:05:44 +0000 (22:05 +0900)]
Xext: Clean up warnings
GC funcs and ops are const.
Remove unused variables.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 13:02:58 +0000 (22:02 +0900)]
damage: Clean up warnings
GC funcs and ops are const now, so all wrappers need to declare them
as such.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 13:00:29 +0000 (22:00 +0900)]
Clean up warnings in mi.
A coupel of unused variables, and some debug code with mis-matching
printf format and variable types.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 12:57:05 +0000 (21:57 +0900)]
Clean up warnings in DIX
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 <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 09:07:54 +0000 (18:07 +0900)]
hw/xfree86: More const declarations for strings
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 09:06:37 +0000 (18:06 +0900)]
Just remove dpms functsion from xf86.h
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 08:55:15 +0000 (17:55 +0900)]
Bunch of DMX warning fixes
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 08:43:46 +0000 (17:43 +0900)]
More warning fixes in hw/xfree86
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 08:36:26 +0000 (17:36 +0900)]
xfree86 warning reduction
This gets the easy warnings, mostly constant string problems.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:44:51 +0000 (23:44 -0800)]
Xext: _X_EXPORT DPMSSet and DPMSSupported
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 <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Sun, 17 Nov 2013 07:43:49 +0000 (23:43 -0800)]
include: Make xkbrules structures all const char *
This lets them be initialized with string constants
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 07:56:15 +0000 (16:56 +0900)]
xfree86/common: Warning fixes. Mostly const string handling.
Also removes DPMS functiosn from Xext/dpmsproc.h
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 07:24:15 +0000 (16:24 +0900)]
hw/xfree86: Lots of constant string support
Make lots of string pointers 'const char' so that we can use constant
strings with them without eliciting warnings.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Keith Packard [Fri, 15 Nov 2013 04:40:30 +0000 (13:40 +0900)]
hw/xfree86: Make strings in DriverRec and ScrnInfoRec const
This avoids compiler warnings when initializing with string constants.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Peter Hutterer [Thu, 9 Jan 2014 05:29:23 +0000 (15:29 +1000)]
ephyr: don't allow a shift+ctrl keygrab if mod1 was enabled
Xephyr wants ctrl+shift to grab the window, but that conflicts with
ctrl+alt+shift key combos. Remember the modifier state on key presses and
releases, if mod1 is pressed, we need ctrl, shift and mod1 released
before we allow a shift-ctrl grab activation.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Carlos Garnacho [Thu, 2 Jan 2014 20:33:30 +0000 (21:33 +0100)]
Xi: Ensure DeviceChanged is emitted after grabs are deactivated
When a grab on a slave device is deactivated, the master device must
be checked, just in case there were events from other devices while
the slave device was stolen away by the passive grab. This may
introduce misbehaviors on mismatching valuators and device features
later on UpdateDeviceState().
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Alan Coopersmith [Tue, 7 Jan 2014 01:10:40 +0000 (17:10 -0800)]
CheckPassiveGrabsOnWindow() needs to handle NULL return value from AllocGrab()
CheckPassiveGrabsOnWindow() calls AllocGrab() which can fail and return NULL.
This return value is not checked, and can cause NULL pointer dereferences.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Alan Coopersmith [Tue, 7 Jan 2014 01:10:39 +0000 (17:10 -0800)]
GrabDevice() needs to handle NULL return value from AllocGrab()
GrabDevice() calls AllocGrab() which can fail and return NULL.
This return value is not checked, and can cause NULL pointer dereferences.
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Alan Coopersmith [Tue, 7 Jan 2014 01:10:38 +0000 (17:10 -0800)]
If AllocGrab() fails to set up grab, don't copy to a NULL grab
If either the initial calloc or the xi2mask_new fails, grab is NULL,
but if a src grab is passed in, it was always being written to by
CopyGrab (and if that failed, dereferenced again in teardown).
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Keith Packard [Thu, 9 Jan 2014 03:10:11 +0000 (11:10 +0800)]
Bump release to 1.15.99.900
The merge window for 1.16 is open
Signed-off-by: Keith Packard <keithp@keithp.com>
Damien Lespiau [Wed, 31 Jul 2013 18:16:45 +0000 (19:16 +0100)]
xfree86: Use the TMDS maximum frequency to prune modes
Instead of only relying on the Range section, we can do better on
HDMI to find out what is the max dot clock the monitor supports. The
HDMI CEA vendor block adds a TMDS max freq we can use.
This makes X not prune 4k resolutions on HDMI.
v2: Replace X_INFO by X_PROBED in the message that prints the max
TMDS frequency (Chris Wilson)
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Wed, 7 Aug 2013 14:16:21 +0000 (15:16 +0100)]
xfree86: Refactor xf86MonitorIsHDMI() using xf86MonitorFindHDMIBlock()
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Damien Lespiau [Wed, 31 Jul 2013 18:11:45 +0000 (19:11 +0100)]
xfree86: Add a xf86MonitorFindHDMIBlock()
The HDMI CEA vendor specific block has some interesting information,
such as the maximum TMDS dot clock.
v2: Don't parse CEA blocks with invalid offsets, remove spurious
brackets (Chris Wilson)
v3: Fix the looping through the CEA data blocks, it had a typo using the
wrong variable coming from the code it was ported from.
Replace x << 16 + y << 8 + z by x << 16 | y << 8 | z
(Chris Wilson)
v4: Remove the stray ';' at the end of "if (*end == 0)".
(Dominik Behr on IRC)
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>