* Added longjmp to fail function to ensure that no code will be executed in test
function after failed assertion
+* Fix dead assignments and several possible NULL pointer dereferences
+
Tue, Sep 22, 2009: Released Check 0.9.8
based on r559 (2009-09-23 21:00).
}
break;
case CLEND_S:
- s = obj;
break;
case CLSTART_T:
break;
srunner_fprint (file, sr, CK_MINIMAL);
break;
case CLEND_S:
- s = obj;
break;
case CLSTART_T:
break;
break;
case CLEND_S:
fprintf(file, " </suite>\n");
- s = obj;
break;
case CLSTART_T:
break;
default:
eprintf("Bad fork status in SRunner", __FILE__, __LINE__);
}
- srunner_add_failure (sr, tr);
- log_test_end(sr, tr);
+
+ if ( NULL != tr ) {
+ srunner_add_failure (sr, tr);
+ log_test_end(sr, tr);
+ }
}
}
}
TestResult *tr;
tr = receive_test_result(0);
- if (tr == NULL)
+ if (tr == NULL) {
eprintf("Failed to receive test result", __FILE__, __LINE__);
- tr->tcname = tcname;
- tr->tname = tname;
- tr->iter = iter;
- set_nofork_info(tr);
+ } else {
+ tr->tcname = tcname;
+ tr->tname = tname;
+ tr->iter = iter;
+ set_nofork_info(tr);
+ }
return tr;
}
TestResult *tr;
tr = receive_test_result(waserror(status, expected_signal));
- if (tr == NULL)
+ if (tr == NULL) {
eprintf("Failed to receive test result", __FILE__, __LINE__);
- tr->tcname = tcname;
- tr->tname = tname;
- tr->iter = iter;
- set_fork_info(tr, status, expected_signal, allowed_exit_value);
+ } else {
+ tr->tcname = tcname;
+ tr->tname = tname;
+ tr->iter = iter;
+ set_fork_info(tr, status, expected_signal, allowed_exit_value);
+ }
return tr;
}