From 97e7de03cdb7b0945643ba443317038a8b34462d Mon Sep 17 00:00:00 2001 From: Jeremy Lakeman Date: Mon, 1 Sep 2014 11:55:50 +0930 Subject: [PATCH] Fix include order --- cli.h | 6 ++++++ conf_cli.c | 2 +- constants.h | 5 ----- keyring_cli.c | 2 +- network_cli.c | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/cli.h b/cli.h index 39236004..b98efc4a 100644 --- a/cli.h +++ b/cli.h @@ -23,6 +23,12 @@ #include #ifdef HAVE_JNI_H #include + +// Stop OpenJDK 7 from foisting their UNUSED() macro on us in +#ifdef UNUSED +# undef UNUSED +#endif + #endif #include "xprintf.h" #include "log.h" diff --git a/conf_cli.c b/conf_cli.c index c5dbf216..aea0d7ca 100644 --- a/conf_cli.c +++ b/conf_cli.c @@ -17,8 +17,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "conf.h" #include "cli.h" +#include "conf.h" #include "commandline.h" #include "strbuf.h" #include "strbuf_helpers.h" diff --git a/constants.h b/constants.h index eb538ed1..2e5f856a 100644 --- a/constants.h +++ b/constants.h @@ -25,11 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Number of elements in an array (Warning: does not work if A is a pointer!). #define NELS(A) (sizeof (A) / sizeof *(A)) -// Stop OpenJDK 7 from foisting their UNUSED() macro on us in -#ifdef UNUSED -# undef UNUSED -#endif - // To suppress the "unused parameter" warning from -Wunused-parameter. #ifndef __has_attribute #define __has_attribute(x) 0 diff --git a/keyring_cli.c b/keyring_cli.c index 6232ef74..8ca29fde 100644 --- a/keyring_cli.c +++ b/keyring_cli.c @@ -18,12 +18,12 @@ */ #include +#include "cli.h" #include "serval_types.h" #include "dataformats.h" #include "os.h" #include "conf.h" #include "mdp_client.h" -#include "cli.h" #include "commandline.h" #include "keyring.h" diff --git a/network_cli.c b/network_cli.c index 4e3e2a33..91a818a7 100644 --- a/network_cli.c +++ b/network_cli.c @@ -21,10 +21,10 @@ #include #include #include +#include "cli.h" #include "dataformats.h" #include "mdp_client.h" #include "conf.h" -#include "cli.h" #include "commandline.h" #include "sighandlers.h"