From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [PATCH 14/24] libxl: Allow AO_GC and EGC_GC even if not used Date: Mon, 16 Apr 2012 18:17:56 +0100 Message-ID: <1334596686-8479-15-git-send-email-ian.jackson@eu.citrix.com> References: <1334596686-8479-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1334596686-8479-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org 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 Acked-by: Ian Campbell --- tools/libxl/libxl_internal.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 4cfb8d5..74dc2c5 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -1280,7 +1280,7 @@ libxl__device_model_version_running(libxl__gc *gc, uint32_t domid); /* 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: */ @@ -1383,7 +1383,7 @@ _hidden void libxl__egc_cleanup(libxl__egc *egc); }) #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); \ -- 1.7.2.5