TestRun.c: cast to int when using size_t in printf %*s format since printf expects an integer

parent c44afab4
......@@ -627,36 +627,36 @@ CU_EXPORT char * CU_get_run_results_string(void)
"%*s%*s%*u%*u%*u%*u%*u\n" /* len above! */
"%*s%*s%*u%*u%*u%*u%*s\n\n"
"%*s%d%*s",
width[0], _("Run Summary:"),
width[1], _("Type"),
width[2], _("Total"),
width[3], _("Ran"),
width[4], _("Passed"),
width[5], _("Failed"),
width[6], _("Inactive"),
width[0], " ",
width[1], _("suites"),
width[2], pRegistry->uiNumberOfSuites,
width[3], pRunSummary->nSuitesRun,
width[4], _("n/a"),
width[5], pRunSummary->nSuitesFailed,
width[6], pRunSummary->nSuitesInactive,
width[0], " ",
width[1], _("tests"),
width[2], pRegistry->uiNumberOfTests,
width[3], pRunSummary->nTestsRun,
width[4], pRunSummary->nTestsRun - pRunSummary->nTestsFailed,
width[5], pRunSummary->nTestsFailed,
width[6], pRunSummary->nTestsInactive,
width[0], " ",
width[1], _("asserts"),
width[2], pRunSummary->nAsserts,
width[3], pRunSummary->nAsserts,
width[4], pRunSummary->nAsserts - pRunSummary->nAssertsFailed,
width[5], pRunSummary->nAssertsFailed,
width[6], _("n/a"),
width[7], _("Elapsed time = "), (int)CU_get_elapsed_time(), /* makes sure time is updated */
width[8], _(" seconds")
(int)width[0], _("Run Summary:"),
(int)width[1], _("Type"),
(int)width[2], _("Total"),
(int)width[3], _("Ran"),
(int)width[4], _("Passed"),
(int)width[5], _("Failed"),
(int)width[6], _("Inactive"),
(int)width[0], " ",
(int)width[1], _("suites"),
(int)width[2], pRegistry->uiNumberOfSuites,
(int)width[3], pRunSummary->nSuitesRun,
(int)width[4], _("n/a"),
(int)width[5], pRunSummary->nSuitesFailed,
(int)width[6], pRunSummary->nSuitesInactive,
(int)width[0], " ",
(int)width[1], _("tests"),
(int)width[2], pRegistry->uiNumberOfTests,
(int)width[3], pRunSummary->nTestsRun,
(int)width[4], pRunSummary->nTestsRun - pRunSummary->nTestsFailed,
(int)width[5], pRunSummary->nTestsFailed,
(int)width[6], pRunSummary->nTestsInactive,
(int)width[0], " ",
(int)width[1], _("asserts"),
(int)width[2], pRunSummary->nAsserts,
(int)width[3], pRunSummary->nAsserts,
(int)width[4], pRunSummary->nAsserts - pRunSummary->nAssertsFailed,
(int)width[5], pRunSummary->nAssertsFailed,
(int)width[6], _("n/a"),
(int)width[7], _("Elapsed time = "), (int)CU_get_elapsed_time(), /* makes sure time is updated */
(int)width[8], _(" seconds")
);
result[len-1] = '\0';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment