diff options
author | Jason Gerecke <jason.gerecke@wacom.com> | 2022-01-27 11:58:06 -0800 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2022-02-22 10:41:51 +1000 |
commit | ad8b081fab7c5e0889f0102fb41e2458d98c4164 (patch) | |
tree | d3e2b2633c54852a1139be9ba894d59ab35822dc | |
parent | 1f18309d63cf979afdeba6e8f5b67253b7d36a21 (diff) | |
download | xf86-input-wacom-ad8b081fab7c5e0889f0102fb41e2458d98c4164.tar.gz |
scan-build: Silence spurious null pointer warning when initializing tools
The scan-build tool notices that we can trigger a null dereference if
the value of `common->wcmTool` is NULL. This pointer is allocated and
assigned at initialization, however, so we should be able to avoid the
warning by simply asserting that it is non-null.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
-rw-r--r-- | src/wcmValidateDevice.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c index 10b2c7f..7c47b7c 100644 --- a/src/wcmValidateDevice.c +++ b/src/wcmValidateDevice.c @@ -827,6 +827,7 @@ Bool wcmPreInitParseOptions(WacomDevicePtr priv, Bool is_primary, goto error; } else /* No match on existing tool/serial, add tool to the end of the list */ { + assert(common->wcmTool != NULL); toollist = common->wcmTool; while(toollist->next) toollist = toollist->next; |