From: Trond Norbye Date: Mon, 12 Oct 2009 20:56:29 +0000 (+0200) Subject: Fix compile warning from gcc (assert may not terminate the program if NDEBUG is set) X-Git-Tag: 0.34~3^2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=b463bc16162d38d49663e7b77b9a3aaa326c2bf7;p=awesomized%2Flibmemcached Fix compile warning from gcc (assert may not terminate the program if NDEBUG is set) --- diff --git a/tests/test.c b/tests/test.c index d0d53292..7f7879dc 100644 --- a/tests/test.c +++ b/tests/test.c @@ -37,9 +37,9 @@ static const char *test_strerror(test_return_t code) case TEST_SKIPPED: return "skipped"; case TEST_MAXIMUM_RETURN: - default: + default: fprintf(stderr, "Unknown return value\n"); - assert(0); + abort(); } } @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) if (world.create) world_ptr= world.create(); - else + else world_ptr= NULL; startup_ptr= (server_startup_st *)world_ptr; @@ -132,7 +132,7 @@ int main(int argc, char *argv[]) gettimeofday(&end_time, NULL); load_time= timedif(end_time, start_time); - fprintf(stderr, "\t\t\t\t\t %ld.%03ld [ %s ]\n", load_time / 1000, + fprintf(stderr, "\t\t\t\t\t %ld.%03ld [ %s ]\n", load_time / 1000, load_time % 1000, test_strerror(failed)); if (next->post)