[PATCH] gdi32/tests: Trace the invalid height in test_max_height().

Huw Davies huw at codeweavers.com
Wed Apr 27 02:51:55 CDT 2022


On Tue, Apr 26, 2022 at 04:57:14PM +0200, Francois Gouget wrote:
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> ---
>  dlls/gdi32/tests/font.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
> index 9c616e6a30b..86ab3f3632f 100644
> --- a/dlls/gdi32/tests/font.c
> +++ b/dlls/gdi32/tests/font.c
> @@ -6523,6 +6523,7 @@ static void test_max_height(void)
>  
>      /* test an invalid value */
>      for (i = 0; i < ARRAY_SIZE(invalid_height); i++) {
> +        winetest_push_context("height=%d", invalid_height[i]);

This is producing -Wformat warnings:

dlls/gdi32/tests/font.c: In function ‘test_max_height’:
dlls/gdi32/tests/font.c:6526:40: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘LONG’ {aka ‘long int’} [-Wformat=]
 6526 |         winetest_push_context("height=%d", invalid_height[i]);
      |                                       ~^   ~~~~~~~~~~~~~~~~~
      |                                        |                 |
      |                                        int               LONG {aka long int}
      |                                       %ld

Huw.



More information about the wine-devel mailing list