Mesa (master): mesa/x86: put code in braces to silence declarations after code warning

Brian Paul brianp at kemper.freedesktop.org
Mon Aug 4 21:23:11 UTC 2014


Module: Mesa
Branch: master
Commit: b0b9871f6970f04c40735b968640a5a6bd1ca2bf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b0b9871f6970f04c40735b968640a5a6bd1ca2bf

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Aug  4 14:29:04 2014 -0600

mesa/x86: put code in braces to silence declarations after code warning

Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/mesa/x86/common_x86.c |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c
index b401c35..2a936a4 100644
--- a/src/mesa/x86/common_x86.c
+++ b/src/mesa/x86/common_x86.c
@@ -343,16 +343,18 @@ _mesa_get_x86_features(void)
 #endif
 
 #elif defined(USE_X86_64_ASM)
-   unsigned int uninitialized_var(eax), uninitialized_var(ebx),
-                uninitialized_var(ecx), uninitialized_var(edx);
+   {
+      unsigned int uninitialized_var(eax), uninitialized_var(ebx),
+                   uninitialized_var(ecx), uninitialized_var(edx);
 
-   /* Always available on x86-64. */
-   _mesa_x86_cpu_features |= X86_FEATURE_XMM | X86_FEATURE_XMM2;
+      /* Always available on x86-64. */
+      _mesa_x86_cpu_features |= X86_FEATURE_XMM | X86_FEATURE_XMM2;
 
-   __get_cpuid(1, &eax, &ebx, &ecx, &edx);
+      __get_cpuid(1, &eax, &ebx, &ecx, &edx);
 
-   if (ecx & bit_SSE4_1)
-      _mesa_x86_cpu_features |= X86_FEATURE_SSE4_1;
+      if (ecx & bit_SSE4_1)
+         _mesa_x86_cpu_features |= X86_FEATURE_SSE4_1;
+   }
 #endif /* USE_X86_64_ASM */
 
    (void) detection_debug;




More information about the mesa-commit mailing list