x86_simd_caps: make mask value unsigned
authorJames Zern <jzern@google.com>
Sat, 15 Feb 2020 01:39:22 +0000 (17:39 -0800)
committerJames Zern <jzern@google.com>
Sat, 15 Feb 2020 01:39:22 +0000 (17:39 -0800)
fixes -fsanitize=integer warning:
runtime error: implicit conversion from type 'int' of value -1 (32-bit,
signed) to type 'unsigned int' changed the value to 4294967295 (32-bit,
unsigned)

Change-Id: I95d41aade78cea5e4f870a804d3f358c2cf618d7

vpx_ports/x86.h

index ed26b16..14f4344 100644 (file)
@@ -166,7 +166,7 @@ static INLINE uint64_t xgetbv(void) {
 
 static INLINE int x86_simd_caps(void) {
   unsigned int flags = 0;
-  unsigned int mask = ~0;
+  unsigned int mask = ~0u;
   unsigned int max_cpuid_val, reg_eax, reg_ebx, reg_ecx, reg_edx;
   char *env;
   (void)reg_ebx;