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
70fec905
Commit
70fec905
authored
Dec 09, 2006
by
Andrew Talbot
Committed by
Alexandre Julliard
Dec 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mapi32/tests: Cast-qual warnings fix.
parent
eef087cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
37 deletions
+37
-37
prop.c
dlls/mapi32/tests/prop.c
+37
-37
No files found.
dlls/mapi32/tests/prop.c
View file @
70fec905
...
...
@@ -81,8 +81,8 @@ static inline int strcmpW(const WCHAR *str1, const WCHAR *str2)
static
void
test_PropCopyMore
(
void
)
{
static
c
onst
char
*
szHiA
=
"Hi!"
;
static
const
WCHAR
szHiW
[]
=
{
'H'
,
'i'
,
'!'
,
'\0'
};
static
c
har
szHiA
[]
=
"Hi!"
;
static
WCHAR
szHiW
[]
=
{
'H'
,
'i'
,
'!'
,
'\0'
};
SPropValue
*
lpDest
=
NULL
,
*
lpSrc
=
NULL
;
ULONG
i
;
SCODE
scode
;
...
...
@@ -107,10 +107,10 @@ static void test_PropCopyMore(void)
switch
(
ptTypes
[
i
])
{
case
PT_STRING8
:
lpSrc
->
Value
.
lpszA
=
(
char
*
)
szHiA
;
lpSrc
->
Value
.
lpszA
=
szHiA
;
break
;
case
PT_UNICODE
:
lpSrc
->
Value
.
lpszW
=
(
WCHAR
*
)
szHiW
;
lpSrc
->
Value
.
lpszW
=
szHiW
;
break
;
case
PT_BINARY
:
lpSrc
->
Value
.
bin
.
cb
=
4
;
...
...
@@ -151,8 +151,8 @@ static void test_PropCopyMore(void)
static
void
test_UlPropSize
(
void
)
{
static
c
onst
char
*
szHiA
=
"Hi!"
;
static
const
WCHAR
szHiW
[]
=
{
'H'
,
'i'
,
'!'
,
'\0'
};
static
c
har
szHiA
[]
=
"Hi!"
;
static
WCHAR
szHiW
[]
=
{
'H'
,
'i'
,
'!'
,
'\0'
};
LPSTR
buffa
[
2
];
LPWSTR
buffw
[
2
];
SBinary
buffbin
[
2
];
...
...
@@ -202,11 +202,11 @@ static void test_UlPropSize(void)
#endif
case
PT_CLSID
:
exp
*=
sizeof
(
GUID
);
break
;
case
PT_STRING8
:
pv
.
Value
.
lpszA
=
(
LPSTR
)
szHiA
;
pv
.
Value
.
lpszA
=
szHiA
;
exp
=
4
;
break
;
case
PT_UNICODE
:
pv
.
Value
.
lpszW
=
(
LPWSTR
)
szHiW
;
pv
.
Value
.
lpszW
=
szHiW
;
exp
=
4
*
sizeof
(
WCHAR
);
break
;
case
PT_BINARY
:
...
...
@@ -215,15 +215,15 @@ static void test_UlPropSize(void)
case
PT_MV_STRING8
:
pv
.
Value
.
MVszA
.
cValues
=
2
;
pv
.
Value
.
MVszA
.
lppszA
=
buffa
;
buffa
[
0
]
=
(
LPSTR
)
szHiA
;
buffa
[
1
]
=
(
LPSTR
)
szHiA
;
buffa
[
0
]
=
szHiA
;
buffa
[
1
]
=
szHiA
;
exp
=
8
;
break
;
case
PT_MV_UNICODE
:
pv
.
Value
.
MVszW
.
cValues
=
2
;
pv
.
Value
.
MVszW
.
lppszW
=
buffw
;
buffw
[
0
]
=
(
LPWSTR
)
szHiW
;
buffw
[
1
]
=
(
LPWSTR
)
szHiW
;
buffw
[
0
]
=
szHiW
;
buffw
[
1
]
=
szHiW
;
exp
=
8
*
sizeof
(
WCHAR
);
break
;
case
PT_MV_BINARY
:
...
...
@@ -244,12 +244,12 @@ static void test_UlPropSize(void)
static
void
test_FPropContainsProp
(
void
)
{
static
c
onst
char
*
szFull
=
"Full String"
;
static
c
onst
char
*
szFullLower
=
"full string"
;
static
c
onst
char
*
szPrefix
=
"Full"
;
static
c
onst
char
*
szPrefixLower
=
"full"
;
static
c
onst
char
*
szSubstring
=
"ll St"
;
static
c
onst
char
*
szSubstringLower
=
"ll st"
;
static
c
har
szFull
[]
=
"Full String"
;
static
c
har
szFullLower
[]
=
"full string"
;
static
c
har
szPrefix
[]
=
"Full"
;
static
c
har
szPrefixLower
[]
=
"full"
;
static
c
har
szSubstring
[]
=
"ll St"
;
static
c
har
szSubstringLower
[]
=
"ll st"
;
SPropValue
pvLeft
,
pvRight
;
ULONG
pt
;
BOOL
bRet
;
...
...
@@ -275,19 +275,19 @@ static void test_FPropContainsProp(void)
/* test the various flag combinations */
pvLeft
.
ulPropTag
=
pvRight
.
ulPropTag
=
PT_STRING8
;
pvLeft
.
Value
.
lpszA
=
(
LPSTR
)
szFull
;
pvRight
.
Value
.
lpszA
=
(
LPSTR
)
szFull
;
pvLeft
.
Value
.
lpszA
=
szFull
;
pvRight
.
Value
.
lpszA
=
szFull
;
bRet
=
pFPropContainsProp
(
&
pvLeft
,
&
pvRight
,
FL_FULLSTRING
);
ok
(
bRet
==
TRUE
,
"(full,full)[] match failed
\n
"
);
pvRight
.
Value
.
lpszA
=
(
LPSTR
)
szPrefix
;
pvRight
.
Value
.
lpszA
=
szPrefix
;
bRet
=
pFPropContainsProp
(
&
pvLeft
,
&
pvRight
,
FL_FULLSTRING
);
ok
(
bRet
==
FALSE
,
"(full,prefix)[] match failed
\n
"
);
bRet
=
pFPropContainsProp
(
&
pvLeft
,
&
pvRight
,
FL_PREFIX
);
ok
(
bRet
==
TRUE
,
"(full,prefix)[PREFIX] match failed
\n
"
);
bRet
=
pFPropContainsProp
(
&
pvLeft
,
&
pvRight
,
FL_SUBSTRING
);
ok
(
bRet
==
TRUE
,
"(full,prefix)[SUBSTRING] match failed
\n
"
);
pvRight
.
Value
.
lpszA
=
(
LPSTR
)
szPrefixLower
;
pvRight
.
Value
.
lpszA
=
szPrefixLower
;
bRet
=
pFPropContainsProp
(
&
pvLeft
,
&
pvRight
,
FL_PREFIX
);
ok
(
bRet
==
FALSE
,
"(full,prefixlow)[PREFIX] match failed
\n
"
);
bRet
=
pFPropContainsProp
(
&
pvLeft
,
&
pvRight
,
FL_SUBSTRING
);
...
...
@@ -296,14 +296,14 @@ static void test_FPropContainsProp(void)
ok
(
bRet
==
TRUE
,
"(full,prefixlow)[PREFIX|IGNORECASE] match failed
\n
"
);
bRet
=
pFPropContainsProp
(
&
pvLeft
,
&
pvRight
,
FL_SUBSTRING
|
FL_IGNORECASE
);
ok
(
bRet
==
TRUE
,
"(full,prefixlow)[SUBSTRING|IGNORECASE] match failed
\n
"
);
pvRight
.
Value
.
lpszA
=
(
LPSTR
)
szSubstring
;
pvRight
.
Value
.
lpszA
=
szSubstring
;
bRet
=
pFPropContainsProp
(
&
pvLeft
,
&
pvRight
,
FL_FULLSTRING
);
ok
(
bRet
==
FALSE
,
"(full,substr)[] match failed
\n
"
);
bRet
=
pFPropContainsProp
(
&
pvLeft
,
&
pvRight
,
FL_PREFIX
);
ok
(
bRet
==
FALSE
,
"(full,substr)[PREFIX] match failed
\n
"
);
bRet
=
pFPropContainsProp
(
&
pvLeft
,
&
pvRight
,
FL_SUBSTRING
);
ok
(
bRet
==
TRUE
,
"(full,substr)[SUBSTRING] match failed
\n
"
);
pvRight
.
Value
.
lpszA
=
(
LPSTR
)
szSubstringLower
;
pvRight
.
Value
.
lpszA
=
szSubstringLower
;
bRet
=
pFPropContainsProp
(
&
pvLeft
,
&
pvRight
,
FL_PREFIX
);
ok
(
bRet
==
FALSE
,
"(full,substrlow)[PREFIX] match failed
\n
"
);
bRet
=
pFPropContainsProp
(
&
pvLeft
,
&
pvRight
,
FL_SUBSTRING
);
...
...
@@ -312,7 +312,7 @@ static void test_FPropContainsProp(void)
ok
(
bRet
==
FALSE
,
"(full,substrlow)[PREFIX|IGNORECASE] match failed
\n
"
);
bRet
=
pFPropContainsProp
(
&
pvLeft
,
&
pvRight
,
FL_SUBSTRING
|
FL_IGNORECASE
);
ok
(
bRet
==
TRUE
,
"(full,substrlow)[SUBSTRING|IGNORECASE] match failed
\n
"
);
pvRight
.
Value
.
lpszA
=
(
LPSTR
)
szFullLower
;
pvRight
.
Value
.
lpszA
=
szFullLower
;
bRet
=
pFPropContainsProp
(
&
pvLeft
,
&
pvRight
,
FL_FULLSTRING
|
FL_IGNORECASE
);
ok
(
bRet
==
TRUE
,
"(full,fulllow)[IGNORECASE] match failed
\n
"
);
...
...
@@ -662,8 +662,8 @@ static void test_PpropFindProp(void)
static
void
test_ScCountProps
(
void
)
{
static
c
onst
char
*
szHiA
=
"Hi!"
;
static
const
WCHAR
szHiW
[]
=
{
'H'
,
'i'
,
'!'
,
'\0'
};
static
c
har
szHiA
[]
=
"Hi!"
;
static
WCHAR
szHiW
[]
=
{
'H'
,
'i'
,
'!'
,
'\0'
};
static
const
ULONG
ULHILEN
=
4
;
/* chars in szHiA/W incl. NUL */
LPSTR
buffa
[
3
];
LPWSTR
buffw
[
3
];
...
...
@@ -705,11 +705,11 @@ static void test_ScCountProps(void)
exp
=
sizeof
(
GUID
)
+
sizeof
(
pv
);
break
;
case
PT_STRING8
:
pv
.
Value
.
lpszA
=
(
LPSTR
)
szHiA
;
pv
.
Value
.
lpszA
=
szHiA
;
exp
=
4
+
sizeof
(
pv
);
break
;
case
PT_UNICODE
:
pv
.
Value
.
lpszW
=
(
LPWSTR
)
szHiW
;
pv
.
Value
.
lpszW
=
szHiW
;
exp
=
4
*
sizeof
(
WCHAR
)
+
sizeof
(
pv
);
break
;
case
PT_BINARY
:
...
...
@@ -756,17 +756,17 @@ static void test_ScCountProps(void)
case
PT_MV_STRING8
:
pv
.
Value
.
MVszA
.
cValues
=
3
;
pv
.
Value
.
MVszA
.
lppszA
=
buffa
;
buffa
[
0
]
=
(
LPSTR
)
szHiA
;
buffa
[
1
]
=
(
LPSTR
)
szHiA
;
buffa
[
2
]
=
(
LPSTR
)
szHiA
;
buffa
[
0
]
=
szHiA
;
buffa
[
1
]
=
szHiA
;
buffa
[
2
]
=
szHiA
;
exp
=
ULHILEN
*
3
+
3
*
sizeof
(
char
*
)
+
sizeof
(
pv
);
break
;
case
PT_MV_UNICODE
:
pv
.
Value
.
MVszW
.
cValues
=
3
;
pv
.
Value
.
MVszW
.
lppszW
=
buffw
;
buffw
[
0
]
=
(
LPWSTR
)
szHiW
;
buffw
[
1
]
=
(
LPWSTR
)
szHiW
;
buffw
[
2
]
=
(
LPWSTR
)
szHiW
;
buffw
[
0
]
=
szHiW
;
buffw
[
1
]
=
szHiW
;
buffw
[
2
]
=
szHiW
;
exp
=
ULHILEN
*
3
*
sizeof
(
WCHAR
)
+
3
*
sizeof
(
WCHAR
*
)
+
sizeof
(
pv
);
break
;
case
PT_MV_BINARY
:
...
...
@@ -802,7 +802,7 @@ static void test_ScCountProps(void)
static
void
test_ScCopyRelocProps
(
void
)
{
static
c
onst
char
*
szTestA
=
"Test"
;
static
c
har
szTestA
[]
=
"Test"
;
char
buffer
[
512
],
buffer2
[
512
],
*
lppszA
[
1
];
SPropValue
pvProp
,
*
lpResProp
=
(
LPSPropValue
)
buffer
;
ULONG
ulCount
;
...
...
@@ -816,7 +816,7 @@ static void test_ScCopyRelocProps(void)
pvProp
.
ulPropTag
=
PROP_TAG
(
PT_MV_STRING8
,
1u
);
lppszA
[
0
]
=
(
char
*
)
szTestA
;
lppszA
[
0
]
=
szTestA
;
pvProp
.
Value
.
MVszA
.
cValues
=
1
;
pvProp
.
Value
.
MVszA
.
lppszA
=
lppszA
;
ulCount
=
0
;
...
...
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