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
d852ac0b
Commit
d852ac0b
authored
Jan 08, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Fix some integer to pointer conversion warnings.
parent
02a1c0d7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
dialog.c
dlls/user32/tests/dialog.c
+7
-7
msg.c
dlls/user32/tests/msg.c
+1
-1
win.c
dlls/user32/tests/win.c
+4
-4
No files found.
dlls/user32/tests/dialog.c
View file @
d852ac0b
...
@@ -54,7 +54,7 @@ static BOOL g_bInitialFocusInitDlgResult;
...
@@ -54,7 +54,7 @@ static BOOL g_bInitialFocusInitDlgResult;
static
int
g_terminated
;
static
int
g_terminated
;
typedef
struct
{
typedef
struct
{
unsigned
int
id
;
INT_PTR
id
;
int
parent
;
int
parent
;
DWORD
style
;
DWORD
style
;
DWORD
exstyle
;
DWORD
exstyle
;
...
@@ -160,7 +160,7 @@ static BOOL CreateWindows (HINSTANCE hinst)
...
@@ -160,7 +160,7 @@ static BOOL CreateWindows (HINSTANCE hinst)
{
{
if
(
p
->
id
>=
sizeof
(
hwnd
)
/
sizeof
(
hwnd
[
0
]))
if
(
p
->
id
>=
sizeof
(
hwnd
)
/
sizeof
(
hwnd
[
0
]))
{
{
trace
(
"Control %d is out of range
\n
"
,
p
->
id
);
trace
(
"Control %
l
d is out of range
\n
"
,
p
->
id
);
return
FALSE
;
return
FALSE
;
}
}
else
else
...
@@ -168,21 +168,21 @@ static BOOL CreateWindows (HINSTANCE hinst)
...
@@ -168,21 +168,21 @@ static BOOL CreateWindows (HINSTANCE hinst)
}
}
if
(
p
->
id
<=
0
)
if
(
p
->
id
<=
0
)
{
{
trace
(
"Control %d is out of range
\n
"
,
p
->
id
);
trace
(
"Control %
l
d is out of range
\n
"
,
p
->
id
);
return
FALSE
;
return
FALSE
;
}
}
if
(
hwnd
[
p
->
id
]
!=
0
)
if
(
hwnd
[
p
->
id
]
!=
0
)
{
{
trace
(
"Control %d is used more than once
\n
"
,
p
->
id
);
trace
(
"Control %
l
d is used more than once
\n
"
,
p
->
id
);
return
FALSE
;
return
FALSE
;
}
}
/* Create the control */
/* Create the control */
sprintf
(
ctrlname
,
"ctrl%4.4d"
,
p
->
id
);
sprintf
(
ctrlname
,
"ctrl%4.4
l
d"
,
p
->
id
);
hwnd
[
p
->
id
]
=
CreateWindowEx
(
p
->
exstyle
,
TEXT
(
p
->
parent
?
"static"
:
"GetNextDlgItemWindowClass"
),
TEXT
(
ctrlname
),
p
->
style
,
10
,
10
,
10
,
10
,
hwnd
[
p
->
parent
],
p
->
parent
?
(
HMENU
)
(
2000
+
p
->
id
)
:
0
,
hinst
,
0
);
hwnd
[
p
->
id
]
=
CreateWindowEx
(
p
->
exstyle
,
TEXT
(
p
->
parent
?
"static"
:
"GetNextDlgItemWindowClass"
),
TEXT
(
ctrlname
),
p
->
style
,
10
,
10
,
10
,
10
,
hwnd
[
p
->
parent
],
p
->
parent
?
(
HMENU
)
(
2000
+
p
->
id
)
:
0
,
hinst
,
0
);
if
(
!
hwnd
[
p
->
id
])
if
(
!
hwnd
[
p
->
id
])
{
{
trace
(
"Failed to create control %d
\n
"
,
p
->
id
);
trace
(
"Failed to create control %
l
d
\n
"
,
p
->
id
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -196,7 +196,7 @@ static BOOL CreateWindows (HINSTANCE hinst)
...
@@ -196,7 +196,7 @@ static BOOL CreateWindows (HINSTANCE hinst)
exstyle
=
GetWindowLong
(
hwnd
[
p
->
id
],
GWL_EXSTYLE
);
exstyle
=
GetWindowLong
(
hwnd
[
p
->
id
],
GWL_EXSTYLE
);
if
(
style
!=
p
->
style
||
exstyle
!=
p
->
exstyle
)
if
(
style
!=
p
->
style
||
exstyle
!=
p
->
exstyle
)
{
{
trace
(
"Style mismatch at %d: %8.8x %8.8x cf %8.8x %8.8x
\n
"
,
p
->
id
,
style
,
exstyle
,
p
->
style
,
p
->
exstyle
);
trace
(
"Style mismatch at %
l
d: %8.8x %8.8x cf %8.8x %8.8x
\n
"
,
p
->
id
,
style
,
exstyle
,
p
->
style
,
p
->
exstyle
);
}
}
}
}
p
++
;
p
++
;
...
...
dlls/user32/tests/msg.c
View file @
d852ac0b
...
@@ -8263,7 +8263,7 @@ static void test_DestroyWindow(void)
...
@@ -8263,7 +8263,7 @@ static void test_DestroyWindow(void)
{
{
BOOL
ret
;
BOOL
ret
;
HWND
parent
,
child1
,
child2
,
child3
,
child4
,
test
;
HWND
parent
,
child1
,
child2
,
child3
,
child4
,
test
;
UINT
child_id
=
WND_CHILD_ID
+
1
;
UINT
_PTR
child_id
=
WND_CHILD_ID
+
1
;
parent
=
CreateWindowExA
(
0
,
"TestWindowClass"
,
NULL
,
WS_OVERLAPPEDWINDOW
,
parent
=
CreateWindowExA
(
0
,
"TestWindowClass"
,
NULL
,
WS_OVERLAPPEDWINDOW
,
100
,
100
,
200
,
200
,
0
,
0
,
0
,
NULL
);
100
,
100
,
200
,
200
,
0
,
0
,
0
,
NULL
);
...
...
dlls/user32/tests/win.c
View file @
d852ac0b
...
@@ -1972,7 +1972,7 @@ static void test_SetMenu(HWND parent)
...
@@ -1972,7 +1972,7 @@ static void test_SetMenu(HWND parent)
static
void
test_window_tree
(
HWND
parent
,
const
DWORD
*
style
,
const
int
*
order
,
int
total
)
static
void
test_window_tree
(
HWND
parent
,
const
DWORD
*
style
,
const
int
*
order
,
int
total
)
{
{
HWND
child
[
5
],
hwnd
;
HWND
child
[
5
],
hwnd
;
int
i
;
INT_PTR
i
;
assert
(
total
<=
5
);
assert
(
total
<=
5
);
...
@@ -1993,7 +1993,7 @@ static void test_window_tree(HWND parent, const DWORD *style, const int *order,
...
@@ -1993,7 +1993,7 @@ static void test_window_tree(HWND parent, const DWORD *style, const int *order,
else
else
child
[
i
]
=
CreateWindowExA
(
0
,
"static"
,
""
,
style
[
i
],
0
,
0
,
10
,
10
,
child
[
i
]
=
CreateWindowExA
(
0
,
"static"
,
""
,
style
[
i
],
0
,
0
,
10
,
10
,
parent
,
(
HMENU
)
i
,
0
,
NULL
);
parent
,
(
HMENU
)
i
,
0
,
NULL
);
trace
(
"child[%d] = %p
\n
"
,
i
,
child
[
i
]);
trace
(
"child[%
l
d] = %p
\n
"
,
i
,
child
[
i
]);
ok
(
child
[
i
]
!=
0
,
"CreateWindowEx failed to create child window
\n
"
);
ok
(
child
[
i
]
!=
0
,
"CreateWindowEx failed to create child window
\n
"
);
}
}
...
@@ -2004,8 +2004,8 @@ static void test_window_tree(HWND parent, const DWORD *style, const int *order,
...
@@ -2004,8 +2004,8 @@ static void test_window_tree(HWND parent, const DWORD *style, const int *order,
for
(
i
=
0
;
i
<
total
;
i
++
)
for
(
i
=
0
;
i
<
total
;
i
++
)
{
{
trace
(
"hwnd[%d] = %p
\n
"
,
i
,
hwnd
);
trace
(
"hwnd[%
l
d] = %p
\n
"
,
i
,
hwnd
);
ok
(
child
[
order
[
i
]]
==
hwnd
,
"Z order of child #%d is wrong
\n
"
,
i
);
ok
(
child
[
order
[
i
]]
==
hwnd
,
"Z order of child #%
l
d is wrong
\n
"
,
i
);
hwnd
=
GetWindow
(
hwnd
,
GW_HWNDNEXT
);
hwnd
=
GetWindow
(
hwnd
,
GW_HWNDNEXT
);
}
}
...
...
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