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
cab43e6b
Commit
cab43e6b
authored
Oct 10, 2006
by
Michael Ploujnikov
Committed by
Alexandre Julliard
Oct 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
psapi/tests: Win64 printf format warning fixes.
parent
4b7877d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
Makefile.in
dlls/psapi/tests/Makefile.in
+0
-1
psapi_main.c
dlls/psapi/tests/psapi_main.c
+11
-11
No files found.
dlls/psapi/tests/Makefile.in
View file @
cab43e6b
...
...
@@ -4,7 +4,6 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
TESTDLL
=
psapi.dll
IMPORTS
=
kernel32
EXTRADEFS
=
-DWINE_NO_LONG_AS_INT
CTESTS
=
\
psapi_main.c
...
...
dlls/psapi/tests/psapi_main.c
View file @
cab43e6b
...
...
@@ -42,7 +42,7 @@
? (ok(1, "succeeded\n"), 1) \
: GetLastError() == 0xdeadbeef \
? (ok(0, "failed without error code\n"), 0) \
: (ok(0, "failed with %
l
d\n", GetLastError()), 0))
: (ok(0, "failed with %d\n", GetLastError()), 0))
#define w32_err(x, e) \
(SetLastError(0xdeadbeef), \
...
...
@@ -52,7 +52,7 @@
? (ok(1, "failed with %d\n", e), 1) \
: GetLastError() == 0xdeadbeef \
? (ok(0, "failed without error code\n"), 0) \
: (ok(0, "expected error=%d but failed with %
l
d\n", \
: (ok(0, "expected error=%d but failed with %d\n", \
e, GetLastError()), 0))
static
BOOL
(
WINAPI
*
pEmptyWorkingSet
)(
HANDLE
);
...
...
@@ -95,9 +95,9 @@ static void test_EnumProcesses(void)
DWORD
pid
,
cbUsed
=
0xdeadbeef
;
if
(
w32_suc
(
pEnumProcesses
(
NULL
,
0
,
&
cbUsed
)))
ok
(
cbUsed
==
0
,
"cbUsed=%
l
d
\n
"
,
cbUsed
);
ok
(
cbUsed
==
0
,
"cbUsed=%d
\n
"
,
cbUsed
);
if
(
w32_suc
(
pEnumProcesses
(
&
pid
,
4
,
&
cbUsed
)))
ok
(
cbUsed
==
4
,
"cbUsed=%
l
d
\n
"
,
cbUsed
);
ok
(
cbUsed
==
4
,
"cbUsed=%d
\n
"
,
cbUsed
);
}
static
void
test_EnumProcessModules
(
void
)
...
...
@@ -111,7 +111,7 @@ static void test_EnumProcessModules(void)
if
(
!
w32_suc
(
pEnumProcessModules
(
hpQV
,
&
hMod
,
sizeof
(
HMODULE
),
&
cbNeeded
)))
return
;
ok
(
cbNeeded
/
sizeof
(
HMODULE
)
>=
3
&&
cbNeeded
/
sizeof
(
HMODULE
)
<=
5
*
sizeof
(
HMODULE
),
"cbNeeded=%
l
d
\n
"
,
cbNeeded
);
"cbNeeded=%d
\n
"
,
cbNeeded
);
ok
(
hMod
==
GetModuleHandle
(
NULL
),
"hMod=%p GetModuleHandle(NULL)=%p
\n
"
,
hMod
,
GetModuleHandle
(
NULL
));
}
...
...
@@ -149,7 +149,7 @@ static void test_GetMappedFileName(void)
w32_err
(
pGetMappedFileNameA
(
hpSR
,
hMod
,
szMapPath
,
sizeof
(
szMapPath
)),
ERROR_ACCESS_DENIED
);
if
(
!
w32_suc
(
ret
=
pGetMappedFileNameA
(
hpQI
,
hMod
,
szMapPath
,
sizeof
(
szMapPath
))))
return
;
ok
(
ret
==
strlen
(
szMapPath
),
"szMapPath=
\"
%s
\"
ret=%
l
d
\n
"
,
szMapPath
,
ret
);
ok
(
ret
==
strlen
(
szMapPath
),
"szMapPath=
\"
%s
\"
ret=%d
\n
"
,
szMapPath
,
ret
);
ok
(
szMapPath
[
0
]
==
'\\'
,
"szMapPath=
\"
%s
\"\n
"
,
szMapPath
);
szMapBaseName
=
strrchr
(
szMapPath
,
'\\'
);
/* That's close enough for us */
if
(
!
szMapBaseName
||
!*
szMapBaseName
)
...
...
@@ -180,7 +180,7 @@ static void test_GetProcessImageFileName(void)
else
if
(
GetLastError
()
==
0xdeadbeef
)
ok
(
0
,
"failed without error code
\n
"
);
else
ok
(
0
,
"failed with %
l
d
\n
"
,
GetLastError
());
ok
(
0
,
"failed with %d
\n
"
,
GetLastError
());
return
;
}
...
...
@@ -192,7 +192,7 @@ static void test_GetProcessImageFileName(void)
!
w32_suc
(
pGetMappedFileNameA
(
hpQV
,
hMod
,
szMapPath
,
sizeof
(
szMapPath
))))
return
;
/* Windows returns 2*strlen-1 */
ok
(
ret
>=
strlen
(
szImgPath
),
"szImgPath=
\"
%s
\"
ret=%
l
d
\n
"
,
szImgPath
,
ret
);
ok
(
ret
>=
strlen
(
szImgPath
),
"szImgPath=
\"
%s
\"
ret=%d
\n
"
,
szImgPath
,
ret
);
ok
(
!
strcmp
(
szImgPath
,
szMapPath
),
"szImgPath=
\"
%s
\"
szMapPath=
\"
%s
\"\n
"
,
szImgPath
,
szMapPath
);
}
...
...
@@ -208,7 +208,7 @@ static void test_GetModuleFileNameEx(void)
w32_err
(
pGetModuleFileNameExA
(
hpQV
,
hBad
,
szModExPath
,
sizeof
(
szModExPath
)),
ERROR_INVALID_HANDLE
);
if
(
!
w32_suc
(
ret
=
pGetModuleFileNameExA
(
hpQV
,
NULL
,
szModExPath
,
sizeof
(
szModExPath
))))
return
;
ok
(
ret
==
strlen
(
szModExPath
),
"szModExPath=
\"
%s
\"
ret=%
l
d
\n
"
,
szModExPath
,
ret
);
ok
(
ret
==
strlen
(
szModExPath
),
"szModExPath=
\"
%s
\"
ret=%d
\n
"
,
szModExPath
,
ret
);
GetModuleFileNameA
(
NULL
,
szModPath
,
sizeof
(
szModPath
));
ok
(
!
strncmp
(
szModExPath
,
szModPath
,
MAX_PATH
),
"szModExPath=
\"
%s
\"
szModPath=
\"
%s
\"\n
"
,
szModExPath
,
szModPath
);
...
...
@@ -225,7 +225,7 @@ static void test_GetModuleBaseName(void)
w32_err
(
pGetModuleBaseNameA
(
hpQV
,
hBad
,
szModBaseName
,
sizeof
(
szModBaseName
)),
ERROR_INVALID_HANDLE
);
if
(
!
w32_suc
(
ret
=
pGetModuleBaseNameA
(
hpQV
,
NULL
,
szModBaseName
,
sizeof
(
szModBaseName
))))
return
;
ok
(
ret
==
strlen
(
szModBaseName
),
"szModBaseName=
\"
%s
\"
ret=%
l
d
\n
"
,
szModBaseName
,
ret
);
ok
(
ret
==
strlen
(
szModBaseName
),
"szModBaseName=
\"
%s
\"
ret=%d
\n
"
,
szModBaseName
,
ret
);
GetModuleFileNameA
(
NULL
,
szModPath
,
sizeof
(
szModPath
));
ok
(
!
strcmp
(
strrchr
(
szModPath
,
'\\'
)
+
1
,
szModBaseName
),
"szModPath=
\"
%s
\"
szModBaseName=
\"
%s
\"\n
"
,
szModPath
,
szModBaseName
);
...
...
@@ -250,7 +250,7 @@ static void test_ws_functions(void)
if
(
!
VirtualLock
(
addr
,
1
))
{
trace
(
"locking failed (error=%
l
d) - skipping test
\n
"
,
GetLastError
());
trace
(
"locking failed (error=%d) - skipping test
\n
"
,
GetLastError
());
goto
free_page
;
}
...
...
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