[PATCH 1/2] scrrun: Add test for GetTempName.

Nikolay Sivov nsivov at codeweavers.com
Mon Jan 24 02:29:04 CST 2022


Hi, Robert.

This looks fine, except for the compilation warning due to pointer 
return type of wcsstr():
>   CC dlls/scrrun/tests/filesystem.cross.o
> ../../wine-git/dlls/scrrun/tests/filesystem.c: In function 
> ‘test_GetTempName’:
> ../../wine-git/dlls/scrrun/tests/filesystem.c:485:18: warning: passing 
> argument 1 of ‘winetest_ok’ makes integer from pointer without a cast 
> [-Wint-conversion]
>   485 |     todo_wine ok(wcsstr( result,L".tmp"), "GetTempName 
> returned %s, expected .tmp suffix\n", debugstr_w(result));
>       |                  ^~~~~~~~~~~~~~~~~~~~~~~
>       |                  |
>       |                  wchar_t * {aka short unsigned int *}
> In file included from ../../wine-git/dlls/scrrun/tests/filesystem.c:31:
> ../../wine-git/include/wine/test.h:94:47: note: expected ‘int’ but 
> argument is of type ‘wchar_t *’ {aka ‘short unsigned int *’}
>    94 | extern void __winetest_cdecl winetest_ok( int condition, const 
> char *msg, ... ) __WINE_PRINTF_ATTR(2,3);
>       |                                           ~~~~^~~~~~~~~
>   CCLD   dlls/scrrun/tests/scrrun_test.exe

You can use ok(!!wcsstr..) to fix this.



More information about the wine-devel mailing list