Signed-off-by: Serge Gautherie winehq-git_serge_180711@gautherie.fr --- "...\scanf.c(204): warning C4477: 'sscanf' : format string '%hd' requires an argument of type 'short *', but variadic argument 1 has type 'int *'" "...\scanf.c(209): warning C4477: 'sscanf' : format string '%hhd' requires an argument of type 'signed char *', but variadic argument 1 has type 'int *'" --- dlls/msvcrt/tests/scanf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcrt/tests/scanf.c b/dlls/msvcrt/tests/scanf.c index 5db9d43..07132e4 100644 --- a/dlls/msvcrt/tests/scanf.c +++ b/dlls/msvcrt/tests/scanf.c @@ -201,12 +201,12 @@ static void test_sscanf( void )
result = 0xdeadbeef; strcpy(buffer,"12345678"); - ret = p_sscanf(buffer, "%hd", &result); + ret = p_sscanf(buffer, "%hd", (short *)&result); ok(ret == 1, "Wrong number of arguments read: %d\n", ret); ok(result == 0xdead614e, "Wrong number read (%x)\n", result);
result = 0xdeadbeef; - ret = p_sscanf(buffer, "%hhd", &result); + ret = p_sscanf(buffer, "%hhd", (char *)&result); ok(ret == 1, "Wrong number of arguments read: %d\n", ret); ok(result == 0xbc614e, "Wrong number read (%x)\n", result);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=58966
Your paranoid android.
=== wvistau64 (task log) ===
Task errors: The previous 1 run(s) terminated abnormally
Not my patch: {{ ----- Run 1 log.err Could not copy the test executable to the VM: network read timed out (sendfile/connect:AgentVersion.h:0/9) BotError: The test VM has crashed, rebooted or lost connectivity (or the TestAgent server died) }}
On 03/11/2019 04:13, Marvin wrote:
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=58966
Your paranoid android.
=== wvistau64 (task log) ===
Task errors: The previous 1 run(s) terminated abnormally
Hi Serge,
On 11/3/19 3:51 AM, Serge Gautherie wrote:
"...\scanf.c(204): warning C4477: 'sscanf' : format string '%hd' requires an argument of type 'short *', but variadic argument 1 has type 'int *'" "...\scanf.c(209): warning C4477: 'sscanf' : format string '%hhd' requires an argument of type 'signed char *', but variadic argument 1 has type 'int *'"
Second warning doesn't have sense for msvcrt. It doesn't support %hhd format. What version of compiler shows these errors? I would expect that format/parameters are not validated when function pointer is used.
Thanks, Piotr
ReactOS, built with MSVC 2019 (I did not test older versions):
msvc: https://ci.appveyor.com/project/SergeGautherie/reactos/builds/28561079/job/7...
msvc-x64: https://ci.appveyor.com/project/SergeGautherie/reactos/builds/28561079/job/i...
On 05/11/2019 11:36, Piotr Caban wrote:
Hi Serge,
On 11/3/19 3:51 AM, Serge Gautherie wrote:
"...\scanf.c(204): warning C4477: 'sscanf' : format string '%hd' requires an argument of type 'short *', but variadic argument 1 has type 'int *'" "...\scanf.c(209): warning C4477: 'sscanf' : format string '%hhd' requires an argument of type 'signed char *', but variadic argument 1 has type 'int *'"
Second warning doesn't have sense for msvcrt. It doesn't support %hhd format. What version of compiler shows these errors? I would expect that format/parameters are not validated when function pointer is used.
Thanks, Piotr
Hi Serge,
This warnings are only displayed when modified scanf test are compiled (that link to sscanf directly). I still think there's nothing to fix in wine. Also the "%hhd" warning is incorrect unless you're accidentally linking to ucrtbase.
Thanks, Piotr
On 11/5/19 11:18 PM, Serge Gautherie wrote:
ReactOS, built with MSVC 2019 (I did not test older versions):
msvc: https://ci.appveyor.com/project/SergeGautherie/reactos/builds/28561079/job/7...
msvc-x64: https://ci.appveyor.com/project/SergeGautherie/reactos/builds/28561079/job/i...
On 05/11/2019 11:36, Piotr Caban wrote:
Hi Serge,
On 11/3/19 3:51 AM, Serge Gautherie wrote:
"...\scanf.c(204): warning C4477: 'sscanf' : format string '%hd' requires an argument of type 'short *', but variadic argument 1 has type 'int *'" "...\scanf.c(209): warning C4477: 'sscanf' : format string '%hhd' requires an argument of type 'signed char *', but variadic argument 1 has type 'int *'"
Second warning doesn't have sense for msvcrt. It doesn't support %hhd format. What version of compiler shows these errors? I would expect that format/parameters are not validated when function pointer is used.
Thanks, Piotr