Age | Commit message (Collapse) | Author |
|
Found by Oracle Parfait static analyzer:
Error: File Leak
File Leak [file-ptr-leak]:
Leaked File outFile
at line 497 of app/xkbcomp/listing.c in function 'GenerateListing'.
outFile initialized at line 432 with fopen
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Some suggested by cppcheck, others by manual code inspection
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
It's only used when DEBUG is defined, so don't build it when
we're not using it.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Stop exporting things that aren't used outside the file
that defines them.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
They just included an additional malloc.h header, but SGI Irix
has been unsupported for a decade now.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
All these wrappers did was mess with types and add a test for
NULL pointers that isn't needed in C89 and later.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Falls back to realloc() if platform doesn't offer reallocarray().
Also removes uRealloc() since it had no other uses.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
All these wrappers did was mess with types.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Some found by cppcheck, some found by manual code inspection
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Those macros date back to when varargs weren't a thing but they've
been #defined to the same value for 17 years now.
Patch generated with:
for action in WARN INFO ERROR ACTION FATAL WSGO; do
sed -i "s/${action}[1-9]/${action}/g" `git ls-files`
done
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Let's clean this up so I don't have to fight vim and git in removing them.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
w32api/rpcnndr.h (included by windows.h) uses TypeString as the name of a structure member.
xkbcomp.h defines it as a macro for a constant.
Define WIN32_LEAN_AND_MEAN to avoid this clash.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: David Macek <david.macek.0@gmail.com>
|
|
Flagged by cppcheck 1.64:
Checking app/xkbcomp/listing.c: WIN32...
[app/xkbcomp/listing.c:335]: (error) Uninitialized variable: nMatch
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
Most were fixed length or length checked anyway, this just saves time
doublechecking that. (A few could be replaced by asprintf, but we
don't have a copy guaranteed to be reachable from this program yet.)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
|
|
Include the specially wrapped windows.h in Xwindows.h, rather than
including it directly to avoid compilation errors due to clashing
definitions
Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
|
|
Remaining warnings are due to macros that check address or vectors
on the stack and auto generated yacc code.
Compiled with default flags and also as:
% make CFLAGS=-DENTRY_TRACKING_ON -DDEBUG_ON -DASSERTIONS_ON
to ensure the "simplification" of code like:
foo.c:
<hash>define DEBUG_VAR foo_VAR
<hash>include "foo.h"
...
foo.h:
<hash>ifdef DEBUG_VAR_NOT_LOCAL
extern
<hash>endif
int DEBUG_VAR;
...
did not change the author's "intended" logic.
|
|
POSIX.1-1990 is well below the current minimum bar
|
|
indent -cbi 0 -nprs -nut -npcs -i4 -bli 0 *.c *.h
|
|
|
|
mingw (Win32) port
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|