summaryrefslogtreecommitdiff
path: root/dtc-lexer.l
diff options
context:
space:
mode:
author David Gibson <david@gibson.dropbear.id.au> 2017-03-06 12:06:15 +1100
committer David Gibson <david@gibson.dropbear.id.au> 2017-03-06 12:06:15 +1100
commit672ac09ea04d998dfddfdef3070a8af8d480182b (patch)
tree2df2c341562c7fedc27b7b2d44c97e77bd90593a /dtc-lexer.l
parent49300f2ade6a6ad9b19957b1fce41fccfe1246a3 (diff)
Clean up gcc attributes
We have a number of explicit __GNUC__ conditionals to tell if we want to use some gcc extensions for extra warnings. This cleans this up to use a single conditional, defining convenience macros for those attributes. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'dtc-lexer.l')
-rw-r--r--dtc-lexer.l7
1 files changed, 1 insertions, 6 deletions
diff --git a/dtc-lexer.l b/dtc-lexer.l
index 52bed7b..fd825eb 100644
--- a/dtc-lexer.l
+++ b/dtc-lexer.l
@@ -62,12 +62,7 @@ static int dts_version = 1;
static void push_input_file(const char *filename);
static bool pop_input_file(void);
-#ifdef __GNUC__
-static void lexical_error(const char *fmt, ...)
- __attribute__((format (printf, 1, 2)));
-#else
-static void lexical_error(const char *fmt, ...);
-#endif
+static void PRINTF(1, 2) lexical_error(const char *fmt, ...);
%}