diff --git a/.pick_status.json b/.pick_status.json index f553606f032..7983090295e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -184,7 +184,7 @@ "description": "util: fix arithmetic on a pointer to void warning", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "555881e57499bc38f098dd5859edecdf6bdad2a2", "notes": null diff --git a/src/util/cache_ops_x86_clflushopt.c b/src/util/cache_ops_x86_clflushopt.c index ca97b9000f6..1b02f6845d7 100644 --- a/src/util/cache_ops_x86_clflushopt.c +++ b/src/util/cache_ops_x86_clflushopt.c @@ -21,6 +21,7 @@ * IN THE SOFTWARE. */ +#include #include "util/u_cpu_detect.h" #ifndef HAVE___BUILTIN_IA32_CLFLUSHOPT @@ -35,9 +36,9 @@ util_clflushopt_range(void *start, size_t size) const struct util_cpu_caps_t *cpu_caps = util_get_cpu_caps(); assert(cpu_caps->has_clflushopt); assert(cpu_caps->cacheline > 0); - void *p = (void *) (((uintptr_t) start) & - ~((uintptr_t)cpu_caps->cacheline - 1)); - void *end = start + size; + uint8_t *p = (uint8_t *) (((uintptr_t) start) & + ~((uintptr_t)cpu_caps->cacheline - 1)); + uint8_t *end = (uint8_t *)start + size; while (p < end) { __builtin_ia32_clflushopt(p);