From ba54092842f8eb712f57448c33763cb56d8931da Mon Sep 17 00:00:00 2001 From: Sylvain Joubert Date: Mon, 4 Oct 2021 15:28:18 +0200 Subject: TestDriver: Fix old-style-cast warning in C++ mode A C-style cast was added by commit 3f6ff4b5db (create_test_sourcelist: add test driver option to run all tests, 2021-04-27, v3.21.0-rc1~257^2). Use our `CM_CAST` macro to adapt based on the language. --- Templates/TestDriver.cxx.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Templates') diff --git a/Templates/TestDriver.cxx.in b/Templates/TestDriver.cxx.in index 6ced8001ca..632bb8065c 100644 --- a/Templates/TestDriver.cxx.in +++ b/Templates/TestDriver.cxx.in @@ -138,7 +138,7 @@ int main(int ac, char* av[]) t = clock() - t; status_message = (status == -1) ? "not ok" : "ok"; { - double time_taken = ((double)t) / CLOCKS_PER_SEC; + double time_taken = CM_CAST(double, t) / CLOCKS_PER_SEC; printf("%s %d %s # %f\n", status_message, i + 1, name, time_taken); } } -- cgit v1.2.1