diff options
| -rwxr-xr-x | scripts/cppcheck.sh | 2 | ||||
| -rw-r--r-- | src/emess.c | 4 | ||||
| -rw-r--r-- | src/multistresstest.c | 5 | ||||
| -rw-r--r-- | src/pj_mutex.c | 3 | ||||
| -rw-r--r-- | src/proj_api.h | 5 | ||||
| -rw-r--r-- | src/projects.h | 4 |
6 files changed, 22 insertions, 1 deletions
diff --git a/scripts/cppcheck.sh b/scripts/cppcheck.sh index f1e19f81..bac95847 100755 --- a/scripts/cppcheck.sh +++ b/scripts/cppcheck.sh @@ -23,7 +23,7 @@ for dirname in ${TOPDIR}/src; do echo "Running cppcheck on $dirname... (can be long)" if ! cppcheck --inline-suppr --template='{file}:{line},{severity},{id},{message}' \ --enable=all --inconclusive --std=posix \ - -DCPPCHECK \ + -DCPPCHECK -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H\ "$dirname" \ -j 8 >>${LOG_FILE} 2>&1 ; then echo "cppcheck failed" diff --git a/src/emess.c b/src/emess.c index 330b8412..eb2ac9d6 100644 --- a/src/emess.c +++ b/src/emess.c @@ -9,6 +9,10 @@ # endif #endif +#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H +#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H +#endif + #include <errno.h> #include <stdarg.h> #include <stdio.h> diff --git a/src/multistresstest.c b/src/multistresstest.c index adedb8bd..b0bd5c9c 100644 --- a/src/multistresstest.c +++ b/src/multistresstest.c @@ -29,6 +29,11 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> + +#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H +#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H +#endif + #include "proj_api.h" #ifdef _WIN32 diff --git a/src/pj_mutex.c b/src/pj_mutex.c index ba1b2def..dc4a441b 100644 --- a/src/pj_mutex.c +++ b/src/pj_mutex.c @@ -40,6 +40,9 @@ #include "proj_config.h" #include "projects.h" #else +#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H +#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H +#endif #include "proj_api.h" #endif diff --git a/src/proj_api.h b/src/proj_api.h index 81cda69a..000a0baf 100644 --- a/src/proj_api.h +++ b/src/proj_api.h @@ -32,6 +32,11 @@ * when a few minor-version releases has been made. * */ + +#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H +#error 'To use the proj_api.h you must define the macro ACCEPT_USE_OF_DEPRECATED_PROJ_API_H' +#endif + #ifndef PJ_VERSION #define PJ_VERSION 600 #endif diff --git a/src/projects.h b/src/projects.h index ee0e2b65..c4f09a8d 100644 --- a/src/projects.h +++ b/src/projects.h @@ -29,6 +29,10 @@ #ifndef PROJECTS_H #define PROJECTS_H +#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H +#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H +#endif + #ifdef _MSC_VER # ifndef _CRT_SECURE_NO_DEPRECATE # define _CRT_SECURE_NO_DEPRECATE |
