mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16:14 +01:00
girparser: Silence a scan-build NULL pointer dereference warning
It’s very obviously a false positive, as `str` has been added to on the previous line, so can’t be `(void *) 0`. Not sure what scan-build is thinking. I’d rather not have this assertion (it doesn’t help the programmer’s understanding of the code), but I would also rather have scan-build running with no warnings so that it can helpfully catch newly-introduced errors in future. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #1767
This commit is contained in:
parent
d2f5cd4153
commit
f1d5a71bbc
@ -670,6 +670,9 @@ parse_type_internal (GIIrModule *module,
|
||||
type->is_pointer = TRUE;
|
||||
str += strlen ("Error");
|
||||
|
||||
/* Silence a scan-build false positive */
|
||||
g_assert (str != NULL);
|
||||
|
||||
if (*str == '<')
|
||||
{
|
||||
char *tmp, *end;
|
||||
|
Loading…
Reference in New Issue
Block a user