https://bugs.freedesktop.org/show_bug.cgi?id=103248
--- Comment #4 from Vinson Lee <v...@freedesktop.org> ---
(In reply to Brian Paul from comment #3)
> How about this?
>
> return (t == NULL) ? ((char *) s + strlen(s)) : (char *) t;
Yes, the combined two changes fixes the build error for me.
diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h
index c4e7818088a7..3d2fd7e0c575 100644
--- a/tests/util/piglit-util.h
+++ b/tests/util/piglit-util.h
@@ -305,9 +305,9 @@ strtol_hex(const char *nptr, char **endptr)
static inline char *
strchrnul(const char *s, int c)
{
- char *t = strchr(s, c);
+ const char *t = strchr(s, c);
- return (t == NULL) ? ((char *) s + strlen(s)) : t;
+ return (t == NULL) ? ((char *) s + strlen(s)) : (char *) t;
}
#endif
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit