From e47afa43860e4350dce13689108096ab33c56d12 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 12 Dec 2016 16:19:45 +0100 Subject: [PATCH] Fix 'run_one_test defined but not used' warning when PJ_SELFTEST is not enabled --- src/pj_run_selftests.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pj_run_selftests.c b/src/pj_run_selftests.c index c0d59f73da..fe67e9cd38 100644 --- a/src/pj_run_selftests.c +++ b/src/pj_run_selftests.c @@ -30,6 +30,14 @@ #include +#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;