[Mesa-dev] [PATCH] mesa: remove unnecessary uninitialized_var() macro
Brian Paul
brianp at vmware.com
Sat Feb 28 07:43:40 PST 2015
Only used in one place. Just use conventional initializers there.
---
src/mesa/main/compiler.h | 8 --------
src/mesa/x86/common_x86.c | 3 +--
2 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index 796870d..a0ef75a 100644
--- a/src/mesa/main/compiler.h
+++ b/src/mesa/main/compiler.h
@@ -163,14 +163,6 @@ static inline GLuint CPU_TO_LE32(GLuint x)
#endif
-
-/*
- * A trick to suppress uninitialized variable warning without generating any
- * code
- */
-#define uninitialized_var(x) x = x
-
-
/**
* LONGSTRING macro
* gcc -pedantic warns about long string literals, LONGSTRING silences that.
diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c
index 25f5c40..61328b2 100644
--- a/src/mesa/x86/common_x86.c
+++ b/src/mesa/x86/common_x86.c
@@ -344,8 +344,7 @@ _mesa_get_x86_features(void)
#elif defined(USE_X86_64_ASM)
{
- unsigned int uninitialized_var(eax), uninitialized_var(ebx),
- uninitialized_var(ecx), uninitialized_var(edx);
+ unsigned int eax = 0, ebx = 0, ecx = 0, edx = 0;
/* Always available on x86-64. */
_mesa_x86_cpu_features |= X86_FEATURE_XMM | X86_FEATURE_XMM2;
--
1.9.1
More information about the mesa-dev
mailing list