Skip to contentSkip to conversation

Remove "uninitialized_var" macro, which doesn't work with clang

PATCH New Tim Deegan 1 participant 1 message Apr 7, 2011

lore
Share & tools
lore

Tim Deegan

author
#0 lore raw

PATCH 1/1 Remove "uninitialized_var" macro, which doesn't work with clang

# HG changeset patch
# User Tim Deegan <[email protected]>
# Date 1302177332 -3600
# Node ID 44e603c1c0cb9f278138da9dad446fd3493869b7
# Parent d07dbbb17473e8b668415b1db96112eaae9f2e09 Remove "uninitialized_var" macro, which doesn't work with clang. Since its only user is in ACPI parsing code, the extra overhead of initializing to 0 is not worth fighting over.

xen/drivers/acpi/tables/tbutils.c +1 -1
diff -r d07dbbb17473 -r 44e603c1c0cb xen/drivers/acpi/tables/tbutils.c
@@ -369,7 +369,7 @@ acpi_tb_parse_root_table(acpi_physical_a
 	u32 table_count;
 	struct acpi_table_header *table;
 	acpi_physical_address address;
-	acpi_physical_address uninitialized_var(rsdt_address);
+	acpi_physical_address rsdt_address = 0;
 	u32 length;
 	u8 *table_entry;
 	acpi_status status;
xen/include/xen/compiler.h +0 -6
diff -r d07dbbb17473 -r 44e603c1c0cb xen/include/xen/compiler.h
@@ -66,10 +66,4 @@
     __asm__ ("" : "=r"(__ptr) : "0"(ptr));      \
     (typeof(ptr)) (__ptr + (off)); })
 
-/*
- * A trick to suppress uninitialized variable warning without generating any
- * code
- */
-#define uninitialized_var(x) x = x
-
 #endif /* __LINUX_COMPILER_H */