Mesa (master): util: fix -Wshift-count-overflow warning
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 17 21:53:21 UTC 2020
Module: Mesa
Branch: master
Commit: 5195a30d27ade4aabd3aa40b2dd9ac30e34a9e3c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5195a30d27ade4aabd3aa40b2dd9ac30e34a9e3c
Author: Michel Zou <xantares09 at hotmail.com>
Date: Sat Oct 31 13:18:30 2020 +0100
util: fix -Wshift-count-overflow warning
Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7392>
---
src/util/u_thread.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/util/u_thread.h b/src/util/u_thread.h
index bdfb05e158c..428ced09856 100644
--- a/src/util/u_thread.h
+++ b/src/util/u_thread.h
@@ -170,8 +170,9 @@ util_set_thread_affinity(thrd_t thread,
memset(old_mask, 0, num_mask_bits / 32);
old_mask[0] = m;
- if (sizeof(m) > 4)
- old_mask[1] = m >> 32;
+#ifdef _WIN64
+ old_mask[1] = m >> 32;
+#endif
}
return true;
More information about the mesa-commit
mailing list