This patch introduced a lot of dead code.
Alexandre Julliard wrote:
Module: wine Branch: master Commit: 35edd40f33ba8dce6d2c39fda46c6b5045947c1c URL: http://source.winehq.org/git/wine.git/?a=commit;h=35edd40f33ba8dce6d2c39fda4...
Author: Paul Vriens paul.vriens.wine@gmail.com Date: Thu Jul 5 16:35:10 2007 +0200
kernel32/tests 2/2: Use skip for not implemented function.
dlls/kernel32/tests/profile.c | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index 4824ce8..b875134 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -227,31 +227,37 @@ static void test_profile_sections_names(void) ok( ret == 25, "expected return size 25, got %d\n", ret ); ok( buf[ret+1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" );
/* Tests on nonexistent file */
memset(buf, 0xcc, sizeof(buf));
ret = GetPrivateProfileSectionNamesA( buf, 10, ".\not_here.ini" );
ok( ret == 0, "expected return size 0, got %d\n", ret );
ok( buf[0] == 0, "returned buffer not terminated with null\n" );
ok( buf[1] != 0, "returned buffer terminated with double-null\n" );
/* Test with sufficiently large buffer */
SetLastError(0xdeadbeef); ret = GetPrivateProfileSectionNamesW( bufW, 29, testfile3W );
Looks like some if () is missing here. The skip and return are therefor called unconditionally. Smatch is rightfully complaining about dead code after the return.
- {
skip("GetPrivateProfileSectionNamesW is not implemented\n");
DeleteFileA( testfile3 );
return;
- }
bye michael