Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
Found by using:
codespell --builtin clear,rare,usage,informal,code,names
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
This restores the behavior pre 1aecdffaa0db7bbf85bc0aae9043e9437b25c30d, at
least when -R is given. For a normal invocation without -R we don't add the
current directory, because 1aecdff isn't totally wrong about whether that's a
good idea.
Fixes https://gitlab.freedesktop.org/xorg/app/xkbcomp/issues/3
|
|
xkbcomp.c:228:37: error: result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Werror,-Wstring-compare]
if ((argv[i][0] != '-') || (uStringEqual(argv[i], "-")))
^~~~~~~~~~~~~~~~~~~~~~~~~~
./utils.h:195:30: note: expanded from macro 'uStringEqual'
^~~~~~~~~~~~~~~~~~~~~
./utils.h:198:38: note: expanded from macro 'uStringCompare'
(s1)!=(s2):strcmp(s1,s2))
^ ~~~~
Don't attempt to do this macro trickery, and simply use strcmp instead,
where it applies.
Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244235
|
|
This patch improves -w option parsing even further, for cases like
"xkbcomp -w6 4.xkb out.xkb" (which were not handled by the fix of
the warning level is still optional (set to 0 if not present), and
errors like "xkbcomp -wfoo in out" are detected and reported.
https://bugs.freedesktop.org/show_bug.cgi?id=66344
Signed-off-by: Vincent Lefevre <vincent@vinc17.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
|
|
if the flag is "-w", then argv[i][1] is 'w' and unlikely to be a digit.
Access [2] instead, which is either \0 or an actual digit.
X.Org Bug 66344 <http://bugs.freedesktop.org/show_bug.cgi?id=66344>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Dew <marcoz@osource.org>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
When we opened a new file after encountering a parse error, we weren't
resetting our scan state, and continued to read out of the old buffer
rather than that of the new file.
Fixes a regression introduced in 9887842e ('Use fread() instead of
getc()').
Test case:
xkbcomp -lfhlpR "path/to/xkeyboard-config.git/symbols/*"
The Makefiles in that tree would cause parse errors, the resulting directory
file is incomplete (down from ~12000 to ~230 lines).
Reported-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
warning: declaration shadows a local variable [-Wshadow]
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
This commit isn't playing the WARN/M/M1 macro game. Version numbers to to
stdout, full stop.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
Without the fix xkbcomp may leave a truncated file in the filesystem
if there is not enough disk space. Using the truncated file leads to
problems.
Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.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.
|
|
|
|
|
|
indent -cbi 0 -nprs -nut -npcs -i4 -bli 0 *.c *.h
|
|
|
|
Allows the user to set maps (or whatever) on arbitrary devices.
|
|
|
|
mingw (Win32) port
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|