Skip to content

Commit

Permalink
Fix 'run_one_test defined but not used' warning when PJ_SELFTEST is n…
Browse files Browse the repository at this point in the history
…ot enabled
  • Loading branch information
rouault committed Dec 12, 2016
1 parent bc7453d commit e47afa4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/pj_run_selftests.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;

Expand Down

0 comments on commit e47afa4

Please sign in to comment.