test: fix -Wunused-but-set-variable warnings (#3829)
This commit is contained in:
parent
988d225cf0
commit
238ba3b625
@ -77,9 +77,7 @@ const char* fmt(double d) {
|
||||
int run_tests(int benchmark_output) {
|
||||
int actual;
|
||||
int total;
|
||||
int passed;
|
||||
int failed;
|
||||
int skipped;
|
||||
int current;
|
||||
int test_result;
|
||||
int skip;
|
||||
@ -102,9 +100,7 @@ int run_tests(int benchmark_output) {
|
||||
fflush(stdout);
|
||||
|
||||
/* Run all tests. */
|
||||
passed = 0;
|
||||
failed = 0;
|
||||
skipped = 0;
|
||||
current = 1;
|
||||
for (task = TASKS; task->main; task++) {
|
||||
if (task->is_helper) {
|
||||
@ -113,8 +109,8 @@ int run_tests(int benchmark_output) {
|
||||
|
||||
test_result = run_test(task->task_name, benchmark_output, current);
|
||||
switch (test_result) {
|
||||
case TEST_OK: passed++; break;
|
||||
case TEST_SKIP: skipped++; break;
|
||||
case TEST_OK: break;
|
||||
case TEST_SKIP: break;
|
||||
default: failed++;
|
||||
}
|
||||
current++;
|
||||
|
||||
@ -131,7 +131,10 @@ TEST_IMPL(env_vars) {
|
||||
|
||||
ASSERT(found == 2);
|
||||
#ifdef _WIN32
|
||||
ASSERT(found_win_special > 0);
|
||||
ASSERT_GT(found_win_special, 0);
|
||||
#else
|
||||
/* There's no rule saying a key can't start with '='. */
|
||||
(void) &found_win_special;
|
||||
#endif
|
||||
|
||||
uv_os_free_environ(envitems, envcount);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user