diff options
author | Eric Anholt <[email protected]> | 2017-10-17 15:41:25 -0700 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-10-27 21:33:04 +0100 |
commit | 70ee0a45250c4121b800843d1f5c3c66b78988ff (patch) | |
tree | 066b6769719f6e6b501d9e12c73ae3367f7c5fab /.mailmap | |
parent | 17d988bfaab755cd4076224b199e9ca56eb68614 (diff) |
i965: Fix memmem compiler warnings.
gcc is throwing this warning in my meson build:
../src/intel/compiler/brw_eu_validate.c:50:11: warning
argument 1 null where non-null expected [-Wnonnull]
return memmem(haystack.str, haystack.len,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
needle.str, needle.len) != NULL;
~~~~~~~~~~~~~~~~~~~~~~~
The first check for CONTAINS has a NULL error_msg.str and 0 len. The
glibc implementation will exit without looking at any haystack bytes if
haystack.len < needle.len, so this was safe, but silence the warning
anyway by guarding against implementation variablility.
Fixes: 122ef3799d56 ("i965: Only insert error message if not already present")
Reviewed-by: Matt Turner <[email protected]>
(cherry picked from commit e91c3540fc620b39a16d5bce9fd75aa0ddd7ed7e)
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions