summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-11-23dmx: Build fix for -Werror=implicit-function-declarationHEADmasterJeremy Huddleston6-0/+95
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-11-23Fix gcc -Wwrite-strings warnings in xf86Modes codeAlan Coopersmith4-8/+8
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Fix gcc -Wwrite-strings warnings in xf86 ddxAlan Coopersmith22-53/+54
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23FindModule: stop copying const char *dirname to char *dirpathAlan Coopersmith1-8/+3
Not needed since 6cf844ab69926b split out the allocation/manipulation into the helper function, leaving FindModule just copying the pointer around, and causing gcc warnings and an unreachable call to free. Also no longer need to store the combined strlen results in dirlen. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Fix gcc -Wwrite-strings warnings in various extensionsAlan Coopersmith16-32/+32
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Fix gcc -Wwrite-strings warnings in XkbGetRulesDfltsAlan Coopersmith1-16/+5
Stop temporarily storing a pointer to a constant literal string in a char *, just to strdup it a few lines later. Fixes gcc -Wwrite-strings warnings: xkbInit.c: In function 'XkbGetRulesDflts': xkbInit.c:121:38: warning: assignment discards qualifiers from pointer target type xkbInit.c:123:23: warning: assignment discards qualifiers from pointer target type xkbInit.c:125:24: warning: assignment discards qualifiers from pointer target type xkbInit.c:127:25: warning: assignment discards qualifiers from pointer target type xkbInit.c:129:25: warning: assignment discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Remove redundant redeclarations of functions in the same header fileAlan Coopersmith3-13/+0
Exposed by recent addition of -Wredundant-decls to default CWARNFLAGS Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23sun_agp: cast key to uintptr_t before casting to (int *)Alan Coopersmith1-1/+1
Matches what linux_agp already does and prevents gcc from throwing up: sun_agp.c: In function 'xf86DeallocateGARTMemory': sun_agp.c:236:40: error: cast to pointer from integer of different size Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Mark XKB char * as const to clean up gcc -Wwrite-strings warningsAlan Coopersmith8-22/+22
Cleans up around 120 warnings from this set Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Mark arguments to fopen/popen/system wrappers as const char *Alan Coopersmith2-6/+6
Silencing more gcc -Wwrite-strings warnings Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Reduce unnecessary string copying in xkbtext routinesAlan Coopersmith1-10/+8
Instead of using sprintf to copy a static string to a local buffer, just to pass it to TryCopyStr, pass the static string to TryCopyStr directly, as is already done in other parts of this code. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Convert a bunch of sprintf to snprintf callsAlan Coopersmith20-115/+119
This batch is the straightforward set - others are more complex and need more analysis to determine right size to pass. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Remove xf86FormatPciBusNumber from API, inline the one place its usedAlan Coopersmith2-12/+6
Found no calls from current driver modules Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Move DoShowOptions to xf86Configure.c, delete xf86ShowOpts.cAlan Coopersmith3-123/+52
Gets rid of duplicate static copy of optionTypeToString by putting both callers of that helper function in the same source file. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Remove bad code from DoShowOptions (Xorg -showopts handler)Alan Coopersmith1-10/+2
When we want to print a string, it's okay to just print it. We don't need to first allocate a buffer 2 bytes bigger than the string, copy the entire string unmodified to the buffer, print the buffer, and then leak the buffer (though we AbortDDX 8 lines later, and then just in case we survived that, call exit as well, so the leak is short lived, just oh so pointless). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Convert glx/single2.c:DoGetString() to use asprintf()Alan Coopersmith1-3/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23LogVMessageVerb: Fix const mismatch warningAlan Coopersmith1-1/+1
"log.c", line 382: warning: assignment type mismatch: pointer to char "=" pointer to const char Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23AuthAudit: clean up string handling callsAlan Coopersmith1-6/+5
The extra "out" pointer to redirect writes to the array isn't needed since the removal of LBX (commit a9ed5a87902a), and eliminating it allows more logical use of sizeof(addr) in length-checked strlcpy & snprintf calls to write to it. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Remove unnecessary variable rtrn in XkbKeysymTextAlan Coopersmith1-4/+4
Also removes even more unnecessary use of variable assignment inside function arguments. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-11-23Make XIGetKnownProperty take a const char * argumentAlan Coopersmith2-2/+2
Now that MakeAtom takes const char *, so can XIGetKnownProperty. Clears 71 warnings from gcc -Wwrite-strings of the form: devices.c:145:5: warning: passing argument 1 of 'XIGetKnownProperty' discards qualifiers from pointer target type ../include/exevents.h:128:23: note: expected 'char *' but argument is of type 'const char *' Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-23Convert ProcRenderQueryFilters to use memcpy instead of strncpyAlan Coopersmith1-2/+2
We just got the string length with strlen, might as well use it to copy the whole string quickly instead of checking each character a second time to see if it's 0 or not. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Convert DetermineClientCmd to use strdup instead of malloc+strncpyAlan Coopersmith1-7/+1
*cmdname is initialized to NULL earlier in the function, so it's okay to overwrite it with NULL if strdup fails, don't need that extra check. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Convert dmxSetDefaultFontPath to use strdup instead of malloc+strncpyAlan Coopersmith1-7/+4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23matchDriverFromFiles: use one snprintf instead of strncpy/cat seriesAlan Coopersmith1-3/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Convert strncpy/strncat to strlcpy/strlcatAlan Coopersmith13-33/+21
As long as we're carrying around a compatibility copy in os/strl*.c, might as well use them. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Convert AllocXTestDevice to use asprintfAlan Coopersmith1-4/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Convert some malloc + strncpy pairs into strndup callsAlan Coopersmith3-11/+4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Add fallback implementation of strndup()Alan Coopersmith8-1/+133
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Linux test code fixed by: Keith Packard <keithp@keithp.com>
2011-11-23Fix Sun compiler check that got turned aroundAlan Coopersmith1-1/+1
Since the check is for !(compilers that support __builtin_constant_p) it needs to be !(gcc or new enough Sun cc), but was written as !(gcc or too old Sun cc). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Remove a couple Error() instances left behind by 09dbfcb0ad7b6c8Alan Coopersmith1-2/+2
Two instances found in the SIOCGIFCONF code for listing network interfaces. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-23Enable memory checking during unit testingAlan Coopersmith2-0/+2
If configure is generated with xorg-macros 1.16.0 or newer, and an appropriate memory checking library is found for the platform, use it when running unit tests. If not, then no harm is done. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Don't require ld -wrap for tests that don't need itAlan Coopersmith3-3/+10
If configure is generated with xorg-macros 1.16 or later, this allows builders to --enable-unit-test and run the tests other than the xi2 tests which require ld -wrap (and are still wrapped in if HAVE_LD_WRAP in tests/xi2/Makefile). If an older xorg-macros is used, the existing behaviour is preserved of requiring ld -wrap for all unit tests, but no side effects occur, so the minimum xorg-macros version is not raised. If unit testing is enabled without ld -wrap, then we create a bogus "xi2-tests" script just to report that we're skipping them. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Don't fallback to wsfb or fbdev on SolarisAlan Coopersmith1-0/+2
We don't ship either one, so don't waste time and make confusing log entries trying to load them. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-11-23Fix Xdmx build on Linux to work with strlcpy changesAlan Coopersmith2-0/+5
Include strlcpy.c in the libdmxconfig.a library with the other functions shared among the xdmx configuration programs. Also add a #include "os.h" to the scanner.l file that now calls strlcpy to include the prototype from $(top_srcdir)/include/os.h. (To be squashed into http://cgit.freedesktop.org/~alanc/xserver/commit/?id=c19f0ff5223d428f8ad2ab3c563c974c96a521ba before next PULL request to avoid breaking bisection.) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-11-21docs: spell "X Server Version" consistently in titles. Add where missing.Gaetan Nadon6-4/+8
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-11-20Bump version to 1.11.99.1 (1.12 development release 1)xorg-server-1.11.99.1Keith Packard1-2/+2
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-11-20Add 'optionstr.h' to include/Makefile.amKeith Packard1-0/+1
This makes sure it gets distributed Signed-off-by: Keith Packard <keithp@keithp.com>
2011-11-18rootless: Fix a server crash when choosing a color with the gimp color wheeldtakahashi421-2/+2
https://trac.macports.org/ticket/30927 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-18edid: Add quirk for Acer Aspire One 110Ross Burton1-0/+5
At least one revision of the AAO reports a 190x110mm maximum size but a 451x113mm mode. X.Org Bug 41141 <https://bugs.freedesktop.org/show_bug.cgi?id=41141> Signed-off-by: Ross Burton <ross@linux.intel.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-18dri2: Register the DRI2DrawableType after server regenerationChris Wilson2-2/+15
The Resource database is reset upon regeneration and so the dri2 module needs to re-register its RESTYPE for the drawable or else it will clobber the next unsuspecting user of the database. Fortunately, DRI2 is loaded late in the initialisation sequence and was last up until xf86-video-intel started using the Resource database to track outstanding swaps... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2011-11-18DRI2: Avoid a NULL pointer dereferenceChris Wilson1-1/+2
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41211 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-18VidMode: prevent crash with no modesChris Wilson1-0/+3
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=17431 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-18record: Prevent out of bounds access when recording a reply.Rami Ylimäki3-24/+33
Any pad bytes in replies are written to the client from a zeroed array. However, record extension tries to incorrectly access the pad bytes from the end of reply data. Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
2011-11-18xfree86: Deprecate the use of xf86PciInfo.hJeremy Huddleston6-10/+3
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Tormod Volden <debian.tormod@gmail.com>
2011-11-18xfree86: Fix powerpc build with -Werror=int-to-pointer-cast ↵Jeremy Huddleston1-4/+4
-Werror=pointer-to-int-cast memType is a uint64_t on powerpc. Using memType only really makes sense for *physical* addresses, which can be 64-bit for 32-bit systems running on 64-bit hardware. However, unmapVidMem() only deals with *virtual* addresses, which are guaranteed to fit into an uintptr_t. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2011-11-14xfree86: Fix RandR rotation across server generationsPierre-Loup A. Griffais1-0/+3
245cb8e94fd1599 fixed xf86RotateDestroy() to actually run its teardown code, causing the Damage object to properly be re-allocated after a server regeneration. However the block that does that still thinks the Rotate layer BlockHandler is wrapped from the last generation, meaning the shadow pixmap is never re-allocated and the Damage object is never re-registered, causing a blank screen, and potentially a driver crash on the next teardown after the server asks it to free a 0x0 Pixmap. Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-11-14Merge remote-tracking branch 'whot/for-keith'Keith Packard11-37/+27
2011-11-10Xext: remove unused variable 'n'Peter Hutterer1-1/+1
xselinux_ext.c: In function 'SELinuxSendItemsToClient': xselinux_ext.c:340:16: warning: unused variable 'n' [-Wunused-variable] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-11-10Xext: don't swap CARD8 in SProcSELinuxQueryVersionPeter Hutterer1-5/+0
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 'wrong_size' declared with attribute error: wrong sized variable passed to swap xselinux_ext.c:533:62: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-11-09input: replace remaining GetPairedDevice() with GetMaster()Peter Hutterer7-27/+20
Wherever it's obvious which device we need (keyboard or pointer), use GetMaster() instead of GetPairedDevice(). It is more reliable in actually getting the device type we want. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>