summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown2011-03-16 18:15:25 +0100
committerMichael Brown2011-03-16 20:31:44 +0100
commit511fd46976419bd2653fe7aef4d345437765bcbb (patch)
tree2c9c93027cd5873a383d71513f07d85098c01321 /src
parent[build] Allow workaround-specific flags to override default flags (diff)
downloadipxe-511fd46976419bd2653fe7aef4d345437765bcbb.tar.gz
ipxe-511fd46976419bd2653fe7aef4d345437765bcbb.tar.xz
ipxe-511fd46976419bd2653fe7aef4d345437765bcbb.zip
[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 <giles@thaumas.net> Tested-by: Ralph Giles <giles@thaumas.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r--src/include/ipxe/tables.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/ipxe/tables.h b/src/include/ipxe/tables.h
index 583ba51b8..e35ce8220 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; } )
/**