summaryrefslogtreecommitdiff
path: root/src/TMparse.c
AgeCommit message (Collapse)Author
2022-06-18cppcheck and clang --analyze fixesThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-06-14codespell-fixesThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-08-01improved the script used for typedef-options with indent, updated indentationThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-14remove the ARGUSED lines, which confuse GNU indent, ditto for LINTLIBRARYThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-14indent'd like "x-indent.sh", but with a more complete set of typedefs - seeThomas E. Dickey
https://github.com/ThomasDickey/cindent-snapshots/blob/master/scripts/xxx-profile Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-07fix a possibly-uninitialized quark, and remove unnecessary casts which ↵Thomas E. Dickey
produced warnings Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-07use _X_UNUSED to quiet compiler warningsThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-05-18fix most clang --analyze warnings about null-pointersThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-05-18fixes cppcheck "style" warnings (mostly variable-scope)Thomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-05-06fix 5 more simple gcc warningsThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-05-06fix gcc warnings when assigning into a bit-field by first masking the valueThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-04-22Fix leaks detected by covscanBenjamin Tissoires
The following leaks are reported by covscan: Error: RESOURCE_LEAK (CWE-772): libXt-20190411/src/ResConfig.c:542: alloc_arg: "_get_part" allocates memory that is stored into "part". libXt-20190411/src/ResConfig.c:544: noescape: Resource "part" is not freed or pointed-to in "_match_resource_to_widget". libXt-20190411/src/ResConfig.c:560: leaked_storage: Variable "part" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-772): libXt-20190411/src/TMgrab.c:108: alloc_arg: "XtKeysymToKeycodeList" allocates memory that is stored into "keycodes". libXt-20190411/src/TMgrab.c:115: var_assign: Assigning: "keycodeP" = "keycodes". libXt-20190411/src/TMgrab.c:124: leaked_storage: Variable "keycodeP" going out of scope leaks the storage it points to. libXt-20190411/src/TMgrab.c:124: leaked_storage: Variable "keycodes" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-772): libXt-20190411/src/TMparse.c:1544: alloc_fn: Storage is returned from allocation function "XtMalloc". libXt-20190411/src/TMparse.c:1544: var_assign: Assigning: "event" = storage returned from "XtMalloc(88U)". libXt-20190411/src/TMparse.c:1549: noescape: Resource "event" is not freed or pointed-to in "ParseQuotedStringEvent". libXt-20190411/src/TMparse.c:1555: leaked_storage: Variable "event" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-772): libXt-20190411/src/TMparse.c:1779: alloc_fn: Storage is returned from allocation function "XtMalloc". libXt-20190411/src/TMparse.c:1779: var_assign: Assigning: "action" = storage returned from "XtMalloc(32U)". libXt-20190411/src/TMparse.c:1784: noescape: Resource "action" is not freed or pointed-to in "ParseAction". libXt-20190411/src/TMparse.c:1785: leaked_storage: Variable "action" going out of scope leaks the storage it points to. In addition to this legitimate leaks, covscan can get confused by the allocated memory in XtKeysymToKeycodeList: Error: RESOURCE_LEAK (CWE-772): libXt-20190411/src/TMgrab.c:108: alloc_arg: "XtKeysymToKeycodeList" allocates memory that is stored into "keycodes". libXt-20190411/src/TMgrab.c:114: leaked_storage: Variable "keycodes" going out of scope leaks the storage it points to. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2019-04-16remove some debris...Thomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-04-16fix const-mismatches in TMparse.cThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-04-16This is a minimal change which compiles when predefining _CONST_X_STRING,Thomas E. Dickey
by changing some function parameters and struct-members to _XtString (always "char*") from String (which may be "const char *"). There are still many compiler warnings; subsequent commits will reduce those. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-04-06This cleans up the "easy" warning fixes which can be made using myThomas E. Dickey
Regress script, comparing object-files before/after the edits: https://invisible-island.net/ansification/index.html https://invisible-island.net/scripts/readme.html The changes are casts, which quiet the gcc warnings about implicit conversion that my "gcc-normal" script would show. I avoided reformatting the code. The change reduces the number of gcc warnings from 769 to 163. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-01-08resolv:assignment discards 'const' qualifier from pointer targetWalter Harms
2013-07-09Fix char vs. unsigned char warnings.Thomas Klausner
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-08unifdef -U__UNIXOS2__Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-07-30Fix DEBUG build (TMparse.c:376:1: error: overflow in implicit constant ↵Thomas Klausner
conversion) Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-07Add const attributes to TMparse typedefs to fix gcc -Wwrite-strings warningsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-06Purge cvs tags.Jesse Adkins
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-23Sun's copyrights belong to Oracle nowAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-01-14Update Sun license notices to current X.Org standard formAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-01-30Janitor: ansification, make distcheck, compiler warnings, .gitignore.Paulo Cesar Pereira de Andrade
Most "compiler" warnings were actually sparse warnings, due to assigning a integer to a pointer, or an external symbol without a previous declaration.
2005-05-18- conditionally include config.h in xc/lib/Xt sourcesXORG-6_8_99_8Søren Sandmann Pedersen
- add build system for lib/Xt
2005-02-21Convert lib/Xt to ANSI C (Thomas Dickey). Fixes for a few valgrind warningsXORG-6_8_99_3XORG-6_8_99_2XORG-6_8_99_1Matthieu Herrb
(Thomas Dickey).
2004-04-23Merging XORG-CURRENT into trunkXACE-SELINUX-MERGECOMPOSITEWRAPEgbert Eich
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0STSF-CURRENTEgbert Eich
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich
2003-11-25XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_902xf86-4_3_99_901xf86-4_3_99_16Kaleb Keithley
2003-11-14XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1Kaleb Keithley
2003-11-14R6.6 is the Xorg base-lineXORG-MAINKaleb Keithley