[Mesa-dev] [PATCH 1/2] intel: fix memmem() warning first arg shouldn't be NULL

Matt Turner mattst88 at gmail.com
Mon Oct 23 17:33:41 UTC 2017


On Sun, Oct 22, 2017 at 6:26 PM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> ---
>  src/intel/compiler/brw_eu_validate.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/intel/compiler/brw_eu_validate.c b/src/intel/compiler/brw_eu_validate.c
> index 9f72c650ddb..07318b9d3c0 100644
> --- a/src/intel/compiler/brw_eu_validate.c
> +++ b/src/intel/compiler/brw_eu_validate.c
> @@ -47,6 +47,9 @@ cat(struct string *dest, const struct string src)
>  static bool
>  contains(const struct string haystack, const struct string needle)
>  {
> +   if (!haystack.str)
> +      return false;
> +

Thanks. Strange that I don't see this. Must require a newer gcc than
what I have.

I just reviewed Eric Anholt's similar patch to solve this problem, so
we can drop this one.


More information about the mesa-dev mailing list