[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxl: Allow AO_GC and EGC_GC even if not used


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Mon, 14 May 2012 16:32:39 +0000
  • Delivery-date: Mon, 14 May 2012 16:32:54 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
# Date 1336759141 -3600
# Node ID d66bee9704548312a2f79f1349b58fb808c61592
# Parent  15e8b3366b67d54bf6717d0b1f6bc8b460eb7be8
libxl: Allow AO_GC and EGC_GC even if not used

Mark the gc produced by AO_GC and EGC_GC with the gcc feature
__attribute__((unused)).  This allows the use of EGC_INIT and
STATE_AO_GC by functions which do actually use the gc.

This is convenient because those functions might want to use the ao or
egc, rather than the gc; and also because it means that functions
which morally ought to be fishing any gc they use out of an egc or
state structure can be written do so regardless of whether the gc is
actually used right then.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---


diff -r 15e8b3366b67 -r d66bee970454 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h      Fri May 11 18:59:01 2012 +0100
+++ b/tools/libxl/libxl_internal.h      Fri May 11 18:59:01 2012 +0100
@@ -1287,7 +1287,7 @@ libxl__device_model_version_running(libx
 /* useful for all functions which take an egc: */
 
 #define EGC_GC                                  \
-    libxl__gc *const gc = &egc->gc
+    libxl__gc *const gc __attribute__((unused)) = &egc->gc
 
 /* egc initialisation and destruction: */
 
@@ -1390,7 +1390,7 @@ _hidden void libxl__egc_cleanup(libxl__e
     })
 
 #define AO_GC                                   \
-    libxl__gc *const gc = &ao->gc
+    libxl__gc *const gc __attribute__((unused)) = &ao->gc
 
 #define STATE_AO_GC(op_ao)                      \
     libxl__ao *const ao = (op_ao);              \

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.