Commit graph

34 commits

Author SHA1 Message Date
Jeremy Huddleston
047993c76a Correct error handling in _XcursorAverageColor
Previously it would either div-zero or get stuck in a loop until int overflow
if called with a bad value.

cursor.c:214:32: warning: Division by zero
    return (0xff << 24) | ((red/npixels) << 16) | ((green/npixels) << 8) | (blue/npixels);

Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-07 10:16:18 -07:00
Chris Wilson
bee68e54e5 Free the FontInfo structure after loading the cursor from it.
References: https://bugs.freedesktop.org/show_bug.cgi?id=2731
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-01 12:16:56 +01:00
Chris Wilson
f49e7e1608 Free the partial header after failing to open the cursor.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-01 12:16:56 +01:00
Chris Wilson
073eb2c56f Free list on shutdown.
We freed the parent structure without freeing the list contained within,
making valgrind unhappy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-01 12:16:56 +01:00
Gaetan Nadon
a3e03bb23b config: move CWARNFLAGS from configure.ac to Makefile.am
Compiler warning flags should be explicitly set in the makefile
rather than being merged with other packages compiler flags.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-02-16 10:37:21 -05:00
Paulo Cesar Pereira de Andrade
f00ae32322 Janitor: make distcheck, compiler warnings, extra .gitignore files. 2009-01-29 15:34:11 -02:00
Matthieu Herrb
04641d3cc3 nuke RCS Ids 2008-03-09 00:34:36 +01:00
Tilman Sauerbeck
3c5d4f591c Store the cursor names in one large string.
This means the compiler doesn't need to place the array in the
read-write sections of the DSO, which means less relocations
when the library is loaded and a smaller memory footprint.
2007-05-12 22:41:27 +02:00
Alan Coopersmith
9df9640643 Fix many sparse warnings: Using plain integer as NULL pointer 2006-10-10 14:57:16 -07:00
Alan Coopersmith
b6b9f58855 Fix lint warning: deallocating a pointer that could be NULL: library.c(266) 2006-10-10 13:46:17 -07:00
Alan Coopersmith
d0e12a9784 Add XORG_WITH_LINT to allow checking code with lint/sparse/etc. 2006-10-10 13:33:33 -07:00
Chris Wilson
e0a501e91c fix leak in header destruction
Fix a couple of if (!foo) free(foo); tests.
2006-08-12 19:55:44 +03:00
Alan Coopersmith
2f08984396 renamed: .cvsignore -> .gitignore 2006-07-13 14:58:50 -07:00
Daniel Stone
c6f65af419 Bug #5268: Fix small memory leak. (Matthias Clasen). Change some return 0s
to NULL. Bump to 1.1.7.
2006-06-03 10:23:57 +00:00
Adam Jackson
f9bc007d71 Coverity #159: Prevent a possible NULL chase. 2006-04-07 00:58:59 +00:00
Kevin E Martin
189c967226 Add configure options to allow hard-coded paths to be changed. 2005-12-08 17:55:19 +00:00
Kevin E Martin
b8c92a26d0 Allow hard-coded paths to be configurable. 2005-12-08 17:54:40 +00:00
Adam Jackson
7c7bdccde9 Bug #4244: Make XcursorSetTheme(dpy, NULL) restore the default theme.
(Frederico Mena-Quintero)
2005-10-19 22:26:55 +00:00
Adam Jackson
7a5e360179 Do PKG_CHECK_MODULES on a unique token instead of on "DEP", so builds with
a global configure cache don't get confused.
2005-08-03 03:28:01 +00:00
Daniel Stone
b34368c667 Change soversion to 1.0.2 with -version-number. 2005-07-16 06:35:32 +00:00
Keith Packard
9ffefcd641 Add .cvsignore files Switch _la_CFLAGS for AM_CFLAGS to clean up directory 2005-07-09 06:13:36 +00:00
Keith Packard
b5a724c201 Make sure XFIXES appears in LIBS line, fix up other pkg-config usage. 2005-07-08 05:02:01 +00:00
Kevin E Martin
0881bb3ce0 Add appropriate lib*_CFLAGS to Makefile.am's -- fixes build problems 2005-07-02 06:35:03 +00:00
Daniel Stone
caa910e492 Import Xcursor 1.1.4 from freedesktop.org xlibs tree. 2005-06-29 18:46:53 +00:00
Daniel Stone
e67de73f5c Bug #1043: Fix leak when creating animated cursors. 2005-06-13 16:44:53 +00:00
Søren Sandmann Pedersen
4070c0af6c - Add Xcursor build system 2005-06-08 19:15:43 +00:00
Markus Kuhn
50911b052c Encoding of numerous files changed to UTF-8 2004-12-04 00:42:47 +00:00
Egbert Eich
cbcf471d91 Merging XORG-CURRENT into trunk 2004-04-23 18:43:40 +00:00
Egbert Eich
fb1739bd22 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 2004-03-14 08:32:05 +00:00
Egbert Eich
bfcfbe061f Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 2004-03-03 12:11:23 +00:00
Egbert Eich
c450b74503 readding XFree86's cvs IDs 2004-02-26 13:35:32 +00:00
Egbert Eich
79b8e8b996 Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 2004-02-26 09:22:42 +00:00
Kaleb Keithley
969878fc6f XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks 2003-11-25 19:28:09 +00:00
Kaleb Keithley
3b84b14bf0 Initial revision 2003-11-14 16:48:48 +00:00