Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e330380a
Commit
e330380a
authored
Feb 10, 2011
by
Austin English
Committed by
Alexandre Julliard
Feb 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Don't check return values inside of if(0) (LLVM/Clang).
parent
8b7904d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
path.c
dlls/kernel32/tests/path.c
+9
-14
No files found.
dlls/kernel32/tests/path.c
View file @
e330380a
...
...
@@ -486,10 +486,7 @@ static void test_CurrentDirectoryA(CHAR *origdir, CHAR *newdir)
*/
if
(
0
)
{
SetLastError
(
0xdeadbeef
);
len
=
GetCurrentDirectoryA
(
42
,
(
LPSTR
)(
MAX_PATH
+
42
)
);
ok
(
len
==
0
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"GetCurrentDirectoryA failed to fail %u err %u
\n
"
,
len
,
GetLastError
()
);
GetCurrentDirectoryA
(
42
,
(
LPSTR
)(
MAX_PATH
+
42
)
);
}
/* SetCurrentDirectoryA shouldn't care whether the string has a
...
...
@@ -1241,7 +1238,7 @@ static void test_GetLongPathNameW(void)
/* NULL buffer with length crashes on Windows */
if
(
0
)
length
=
pGetLongPathNameW
(
shortpath
,
NULL
,
20
);
pGetLongPathNameW
(
shortpath
,
NULL
,
20
);
ok
(
DeleteFileW
(
shortpath
),
"Could not delete temporary file
\n
"
);
ok
(
RemoveDirectoryW
(
dirpath
),
"Could not delete temporary directory
\n
"
);
...
...
@@ -1302,7 +1299,8 @@ static void test_GetSystemDirectory(void)
total
=
res
;
/* this crashes on XP */
if
(
0
)
res
=
GetSystemDirectory
(
NULL
,
total
);
if
(
0
)
GetSystemDirectory
(
NULL
,
total
);
SetLastError
(
0xdeadbeef
);
res
=
GetSystemDirectory
(
NULL
,
total
-
1
);
...
...
@@ -1360,7 +1358,8 @@ static void test_GetWindowsDirectory(void)
total
=
res
;
/* this crashes on XP */
if
(
0
)
res
=
GetWindowsDirectory
(
NULL
,
total
);
if
(
0
)
GetWindowsDirectory
(
NULL
,
total
);
SetLastError
(
0xdeadbeef
);
res
=
GetWindowsDirectory
(
NULL
,
total
-
1
);
...
...
@@ -1415,7 +1414,7 @@ static void test_NeedCurrentDirectoryForExePathA(void)
/* Crashes in Windows */
if
(
0
)
ok
(
pNeedCurrentDirectoryForExePathA
(
NULL
),
"returned FALSE for NULL
\n
"
);
pNeedCurrentDirectoryForExePathA
(
NULL
);
SetEnvironmentVariableA
(
"NoDefaultCurrentDirectoryInExePath"
,
NULL
);
ok
(
pNeedCurrentDirectoryForExePathA
(
"."
),
"returned FALSE for
\"
.
\"\n
"
);
...
...
@@ -1442,7 +1441,7 @@ static void test_NeedCurrentDirectoryForExePathW(void)
/* Crashes in Windows */
if
(
0
)
ok
(
pNeedCurrentDirectoryForExePathW
(
NULL
),
"returned FALSE for NULL
\n
"
);
pNeedCurrentDirectoryForExePathW
(
NULL
);
SetEnvironmentVariableA
(
"NoDefaultCurrentDirectoryInExePath"
,
NULL
);
ok
(
pNeedCurrentDirectoryForExePathW
(
thispath
),
"returned FALSE for
\"
.
\"\n
"
);
...
...
@@ -1595,11 +1594,7 @@ static void test_SearchPathW(void)
if
(
0
)
{
/* NULL filename, crashes on nt4 */
SetLastError
(
0xdeadbeef
);
ret
=
pSearchPathW
(
pathW
,
NULL
,
NULL
,
sizeof
(
buffW
)
/
sizeof
(
WCHAR
),
buffW
,
&
ptrW
);
ok
(
ret
==
0
,
"Expected failure, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %x
\n
"
,
GetLastError
());
pSearchPathW
(
pathW
,
NULL
,
NULL
,
sizeof
(
buffW
)
/
sizeof
(
WCHAR
),
buffW
,
&
ptrW
);
}
/* empty filename */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment