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
7cebcce8
Commit
7cebcce8
authored
Feb 07, 2011
by
Austin English
Committed by
Alexandre Julliard
Feb 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl/tests: Make sure return values are used (LLVM/Clang).
parent
3dd514ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
25 deletions
+30
-25
localmon.c
dlls/localspl/tests/localmon.c
+30
-25
No files found.
dlls/localspl/tests/localmon.c
View file @
7cebcce8
...
@@ -208,8 +208,8 @@ static void test_AddPort(void)
...
@@ -208,8 +208,8 @@ static void test_AddPort(void)
if
(
0
)
if
(
0
)
{
{
/* NT4 crash on this test */
/* NT4 crash on this test */
res
=
pAddPort
(
NULL
,
0
,
NULL
);
pAddPort
(
NULL
,
0
,
NULL
);
}
}
/* Testing-Results (localmon.dll from NT4.0):
/* Testing-Results (localmon.dll from NT4.0):
...
@@ -445,8 +445,8 @@ static void test_ConfigurePort(void)
...
@@ -445,8 +445,8 @@ static void test_ConfigurePort(void)
if
(
0
)
if
(
0
)
{
{
/* NT4 crash on this test */
/* NT4 crash on this test */
res
=
pConfigurePort
(
NULL
,
0
,
NULL
);
pConfigurePort
(
NULL
,
0
,
NULL
);
}
}
/* Testing-Results (localmon.dll from NT4.0):
/* Testing-Results (localmon.dll from NT4.0):
...
@@ -486,8 +486,8 @@ static void test_DeletePort(void)
...
@@ -486,8 +486,8 @@ static void test_DeletePort(void)
if
(
0
)
if
(
0
)
{
{
/* NT4 crash on this test */
/* NT4 crash on this test */
res
=
pDeletePort
(
NULL
,
0
,
NULL
);
pDeletePort
(
NULL
,
0
,
NULL
);
}
}
/* Testing-Results (localmon.dll from NT4.0):
/* Testing-Results (localmon.dll from NT4.0):
...
@@ -573,10 +573,10 @@ static void test_EnumPorts(void)
...
@@ -573,10 +573,10 @@ static void test_EnumPorts(void)
if
(
0
)
if
(
0
)
{
{
/* The following tests crash this app with native localmon/localspl */
/* The following tests crash this app with native localmon/localspl */
res
=
pEnumPorts
(
NULL
,
level
,
NULL
,
cbBuf
,
&
pcbNeeded
,
&
pcReturned
);
pEnumPorts
(
NULL
,
level
,
NULL
,
cbBuf
,
&
pcbNeeded
,
&
pcReturned
);
res
=
pEnumPorts
(
NULL
,
level
,
buffer
,
cbBuf
,
NULL
,
&
pcReturned
);
pEnumPorts
(
NULL
,
level
,
buffer
,
cbBuf
,
NULL
,
&
pcReturned
);
res
=
pEnumPorts
(
NULL
,
level
,
buffer
,
cbBuf
,
&
pcbNeeded
,
NULL
);
pEnumPorts
(
NULL
,
level
,
buffer
,
cbBuf
,
&
pcbNeeded
,
NULL
);
}
}
/* The Servername is ignored */
/* The Servername is ignored */
...
@@ -747,9 +747,9 @@ static void test_XcvClosePort(void)
...
@@ -747,9 +747,9 @@ static void test_XcvClosePort(void)
if
(
0
)
if
(
0
)
{
{
/* crash with native localspl.dll (w2k+xp) */
/* crash with native localspl.dll (w2k+xp) */
res
=
pXcvClosePort
(
NULL
);
pXcvClosePort
(
NULL
);
res
=
pXcvClosePort
(
INVALID_HANDLE_VALUE
);
pXcvClosePort
(
INVALID_HANDLE_VALUE
);
}
}
...
@@ -761,12 +761,12 @@ static void test_XcvClosePort(void)
...
@@ -761,12 +761,12 @@ static void test_XcvClosePort(void)
if
(
res
)
{
if
(
res
)
{
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
res
=
pXcvClosePort
(
hXcv2
);
res
=
pXcvClosePort
(
hXcv2
);
ok
(
res
,
"returned %d with %u (expected '!= 0')
\n
"
,
res
,
GetLastError
());
ok
(
res
,
"returned %d with %u (expected '!= 0')
\n
"
,
res
,
GetLastError
());
if
(
0
)
if
(
0
)
{
{
/* test for "Double Free": crash with native localspl.dll (w2k+xp) */
/* test for "Double Free": crash with native localspl.dll (w2k+xp) */
res
=
pXcvClosePort
(
hXcv2
);
pXcvClosePort
(
hXcv2
);
}
}
}
}
}
}
...
@@ -1001,6 +1001,7 @@ static void test_XcvDataPort_GetTransmissionRetryTimeout(void)
...
@@ -1001,6 +1001,7 @@ static void test_XcvDataPort_GetTransmissionRetryTimeout(void)
/* the default timeout is returned, when the value is empty */
/* the default timeout is returned, when the value is empty */
res
=
RegSetValueExA
(
hroot
,
TransmissionRetryTimeoutA
,
0
,
REG_SZ
,
(
PBYTE
)
emptyA
,
1
);
res
=
RegSetValueExA
(
hroot
,
TransmissionRetryTimeoutA
,
0
,
REG_SZ
,
(
PBYTE
)
emptyA
,
1
);
ok
(
res
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
GetLastError
());
needed
=
(
DWORD
)
0xdeadbeef
;
needed
=
(
DWORD
)
0xdeadbeef
;
buffer
[
0
]
=
0xdeadbeef
;
buffer
[
0
]
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -1011,6 +1012,7 @@ static void test_XcvDataPort_GetTransmissionRetryTimeout(void)
...
@@ -1011,6 +1012,7 @@ static void test_XcvDataPort_GetTransmissionRetryTimeout(void)
/* the dialog is limited (1 - 999999), but that is done somewhere else */
/* the dialog is limited (1 - 999999), but that is done somewhere else */
res
=
RegSetValueExA
(
hroot
,
TransmissionRetryTimeoutA
,
0
,
REG_SZ
,
(
PBYTE
)
num_0A
,
lstrlenA
(
num_0A
)
+
1
);
res
=
RegSetValueExA
(
hroot
,
TransmissionRetryTimeoutA
,
0
,
REG_SZ
,
(
PBYTE
)
num_0A
,
lstrlenA
(
num_0A
)
+
1
);
ok
(
res
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
GetLastError
());
needed
=
(
DWORD
)
0xdeadbeef
;
needed
=
(
DWORD
)
0xdeadbeef
;
buffer
[
0
]
=
0xdeadbeef
;
buffer
[
0
]
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -1021,6 +1023,7 @@ static void test_XcvDataPort_GetTransmissionRetryTimeout(void)
...
@@ -1021,6 +1023,7 @@ static void test_XcvDataPort_GetTransmissionRetryTimeout(void)
res
=
RegSetValueExA
(
hroot
,
TransmissionRetryTimeoutA
,
0
,
REG_SZ
,
(
PBYTE
)
num_1A
,
lstrlenA
(
num_1A
)
+
1
);
res
=
RegSetValueExA
(
hroot
,
TransmissionRetryTimeoutA
,
0
,
REG_SZ
,
(
PBYTE
)
num_1A
,
lstrlenA
(
num_1A
)
+
1
);
ok
(
res
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
GetLastError
());
needed
=
(
DWORD
)
0xdeadbeef
;
needed
=
(
DWORD
)
0xdeadbeef
;
buffer
[
0
]
=
0xdeadbeef
;
buffer
[
0
]
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -1030,6 +1033,7 @@ static void test_XcvDataPort_GetTransmissionRetryTimeout(void)
...
@@ -1030,6 +1033,7 @@ static void test_XcvDataPort_GetTransmissionRetryTimeout(void)
"for '1')
\n
"
,
res
,
GetLastError
(),
needed
,
buffer
[
0
]);
"for '1')
\n
"
,
res
,
GetLastError
(),
needed
,
buffer
[
0
]);
res
=
RegSetValueExA
(
hroot
,
TransmissionRetryTimeoutA
,
0
,
REG_SZ
,
(
PBYTE
)
num_999999A
,
lstrlenA
(
num_999999A
)
+
1
);
res
=
RegSetValueExA
(
hroot
,
TransmissionRetryTimeoutA
,
0
,
REG_SZ
,
(
PBYTE
)
num_999999A
,
lstrlenA
(
num_999999A
)
+
1
);
ok
(
res
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
GetLastError
());
needed
=
(
DWORD
)
0xdeadbeef
;
needed
=
(
DWORD
)
0xdeadbeef
;
buffer
[
0
]
=
0xdeadbeef
;
buffer
[
0
]
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -1040,6 +1044,7 @@ static void test_XcvDataPort_GetTransmissionRetryTimeout(void)
...
@@ -1040,6 +1044,7 @@ static void test_XcvDataPort_GetTransmissionRetryTimeout(void)
res
=
RegSetValueExA
(
hroot
,
TransmissionRetryTimeoutA
,
0
,
REG_SZ
,
(
PBYTE
)
num_1000000A
,
lstrlenA
(
num_1000000A
)
+
1
);
res
=
RegSetValueExA
(
hroot
,
TransmissionRetryTimeoutA
,
0
,
REG_SZ
,
(
PBYTE
)
num_1000000A
,
lstrlenA
(
num_1000000A
)
+
1
);
ok
(
res
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
GetLastError
());
needed
=
(
DWORD
)
0xdeadbeef
;
needed
=
(
DWORD
)
0xdeadbeef
;
buffer
[
0
]
=
0xdeadbeef
;
buffer
[
0
]
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -1094,10 +1099,10 @@ static void test_XcvDataPort_MonitorUI(void)
...
@@ -1094,10 +1099,10 @@ static void test_XcvDataPort_MonitorUI(void)
"(expected 'ERROR_INVALID_PARAMETER')
\n
"
,
res
,
GetLastError
(),
needed
);
"(expected 'ERROR_INVALID_PARAMETER')
\n
"
,
res
,
GetLastError
(),
needed
);
if
(
0
)
{
if
(
0
)
{
/* crash with native localspl.dll (w2k+xp) */
/* crash with native localspl.dll (w2k+xp) */
res
=
pXcvDataPort
(
hXcv
,
NULL
,
NULL
,
0
,
buffer
,
MAX_PATH
,
&
needed
);
pXcvDataPort
(
hXcv
,
NULL
,
NULL
,
0
,
buffer
,
MAX_PATH
,
&
needed
);
res
=
pXcvDataPort
(
hXcv
,
cmd_MonitorUIW
,
NULL
,
0
,
NULL
,
len
,
&
needed
);
pXcvDataPort
(
hXcv
,
cmd_MonitorUIW
,
NULL
,
0
,
NULL
,
len
,
&
needed
);
res
=
pXcvDataPort
(
hXcv
,
cmd_MonitorUIW
,
NULL
,
0
,
buffer
,
len
,
NULL
);
pXcvDataPort
(
hXcv
,
cmd_MonitorUIW
,
NULL
,
0
,
buffer
,
len
,
NULL
);
}
}
...
@@ -1173,8 +1178,8 @@ static void test_XcvDataPort_PortIsValid(void)
...
@@ -1173,8 +1178,8 @@ static void test_XcvDataPort_PortIsValid(void)
if
(
0
)
{
if
(
0
)
{
/* crash with native localspl.dll (w2k+xp) */
/* crash with native localspl.dll (w2k+xp) */
res
=
pXcvDataPort
(
hXcv
,
cmd_PortIsValidW
,
NULL
,
0
,
NULL
,
0
,
&
needed
);
pXcvDataPort
(
hXcv
,
cmd_PortIsValidW
,
NULL
,
0
,
NULL
,
0
,
&
needed
);
}
}
...
@@ -1304,9 +1309,9 @@ static void test_XcvOpenPort(void)
...
@@ -1304,9 +1309,9 @@ static void test_XcvOpenPort(void)
if
(
0
)
if
(
0
)
{
{
/* crash with native localspl.dll (w2k+xp) */
/* crash with native localspl.dll (w2k+xp) */
res
=
pXcvOpenPort
(
NULL
,
SERVER_ACCESS_ADMINISTER
,
&
hXcv2
);
pXcvOpenPort
(
NULL
,
SERVER_ACCESS_ADMINISTER
,
&
hXcv2
);
res
=
pXcvOpenPort
(
emptyW
,
SERVER_ACCESS_ADMINISTER
,
NULL
);
pXcvOpenPort
(
emptyW
,
SERVER_ACCESS_ADMINISTER
,
NULL
);
}
}
...
...
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