Skip to content

Framework/TestRun: remove variable only used in 'assert'

Ryan Barnett requested to merge rjbarnet/cunit:fix-gcc8-compiler-error into master

While compiling with GCC 8 the following compiling error occurs:

cunit-3.2.6/CUnit/Sources/Framework/TestRun.c: In function ‘CU_get_run_results_string’: cunit-3.2.6/CUnit/Sources/Framework/TestRun.c:688:20: error: unused variable ‘r’ [-Werror=unused-variable] CU_pTestRegistry r = CU_get_registry();

Remove the unused 'r' variable from CU_get_run_results_string to fix and move function call of CU_get_registry() to the assert function.

Note: this is the proper fix for issue that was trying to be addressed in !56 (closed)

Signed-off-by: Ryan Barnett ryan.barnett@rockwellcollins.com

Merge request reports