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@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
/* 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: */
})
#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); \