crt: tests: remove explicit calls to `__mingw_printf` Tests `t_float` and `t_speed_powl` directly call `__mingw_printf`; according to relevant commit messages, it was done to suppress some compiler warnings. Instead of calling `__mingw_printf` directly, define `__MINGW_USE_ANSI_STDIO` to non-zero and use mingw-w64's `printf`. Signed-off-by: Kirill Makurin <maiddaisuki@outlook.com> Signed-off-by: LIU Hao <lh_mouse@126.com>
diff --git a/mingw-w64-crt/testcases/t_float.c b/mingw-w64-crt/testcases/t_float.c index 59d7f74..fc06599 100644 --- a/mingw-w64-crt/testcases/t_float.c +++ b/mingw-w64-crt/testcases/t_float.c
@@ -1,3 +1,4 @@ +#define __MINGW_USE_ANSI_STDIO 1 #include <inttypes.h> #include <math.h> #include <stdio.h> @@ -111,7 +112,7 @@ ARG3_FCT (fma, 2.0, 1.5); printf ("%g is%s nan\n", (double) in1, isnan (in1) ? "" :" not"); printf ("%g is%s inf\n", (double) in1, isinf (in1) ? "" :" not"); - __mingw_printf ("Ld:%Lg d:%g f:%g\n", ld1, ld2, (double) ld3); + printf ("Ld:%Lg d:%g f:%g\n", ld1, ld2, (double) ld3); return 0; }
diff --git a/mingw-w64-crt/testcases/t_speed_powl.c b/mingw-w64-crt/testcases/t_speed_powl.c index 87a7e94..bd2dfd4 100644 --- a/mingw-w64-crt/testcases/t_speed_powl.c +++ b/mingw-w64-crt/testcases/t_speed_powl.c
@@ -1,3 +1,4 @@ +#define __MINGW_USE_ANSI_STDIO 1 #include <math.h> #include <stdio.h> @@ -23,7 +24,7 @@ start_ticks = GetTickCount() - start_ticks; - __mingw_printf ("Loop %d times with result %Lg\n", i, ld); + printf ("Loop %d times with result %Lg\n", i, ld); printf ("Has %g calculations / ms\n", (double) i / (double) start_ticks); (void)sum;