Age | Commit message (Collapse) | Author |
|
Some suggested by cppcheck, others by manual code inspection
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
symbols.c:1057:28: portability: Shifting signed 32-bit value by 31 bits
is implementation-defined behaviour. See condition at line 1049.
[shiftTooManyBitsSigned]
radio_groups |= (1 << (tmp.uval - 1));
^
symbols.c:1049:41: note: Assuming that condition 'tmp.uval>32' is not redundant
if ((tmp.uval < 1) || (tmp.uval > XkbMaxRadioGroups))
^
symbols.c:1057:28: note: Shift
radio_groups |= (1 << (tmp.uval - 1));
^
symbols.c:1057:28: warning: Either the condition 'tmp.uval>32' is redundant
or there is signed integer overflow for expression '1<<(tmp.uval-1)'.
[integerOverflowCond]
radio_groups |= (1 << (tmp.uval - 1));
^
symbols.c:1049:41: note: Assuming that condition 'tmp.uval>32' is not redundant
if ((tmp.uval < 1) || (tmp.uval > XkbMaxRadioGroups))
^
symbols.c:1057:28: note: Integer overflow
radio_groups |= (1 << (tmp.uval - 1));
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.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>
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|