summaryrefslogtreecommitdiffstats
path: root/src/include/builtins.h
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-04-08 14:45:30 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-04-18 09:13:58 -0500
commitd463911fd7122d75306f6ea9c042d96e1c3597c6 (patch)
treed96e1844d4644defb8233ddcc756fa00b23bd186 /src/include/builtins.h
parent79f790c2b9d6a368f61a99af07d04ed9348ca504 (diff)
downloadtalos-hostboot-d463911fd7122d75306f6ea9c042d96e1c3597c6.tar.gz
talos-hostboot-d463911fd7122d75306f6ea9c042d96e1c3597c6.zip
Add 'SUPPRESS_UNUSED_VARIABLE' macro to avoid compiler warnings.
Change-Id: Ic34fa1e141c1d75ea67933c02366016c732ac0c2 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4038 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/builtins.h')
-rw-r--r--src/include/builtins.h55
1 files changed, 32 insertions, 23 deletions
diff --git a/src/include/builtins.h b/src/include/builtins.h
index 7be919cca..1c07e8d04 100644
--- a/src/include/builtins.h
+++ b/src/include/builtins.h
@@ -1,30 +1,32 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/builtins.h $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/builtins.h $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
#include <stdint.h>
#ifndef _BUILTINS_H
#define _BUILTINS_H
+#include <util/pp/for_each.h>
+
#ifdef __cplusplus
extern "C"
{
@@ -62,11 +64,18 @@ extern "C"
#define SYMB_SECTION(x) __attribute__((section(#x)))
/**
- * Use of this macro will ensure a data structure is not padded
+ * Use of this macro will ensure a data structure is not padded
*/
#define PACKED __attribute__((packed))
/**
+ * Use of this macro will hide compile errors when a variable is not used,
+ * usually because it is used in debug / assert statements only.
+ */
+#define SUPPRESS_UNUSED_VARIABLE(...) \
+ PREPROCESSOR_FOR_EACH((void),##__VA_ARGS__)
+
+/**
* Compiler hint for branch conditions. "condition is likely to be true"
*/
#define likely(expr) __builtin_expect((expr),1)
OpenPOWER on IntegriCloud