Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
20a9ec6c
Commit
20a9ec6c
authored
Jun 08, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Avoid some more compiler warning for HeapAlloc() invalid parameter tests.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4d60ab37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
heap.c
dlls/kernel32/tests/heap.c
+8
-8
No files found.
dlls/kernel32/tests/heap.c
View file @
20a9ec6c
...
...
@@ -38,6 +38,9 @@
#define HEAP_VALIDATE_ALL 0x20000000
#define HEAP_VALIDATE_PARAMS 0x40000000
/* use function pointers to avoid warnings for invalid parameter tests */
static
LPVOID
(
WINAPI
*
pHeapAlloc
)(
HANDLE
,
DWORD
,
SIZE_T
);
static
LPVOID
(
WINAPI
*
pHeapReAlloc
)(
HANDLE
,
DWORD
,
LPVOID
,
SIZE_T
);
static
BOOL
(
WINAPI
*
pHeapQueryInformation
)(
HANDLE
,
HEAP_INFORMATION_CLASS
,
PVOID
,
SIZE_T
,
PSIZE_T
);
static
BOOL
(
WINAPI
*
pGetPhysicallyInstalledSystemMemory
)(
ULONGLONG
*
);
static
ULONG
(
WINAPI
*
pRtlGetNtGlobalFlags
)(
void
);
...
...
@@ -89,12 +92,6 @@ static void test_heap(void)
HGLOBAL
hsecond
;
SIZE_T
size
,
size2
;
const
SIZE_T
max_size
=
1024
,
init_size
=
10
;
/* use function pointers to avoid warnings for invalid parameter tests */
LPVOID
(
WINAPI
*
pHeapAlloc
)(
HANDLE
,
DWORD
,
SIZE_T
);
LPVOID
(
WINAPI
*
pHeapReAlloc
)(
HANDLE
,
DWORD
,
LPVOID
,
SIZE_T
);
pHeapAlloc
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"kernel32"
),
"HeapAlloc"
);
pHeapReAlloc
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"kernel32"
),
"HeapReAlloc"
);
/* Heap*() functions */
mem
=
HeapAlloc
(
GetProcessHeap
(),
0
,
0
);
...
...
@@ -941,7 +938,7 @@ static void test_heap_checks( DWORD flags )
ret
=
HeapFree
(
GetProcessHeap
(),
0
,
p
);
ok
(
ret
,
"HeapFree failed
\n
"
);
p
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
17
);
p
=
p
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
17
);
ok
(
p
!=
NULL
,
"HeapAlloc failed
\n
"
);
old
=
p
[
17
];
p
[
17
]
=
0xcc
;
...
...
@@ -1006,7 +1003,7 @@ static void test_heap_checks( DWORD flags )
/* now test large blocks */
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
large_size
);
p
=
p
HeapAlloc
(
GetProcessHeap
(),
0
,
large_size
);
ok
(
p
!=
NULL
,
"HeapAlloc failed
\n
"
);
ret
=
HeapValidate
(
GetProcessHeap
(),
0
,
p
);
...
...
@@ -1221,6 +1218,9 @@ START_TEST(heap)
int
argc
;
char
**
argv
;
pHeapAlloc
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"kernel32"
),
"HeapAlloc"
);
pHeapReAlloc
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"kernel32"
),
"HeapReAlloc"
);
pRtlGetNtGlobalFlags
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"ntdll.dll"
),
"RtlGetNtGlobalFlags"
);
argc
=
winetest_get_mainargs
(
&
argv
);
...
...
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