diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2025-08-09 15:43:51 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2025-08-09 15:43:51 -0700 |
commit | 0761a37a6111f22e2552f9f2245bddbb6d3db2bf (patch) | |
tree | 13605a94c488ffe0a970543544b1227c32e25ee6 | |
parent | 35e135831743406db39b7319aad6e16cbbd8451e (diff) |
Handles report from gcc 15.1:
handle.c: In function ‘parse_keysym’:
handle.c:333:10: warning: use of NULL ‘tmpname’ where non-null expected
[CWE-476] [-Wanalyzer-null-argument]
333 | if (!strcmp(*name, "NoSymbol")) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xmodmap/-/merge_requests/10>
-rw-r--r-- | handle.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -330,6 +330,8 @@ static Bool parse_keysym(const char *line, int n, char **name, KeySym *keysym) { *name = copy_to_scratch (line, n); + if (*name == NULL) + return (False); if (!strcmp(*name, "NoSymbol")) { *keysym = NoSymbol; return (True); |