Age | Commit message (Collapse) | Author |
|
Some suggested by cppcheck, others by manual code inspection
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
In function ‘HandleOverlayDef’,
inlined from ‘HandleSectionBody’ at geometry.c:2778:18,
inlined from ‘HandleSectionDef’ at geometry.c:2818:10,
inlined from ‘HandleGeometryFile’ at geometry.c:2864:18:
geometry.c:2573:9: warning: ‘strncpy’ output may be truncated copying
4 bytes from a string of length 4 [-Wstringop-truncation]
2573 | strncpy(key->over, keyDef->over, XkbKeyNameLength);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
geometry.c:2574:9: warning: ‘strncpy’ output may be truncated copying
4 bytes from a string of length 4 [-Wstringop-truncation]
2574 | strncpy(key->under, keyDef->under, XkbKeyNameLength);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Not needed in C89 and later
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>
|
|
All these wrappers did was mess with types.
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>
|
|
This addresses issue #21
Signed-off-by: Leandro Nini <drfiemost@email.it>
|
|
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>
|
|
Flagged by cppcheck 1.64:
[app/xkbcomp/geometry.c:2426] -> [app/xkbcomp/geometry.c:2427]:
(performance) Variable 'outline' is reassigned a value before
the old one has been used.
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>
|
|
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>
|
|
warning: declaration shadows a local variable [-Wshadow]
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
geometry.c:369:20: warning: argument to 'sizeof' in '__builtin___memset_chk' call is the same
pointer type 'RowInfo *' (aka 'struct _RowInfo *') as the destination; expected 'RowInfo'
(aka 'struct _RowInfo') or an explicit length [-Wsizeof-pointer-memaccess]
bzero(row, sizeof(RowInfo *));
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Gets rid of a compiler warning:
geometry.c: In function 'HandleOverlayDef':
geometry.c:2578: warning: the address of 'ol' will always evaluate as 'true'
X.Org bug#34219 <https://bugs.freedesktop.org/show_bug.cgi?id=34219>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
|
|
indent -cbi 0 -nprs -nut -npcs -i4 -bli 0 *.c *.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|