diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2016-12-12 16:19:45 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2016-12-12 16:19:45 +0100 |
| commit | e47afa43860e4350dce13689108096ab33c56d12 (patch) | |
| tree | 6738a34d6dbf27d6546c6aab030b47eef69e3b5c | |
| parent | bc7453d1a75aab05bdff2c51ed78c908e3efa3cd (diff) | |
| download | PROJ-e47afa43860e4350dce13689108096ab33c56d12.tar.gz PROJ-e47afa43860e4350dce13689108096ab33c56d12.zip | |
Fix 'run_one_test defined but not used' warning when PJ_SELFTEST is not enabled
| -rw-r--r-- | src/pj_run_selftests.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pj_run_selftests.c b/src/pj_run_selftests.c index c0d59f73..fe67e9cd 100644 --- a/src/pj_run_selftests.c +++ b/src/pj_run_selftests.c @@ -30,6 +30,14 @@ #include <projects.h> +#ifndef PJ_SELFTEST +int pj_run_selftests (int verbosity) { + printf ("This version of libproj is not configured for internal regression tests.\n"); + return 0; +} +#else + + static void run_one_test (const char *mnemonic, int (testfunc)(void), int verbosity, int *n_ok, int *n_ko, int *n_stubs) { int ret = testfunc (); switch (ret) { @@ -48,14 +56,6 @@ static void run_one_test (const char *mnemonic, int (testfunc)(void), int verbos } -#ifndef PJ_SELFTEST -int pj_run_selftests (int verbosity) { - printf ("This version of libproj is not configured for internal regression tests.\n"); - return 0; -} -#else - - int pj_run_selftests (int verbosity) { int n_ok = 0, n_ko = 0, n_stubs = 0, i = 0; |
