Fix 'unused variable' warning when neon_i8mm is disabled
authorJonathan Wright <jonathan.wright@arm.com>
Mon, 30 Oct 2023 15:24:12 +0000 (15:24 +0000)
committerJonathan Wright <jonathan.wright@arm.com>
Mon, 30 Oct 2023 15:53:18 +0000 (15:53 +0000)
Guard hwcap2 feature interrogation on HAVE_NEON_I8MM so that it gets
disabled if neon_i8mm is disabled when configuring the build.

Bug: webm:1825
Change-Id: Ic6ff71f17387b96219591928a583d43560bb7c7a

vpx_ports/aarch64_cpudetect.c

index f56d588..539d09b 100644 (file)
@@ -104,7 +104,9 @@ static int arm_get_cpu_caps(void) {
 static int arm_get_cpu_caps(void) {
   int flags = 0;
   unsigned long hwcap = getauxval(AT_HWCAP);
+#if HAVE_NEON_I8MM
   unsigned long hwcap2 = getauxval(AT_HWCAP2);
+#endif  // HAVE_NEON_I8MM
 #if HAVE_NEON
   flags |= HAS_NEON;  // Neon is mandatory in Armv8.0-A.
 #endif  // HAVE_NEON