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
4ec2fcc9
Commit
4ec2fcc9
authored
Jun 13, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mapi32/tests: Don't use sizeof in ok() to avoid printf format warnings.
parent
c6b342d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
27 deletions
+23
-27
prop.c
dlls/mapi32/tests/prop.c
+22
-26
util.c
dlls/mapi32/tests/util.c
+1
-1
No files found.
dlls/mapi32/tests/prop.c
View file @
4ec2fcc9
...
@@ -824,17 +824,14 @@ static void test_ScCopyRelocProps(void)
...
@@ -824,17 +824,14 @@ static void test_ScCopyRelocProps(void)
ulCount
=
0
;
ulCount
=
0
;
sc
=
pScCopyProps
(
1
,
&
pvProp
,
buffer
,
&
ulCount
);
sc
=
pScCopyProps
(
1
,
&
pvProp
,
buffer
,
&
ulCount
);
ok
(
sc
==
S_OK
&&
lpResProp
->
ulPropTag
==
pvProp
.
ulPropTag
&&
ok
(
sc
==
S_OK
,
"wrong ret %ld
\n
"
,
sc
);
lpResProp
->
Value
.
MVszA
.
cValues
==
1
&&
ok
(
lpResProp
->
ulPropTag
==
pvProp
.
ulPropTag
,
"wrong tag %lx
\n
"
,
lpResProp
->
ulPropTag
);
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
]
==
buffer
+
sizeof
(
SPropValue
)
+
sizeof
(
char
*
)
&&
ok
(
lpResProp
->
Value
.
MVszA
.
cValues
==
1
,
"wrong cValues %ld
\n
"
,
lpResProp
->
Value
.
MVszA
.
cValues
);
ulCount
==
sizeof
(
SPropValue
)
+
sizeof
(
char
*
)
+
5
&&
ok
(
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
]
==
buffer
+
sizeof
(
SPropValue
)
+
sizeof
(
char
*
),
!
strcmp
(
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
],
szTestA
),
"wrong lppszA[0] %p
\n
"
,
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
]);
"CopyProps(str): Expected 0 {1,%lx,%p,%s} %d got 0x%08lx {%ld,%lx,%p,%s} %ld
\n
"
,
ok
(
ulCount
==
sizeof
(
SPropValue
)
+
sizeof
(
char
*
)
+
5
,
"wrong count %ld
\n
"
,
ulCount
);
pvProp
.
ulPropTag
,
buffer
+
sizeof
(
SPropValue
)
+
sizeof
(
char
*
),
ok
(
!
strcmp
(
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
],
szTestA
),
szTestA
,
sizeof
(
SPropValue
)
+
sizeof
(
char
*
)
+
5
,
sc
,
"wrong string '%s'
\n
"
,
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
]);
lpResProp
->
Value
.
MVszA
.
cValues
,
lpResProp
->
ulPropTag
,
sc
==
S_OK
?
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
]
:
NULL
,
sc
==
S_OK
?
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
]
:
NULL
,
ulCount
);
memcpy
(
buffer2
,
buffer
,
sizeof
(
buffer
));
memcpy
(
buffer2
,
buffer
,
sizeof
(
buffer
));
...
@@ -847,21 +844,20 @@ static void test_ScCopyRelocProps(void)
...
@@ -847,21 +844,20 @@ static void test_ScCopyRelocProps(void)
sc
=
pScRelocProps
(
1
,
(
LPSPropValue
)
buffer2
,
buffer
,
buffer2
,
&
ulCount
);
sc
=
pScRelocProps
(
1
,
(
LPSPropValue
)
buffer2
,
buffer
,
buffer2
,
&
ulCount
);
lpResProp
=
(
LPSPropValue
)
buffer2
;
lpResProp
=
(
LPSPropValue
)
buffer2
;
ok
(
sc
==
S_OK
&&
lpResProp
->
ulPropTag
==
pvProp
.
ulPropTag
&&
lpResProp
->
Value
.
MVszA
.
cValues
==
1
&&
ok
(
sc
==
S_OK
,
"wrong ret %ld
\n
"
,
sc
);
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
]
==
buffer2
+
sizeof
(
SPropValue
)
+
sizeof
(
char
*
)
&&
ok
(
lpResProp
->
ulPropTag
==
pvProp
.
ulPropTag
,
"wrong tag %lx
\n
"
,
lpResProp
->
ulPropTag
);
/* Native has a bug whereby it calculates the size correctly when copying
ok
(
lpResProp
->
Value
.
MVszA
.
cValues
==
1
,
"wrong cValues %ld
\n
"
,
lpResProp
->
Value
.
MVszA
.
cValues
);
* but when relocating does not (presumably it uses UlPropSize() which
ok
(
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
]
==
buffer2
+
sizeof
(
SPropValue
)
+
sizeof
(
char
*
),
* ignores multivalue pointers). Wine returns the correct value.
"wrong lppszA[0] %p
\n
"
,
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
]);
*/
/* Native has a bug whereby it calculates the size correctly when copying
(
ulCount
==
sizeof
(
SPropValue
)
+
sizeof
(
char
*
)
+
5
||
ulCount
==
sizeof
(
SPropValue
)
+
5
)
&&
* but when relocating does not (presumably it uses UlPropSize() which
!
strcmp
(
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
],
szTestA
),
* ignores multivalue pointers). Wine returns the correct value.
"RelocProps(str): Expected 0 {1,%lx,%p,%s} %d got 0x%08lx {%ld,%lx,%p,%s} %ld
\n
"
,
*/
pvProp
.
ulPropTag
,
buffer2
+
sizeof
(
SPropValue
)
+
sizeof
(
char
*
),
ok
(
ulCount
==
sizeof
(
SPropValue
)
+
sizeof
(
char
*
)
+
5
||
ulCount
==
sizeof
(
SPropValue
)
+
5
,
szTestA
,
sizeof
(
SPropValue
)
+
sizeof
(
char
*
)
+
5
,
sc
,
"wrong count %ld
\n
"
,
ulCount
);
lpResProp
->
Value
.
MVszA
.
cValues
,
lpResProp
->
ulPropTag
,
ok
(
!
strcmp
(
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
],
szTestA
),
sc
==
S_OK
?
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
]
:
NULL
,
"wrong string '%s'
\n
"
,
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
]);
sc
==
S_OK
?
lpResProp
->
Value
.
MVszA
.
lppszA
[
0
]
:
NULL
,
ulCount
);
/* Native crashes with lpNew or lpOld set to NULL so skip testing this */
/* Native crashes with lpNew or lpOld set to NULL so skip testing this */
}
}
...
...
dlls/mapi32/tests/util.c
View file @
4ec2fcc9
...
@@ -140,7 +140,7 @@ static void test_UlFromSzHex(void)
...
@@ -140,7 +140,7 @@ static void test_UlFromSzHex(void)
static
void
test_CbOfEncoded
(
void
)
static
void
test_CbOfEncoded
(
void
)
{
{
char
buff
[
129
];
char
buff
[
129
];
size_
t
i
;
unsigned
in
t
i
;
pCbOfEncoded
=
(
void
*
)
GetProcAddress
(
hMapi32
,
"CbOfEncoded@4"
);
pCbOfEncoded
=
(
void
*
)
GetProcAddress
(
hMapi32
,
"CbOfEncoded@4"
);
if
(
!
pCbOfEncoded
)
if
(
!
pCbOfEncoded
)
...
...
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