From 511fd46976419bd2653fe7aef4d345437765bcbb Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 16 Mar 2011 17:15:25 +0000 Subject: [PATCH] [build] Avoid spurious unused-but-set-variable warnings in gcc 4.6 The __table_entries() construction seems to trigger a false positive warning in gcc 4.6 relating to variables which are set but never used. Add __attribute__((unused)) to inhibit this warning. Reported-by: Ralph Giles Tested-by: Ralph Giles Signed-off-by: Michael Brown --- src/include/ipxe/tables.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/include/ipxe/tables.h b/src/include/ipxe/tables.h index 583ba51b..e35ce822 100644 --- a/src/include/ipxe/tables.h +++ b/src/include/ipxe/tables.h @@ -248,7 +248,8 @@ FILE_LICENCE ( GPL2_OR_LATER ); */ #define __table_entries( table, idx ) ( { \ static __table_type ( table ) __table_entries[0] \ - __table_entry ( table, idx ); \ + __table_entry ( table, idx ) \ + __attribute__ (( unused )); \ __table_entries; } ) /**