From 6340a4f7d0db95e002bcc39869da16c890a7d3a9 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 17 Apr 2014 12:55:06 +0200 Subject: [PATCH] remove WARN_UNUSED from public header WARN_UNUSED is only meant to be used internally (it does not even start with ISL_) and should therefore not appear in a public header. Signed-off-by: Sven Verdoolaege --- Makefile.am | 1 - basis_reduction_tab.c | 1 + configure.ac | 1 - include/isl/config.h.in | 1 - include/isl/ctx.h | 6 ------ isl_config_post.h | 6 ++++++ isl_tab.h | 1 + 7 files changed, 8 insertions(+), 9 deletions(-) delete mode 100644 include/isl/config.h.in diff --git a/Makefile.am b/Makefile.am index bf674c73..8f73e65f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -181,7 +181,6 @@ isl_closure_SOURCES = \ closure.c nodist_pkginclude_HEADERS = \ - include/isl/config.h \ include/isl/stdint.h pkginclude_HEADERS = \ include/isl/aff.h \ diff --git a/basis_reduction_tab.c b/basis_reduction_tab.c index dca77384..73e70743 100644 --- a/basis_reduction_tab.c +++ b/basis_reduction_tab.c @@ -11,6 +11,7 @@ #include #include #include "isl_tab.h" +#include struct tab_lp { struct isl_ctx *ctx; diff --git a/configure.ac b/configure.ac index 8da1b7bb..9b44f070 100644 --- a/configure.ac +++ b/configure.ac @@ -244,7 +244,6 @@ echo '#define GIT_HEAD_ID "'$GIT_HEAD_ID'"' > gitversion.h AH_BOTTOM([#include ]) AC_CONFIG_HEADERS(isl_config.h) -AC_CONFIG_HEADERS(include/isl/config.h) AC_CONFIG_FILES(Makefile) AC_CONFIG_FILES(doc/Makefile) if test $with_clang = system; then diff --git a/include/isl/config.h.in b/include/isl/config.h.in deleted file mode 100644 index 80430696..00000000 --- a/include/isl/config.h.in +++ /dev/null @@ -1 +0,0 @@ -#undef GCC_WARN_UNUSED_RESULT diff --git a/include/isl/ctx.h b/include/isl/ctx.h index 08bebd65..777ba650 100644 --- a/include/isl/ctx.h +++ b/include/isl/ctx.h @@ -39,12 +39,6 @@ #define __isl_subclass(super) #endif -#ifdef GCC_WARN_UNUSED_RESULT -#define WARN_UNUSED GCC_WARN_UNUSED_RESULT -#else -#define WARN_UNUSED -#endif - #if defined(__cplusplus) extern "C" { #endif diff --git a/isl_config_post.h b/isl_config_post.h index a9cdda34..5d67aae4 100644 --- a/isl_config_post.h +++ b/isl_config_post.h @@ -5,3 +5,9 @@ #if (HAVE_DECL_FFS==0) && (HAVE_DECL___BUILTIN_FFS==1) #define ffs __builtin_ffs #endif + +#ifdef GCC_WARN_UNUSED_RESULT +#define WARN_UNUSED GCC_WARN_UNUSED_RESULT +#else +#define WARN_UNUSED +#endif diff --git a/isl_tab.h b/isl_tab.h index e37b7e2d..ff0f8c96 100644 --- a/isl_tab.h +++ b/isl_tab.h @@ -14,6 +14,7 @@ #include #include #include +#include struct isl_tab_var { int index; -- 2.11.4.GIT