diff options
author | Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> | 2017-12-22 14:32:28 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2017-12-23 23:18:37 +0300 |
commit | 5d6aea3f7186a4533ffb7a2bc4858a1d339ebbb4 (patch) | |
tree | 639d83062534f3f1e96ef4229ce2d20778d6734a /test/common | |
parent | 260ca880b76151b66919cf0f3c149c2ba9ede24e (diff) |
test: workaround buggy CUnit header
Make GCC ignore following error:
In file included from odp_cunit_common.h:20:0,
from odp_cunit_common.c:13:
Automated.h:90:1: error: function declaration isn’t a
prototype [-Werror=strict-prototypes]
const char *CU_automated_package_name_get();
^
cc1: all warnings being treated as errors
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test/common')
-rw-r--r-- | test/common/odp_cunit_common.c | 14 | ||||
-rw-r--r-- | test/common/odp_cunit_common.h | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/test/common/odp_cunit_common.c b/test/common/odp_cunit_common.c index 55a39d910..6e51388f5 100644 --- a/test/common/odp_cunit_common.c +++ b/test/common/odp_cunit_common.c @@ -12,6 +12,20 @@ #include <odp_api.h> #include "odp_cunit_common.h" #include <odp/helper/odph_api.h> + +#include <CUnit/TestDB.h> + +#if defined __GNUC__ && (((__GNUC__ == 4) && \ + (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#endif +#include <CUnit/Automated.h> +#if defined __GNUC__ && (((__GNUC__ == 4) && \ + (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic pop +#endif + /* Globals */ static odph_odpthread_t thread_tbl[MAX_WORKERS]; static odp_instance_t instance; diff --git a/test/common/odp_cunit_common.h b/test/common/odp_cunit_common.h index 3727a4259..390e8f57b 100644 --- a/test/common/odp_cunit_common.h +++ b/test/common/odp_cunit_common.h @@ -16,8 +16,6 @@ #include <stdint.h> #include <inttypes.h> #include <CUnit/Basic.h> -#include <CUnit/TestDB.h> -#include <CUnit/Automated.h> #include <odp_api.h> #define MAX_WORKERS 32 /**< Maximum number of work threads */ |