diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-24 18:07:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-24 18:07:19 +0300 |
commit | 9d2eb460fa3569342044b6f3e61d52d86ca8cbb6 (patch) | |
tree | 70b9b43072ae67a379fea3693d8671bb75d2a0fa | |
parent | 30da377919524a96a385cbe16f8ab74d5a4a7fab (diff) | |
download | manaplus-9d2eb460fa3569342044b6f3e61d52d86ca8cbb6.tar.gz manaplus-9d2eb460fa3569342044b6f3e61d52d86ca8cbb6.tar.bz2 manaplus-9d2eb460fa3569342044b6f3e61d52d86ca8cbb6.tar.xz manaplus-9d2eb460fa3569342044b6f3e61d52d86ca8cbb6.zip |
fix compilation warnings.
-rw-r--r-- | src/actions/actions.h | 6 | ||||
-rw-r--r-- | src/actions/target.cpp | 4 | ||||
-rw-r--r-- | src/localconsts.h | 21 | ||||
-rw-r--r-- | src/logger.h | 11 |
4 files changed, 31 insertions, 11 deletions
diff --git a/src/actions/actions.h b/src/actions/actions.h index 2b32545da..f2407f936 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -80,7 +80,11 @@ namespace Actions decHandler(dump); decHandler(serverIgnoreAll); decHandler(serverUnIgnoreAll); - decHandler(error) __attribute__ ((noreturn)); + decHandler(error) +#ifndef ENABLE_CILKPLUS + __attribute__ ((noreturn)) +#endif + ; decHandler(dumpGraphics); decHandler(dumpEnvironment); decHandler(dumpTests); diff --git a/src/actions/target.cpp b/src/actions/target.cpp index 7195f5d0c..b4a2c8058 100644 --- a/src/actions/target.cpp +++ b/src/actions/target.cpp @@ -72,6 +72,8 @@ impHandler0(targetMercenary) { #ifdef EATHENA_SUPPORT return setTarget(ActorType::Mercenary, true); +#else + return false; #endif } @@ -79,6 +81,8 @@ impHandler0(targetPet) { #ifdef EATHENA_SUPPORT return setTarget(ActorType::Pet, true); +#else + return false; #endif } diff --git a/src/localconsts.h b/src/localconsts.h index 4c4827d70..7cddefdcd 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -81,17 +81,26 @@ #define gnu_printf printf #endif +#ifdef ENABLE_CILKPLUS +#include <cilk/cilk.h> +#endif + #ifdef __GNUC__ #ifdef ENABLE_CILKPLUS -#if GCC_VERSION < 50000 -#define cilk_for for -#elif GCC_VERSION < 49000 +#if GCC_VERSION < 40900 #define cilk_for for #define cilk_spawn -#endif // GCC_VERSION < 50000 +#define cilk_sync +#elif GCC_VERSION < 50000 +#ifdef cilk_for +#undef cilk_for +#endif // cilk_for +#define cilk_for for +#endif // GCC_VERSION < 40900 #else // ENABLE_CILKPLUS #define cilk_for for #define cilk_spawn +#define cilk_sync #endif // ENABLE_CILKPLUS #endif // __GNUC__ @@ -157,7 +166,3 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif - -#ifdef ENABLE_CILKPLUS -#include <cilk/cilk.h> -#endif diff --git a/src/logger.h b/src/logger.h index 40ea191c2..da910fd57 100644 --- a/src/logger.h +++ b/src/logger.h @@ -152,14 +152,21 @@ class Logger final * Log an error and quit. The error will pop-up on Windows and Mac, and * will be printed to standard error everywhere else. */ - void error(const std::string &error_text) __attribute__ ((noreturn)); + void error(const std::string &error_text) +#ifndef ENABLE_CILKPLUS + __attribute__ ((noreturn)) +#endif + ; /** * Log an error and quit. The error will pop-up on Windows and Mac, and * will be printed to standard error everywhere else. */ void safeError(const std::string &error_text) - __attribute__ ((noreturn)); +#ifndef ENABLE_CILKPLUS + __attribute__ ((noreturn)) +#endif + ; void unimplimented(const int id); |