WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Remove "uninitialized_var" macro, which doesn't work

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Remove "uninitialized_var" macro, which doesn't work with clang
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Thu, 7 Apr 2011 12:55:49 +0100
Delivery-date: Thu, 07 Apr 2011 04:56:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxx>
# 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.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>

diff -r d07dbbb17473 -r 44e603c1c0cb xen/drivers/acpi/tables/tbutils.c
--- a/xen/drivers/acpi/tables/tbutils.c Thu Apr 07 12:19:13 2011 +0100
+++ b/xen/drivers/acpi/tables/tbutils.c Thu Apr 07 12:55:32 2011 +0100
@@ -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;
diff -r d07dbbb17473 -r 44e603c1c0cb xen/include/xen/compiler.h
--- a/xen/include/xen/compiler.h        Thu Apr 07 12:19:13 2011 +0100
+++ b/xen/include/xen/compiler.h        Thu Apr 07 12:55:32 2011 +0100
@@ -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 */

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Remove "uninitialized_var" macro, which doesn't work with clang, Tim Deegan <=