[Mesa-dev] [PATCH] ac/debug: use util_strchrnul() to fix android build error

Rob Herring robh at kernel.org
Thu Aug 24 22:24:48 UTC 2017


On Thu, Aug 24, 2017 at 4:52 PM, Mauro Rossi <issor.oruam at gmail.com> wrote:
> Similar to e09d04cd56 "radeonsi: use util_strchrnul() to fix android build error"
>
> Android Bionic does not support strchrnul() string function,
> gallium auxiliary util/u_string.h provides util_strchrnul()
>
> This change avoids the following warning and error:
>
> external/mesa/src/amd/common/ac_debug.c:501:15: warning: implicit declaration of function 'strchrnul' is invalid in C99
>                 char *end = strchrnul(out, '\n');
>                             ^
> external/mesa/src/amd/common/ac_debug.c:501:9: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int'
>                 char *end = strchrnul(out, '\n');
>                       ^     ~~~~~~~~~~~~~~~~~~~~
> 1 warning and 1 error generated.
>
> Fixes: c2c3912410 "ac/debug: annotate IB dumps with the raw values"
> ---
>  src/amd/common/ac_debug.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

You beat me to it. I've applied and pushed this.

Rob


More information about the mesa-dev mailing list