[Mesa-dev] [PATCH 2/3] util: u_queue: fix android build error
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Thu Jul 5 11:14:00 UTC 2018
mesa/src/util/u_queue.c:242:15: error: address of array 'queue->name'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
src/util/u_queue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/u_queue.c b/src/util/u_queue.c
index 8a43320e59f..be95d9eec3f 100644
--- a/src/util/u_queue.c
+++ b/src/util/u_queue.c
@@ -239,7 +239,7 @@ util_queue_thread_func(void *input)
free(input);
- if (queue->name) {
+ if (strlen(queue->name) > 0) {
char name[16];
util_snprintf(name, sizeof(name), "%s%i", queue->name, thread_index);
u_thread_setname(name);
--
2.18.0
More information about the mesa-dev
mailing list