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
4afda020
Commit
4afda020
authored
Oct 20, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 21, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/tests: Use BOOL variables for BOOL return type (PVS-Studio).
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e0c421ff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
24 deletions
+35
-24
storage32.c
dlls/ole32/tests/storage32.c
+35
-24
No files found.
dlls/ole32/tests/storage32.c
View file @
4afda020
...
@@ -513,6 +513,7 @@ static void test_storage_stream(void)
...
@@ -513,6 +513,7 @@ static void test_storage_stream(void)
ULARGE_INTEGER
p
;
ULARGE_INTEGER
p
;
unsigned
char
buffer
[
0x100
];
unsigned
char
buffer
[
0x100
];
IUnknown
*
unk
;
IUnknown
*
unk
;
BOOL
ret
;
DeleteFileA
(
filenameA
);
DeleteFileA
(
filenameA
);
...
@@ -691,8 +692,8 @@ static void test_storage_stream(void)
...
@@ -691,8 +692,8 @@ static void test_storage_stream(void)
IStorage_Release
(
stg
);
IStorage_Release
(
stg
);
}
}
r
=
DeleteFileA
(
filenameA
);
r
et
=
DeleteFileA
(
filenameA
);
ok
(
r
,
"file should exist
\n
"
);
ok
(
r
et
,
"file should exist
\n
"
);
}
}
static
BOOL
touch_file
(
LPCSTR
filename
)
static
BOOL
touch_file
(
LPCSTR
filename
)
...
@@ -739,6 +740,7 @@ static void test_open_storage(void)
...
@@ -739,6 +740,7 @@ static void test_open_storage(void)
IStorage
*
stg
=
NULL
,
*
stg2
=
NULL
;
IStorage
*
stg
=
NULL
,
*
stg2
=
NULL
;
HRESULT
r
;
HRESULT
r
;
DWORD
stgm
;
DWORD
stgm
;
BOOL
ret
;
/* try opening a zero length file - it should stay zero length */
/* try opening a zero length file - it should stay zero length */
DeleteFileA
(
filenameA
);
DeleteFileA
(
filenameA
);
...
@@ -898,8 +900,8 @@ static void test_open_storage(void)
...
@@ -898,8 +900,8 @@ static void test_open_storage(void)
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_NOSNAPSHOT
|
STGM_PRIORITY
,
NULL
,
0
,
&
stg
);
r
=
StgOpenStorage
(
filename
,
NULL
,
STGM_NOSNAPSHOT
|
STGM_PRIORITY
,
NULL
,
0
,
&
stg
);
ok
(
r
==
STG_E_INVALIDFLAG
,
"should fail
\n
"
);
ok
(
r
==
STG_E_INVALIDFLAG
,
"should fail
\n
"
);
r
=
DeleteFileA
(
filenameA
);
r
et
=
DeleteFileA
(
filenameA
);
ok
(
r
,
"file didn't exist
\n
"
);
ok
(
r
et
,
"file didn't exist
\n
"
);
}
}
static
void
test_storage_suminfo
(
void
)
static
void
test_storage_suminfo
(
void
)
...
@@ -1397,6 +1399,7 @@ static void test_transact(void)
...
@@ -1397,6 +1399,7 @@ static void test_transact(void)
static
const
WCHAR
stmname2
[]
=
{
'F'
,
'O'
,
'O'
,
0
};
static
const
WCHAR
stmname2
[]
=
{
'F'
,
'O'
,
'O'
,
0
};
static
const
WCHAR
stgname
[]
=
{
'P'
,
'E'
,
'R'
,
'M'
,
'S'
,
'T'
,
'G'
,
0
};
static
const
WCHAR
stgname
[]
=
{
'P'
,
'E'
,
'R'
,
'M'
,
'S'
,
'T'
,
'G'
,
0
};
static
const
WCHAR
stgname2
[]
=
{
'T'
,
'E'
,
'M'
,
'P'
,
'S'
,
'T'
,
'G'
,
0
};
static
const
WCHAR
stgname2
[]
=
{
'T'
,
'E'
,
'M'
,
'P'
,
'S'
,
'T'
,
'G'
,
0
};
BOOL
ret
;
DeleteFileA
(
filenameA
);
DeleteFileA
(
filenameA
);
...
@@ -1517,8 +1520,8 @@ static void test_transact(void)
...
@@ -1517,8 +1520,8 @@ static void test_transact(void)
IStorage_Release
(
stg
);
IStorage_Release
(
stg
);
r
=
DeleteFileA
(
filenameA
);
r
et
=
DeleteFileA
(
filenameA
);
ok
(
r
==
TRUE
,
"deleted file
\n
"
);
ok
(
ret
,
"deleted file
\n
"
);
}
}
static
void
test_substorage_share
(
void
)
static
void
test_substorage_share
(
void
)
...
@@ -1529,6 +1532,7 @@ static void test_substorage_share(void)
...
@@ -1529,6 +1532,7 @@ static void test_substorage_share(void)
static
const
WCHAR
stgname
[]
=
{
'P'
,
'E'
,
'R'
,
'M'
,
'S'
,
'T'
,
'G'
,
0
};
static
const
WCHAR
stgname
[]
=
{
'P'
,
'E'
,
'R'
,
'M'
,
'S'
,
'T'
,
'G'
,
0
};
static
const
WCHAR
stmname
[]
=
{
'C'
,
'O'
,
'N'
,
'T'
,
'E'
,
'N'
,
'T'
,
'S'
,
0
};
static
const
WCHAR
stmname
[]
=
{
'C'
,
'O'
,
'N'
,
'T'
,
'E'
,
'N'
,
'T'
,
'S'
,
0
};
static
const
WCHAR
othername
[]
=
{
'N'
,
'E'
,
'W'
,
'N'
,
'A'
,
'M'
,
'E'
,
0
};
static
const
WCHAR
othername
[]
=
{
'N'
,
'E'
,
'W'
,
'N'
,
'A'
,
'M'
,
'E'
,
0
};
BOOL
ret
;
DeleteFileA
(
filenameA
);
DeleteFileA
(
filenameA
);
...
@@ -1608,8 +1612,8 @@ static void test_substorage_share(void)
...
@@ -1608,8 +1612,8 @@ static void test_substorage_share(void)
IStorage_Release
(
stg
);
IStorage_Release
(
stg
);
r
=
DeleteFileA
(
filenameA
);
r
et
=
DeleteFileA
(
filenameA
);
ok
(
r
==
TRUE
,
"deleted file
\n
"
);
ok
(
ret
,
"deleted file
\n
"
);
}
}
static
void
test_revert
(
void
)
static
void
test_revert
(
void
)
...
@@ -1622,6 +1626,7 @@ static void test_revert(void)
...
@@ -1622,6 +1626,7 @@ static void test_revert(void)
static
const
WCHAR
stgname
[]
=
{
'P'
,
'E'
,
'R'
,
'M'
,
'S'
,
'T'
,
'G'
,
0
};
static
const
WCHAR
stgname
[]
=
{
'P'
,
'E'
,
'R'
,
'M'
,
'S'
,
'T'
,
'G'
,
0
};
static
const
WCHAR
stgname2
[]
=
{
'T'
,
'E'
,
'M'
,
'P'
,
'S'
,
'T'
,
'G'
,
0
};
static
const
WCHAR
stgname2
[]
=
{
'T'
,
'E'
,
'M'
,
'P'
,
'S'
,
'T'
,
'G'
,
0
};
STATSTG
statstg
;
STATSTG
statstg
;
BOOL
ret
;
DeleteFileA
(
filenameA
);
DeleteFileA
(
filenameA
);
...
@@ -1739,8 +1744,8 @@ static void test_revert(void)
...
@@ -1739,8 +1744,8 @@ static void test_revert(void)
IStorage_Release
(
stg
);
IStorage_Release
(
stg
);
r
=
DeleteFileA
(
filenameA
);
r
et
=
DeleteFileA
(
filenameA
);
ok
(
r
==
TRUE
,
"deleted file
\n
"
);
ok
(
ret
,
"deleted file
\n
"
);
/* Revert only invalidates objects in transacted mode */
/* Revert only invalidates objects in transacted mode */
r
=
StgCreateDocfile
(
filename
,
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
|
r
=
StgCreateDocfile
(
filename
,
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
|
...
@@ -1759,8 +1764,8 @@ static void test_revert(void)
...
@@ -1759,8 +1764,8 @@ static void test_revert(void)
IStream_Release
(
stm
);
IStream_Release
(
stm
);
IStorage_Release
(
stg
);
IStorage_Release
(
stg
);
r
=
DeleteFileA
(
filenameA
);
r
et
=
DeleteFileA
(
filenameA
);
ok
(
r
==
TRUE
,
"deleted file
\n
"
);
ok
(
ret
,
"deleted file
\n
"
);
}
}
static
void
test_parent_free
(
void
)
static
void
test_parent_free
(
void
)
...
@@ -1772,6 +1777,7 @@ static void test_parent_free(void)
...
@@ -1772,6 +1777,7 @@ static void test_parent_free(void)
static
const
WCHAR
stgname
[]
=
{
'P'
,
'E'
,
'R'
,
'M'
,
'S'
,
'T'
,
'G'
,
0
};
static
const
WCHAR
stgname
[]
=
{
'P'
,
'E'
,
'R'
,
'M'
,
'S'
,
'T'
,
'G'
,
0
};
ULONG
ref
;
ULONG
ref
;
STATSTG
statstg
;
STATSTG
statstg
;
BOOL
ret
;
DeleteFileA
(
filenameA
);
DeleteFileA
(
filenameA
);
...
@@ -1821,8 +1827,8 @@ static void test_parent_free(void)
...
@@ -1821,8 +1827,8 @@ static void test_parent_free(void)
IStorage_Release
(
stg
);
IStorage_Release
(
stg
);
r
=
DeleteFileA
(
filenameA
);
r
et
=
DeleteFileA
(
filenameA
);
ok
(
r
==
TRUE
,
"deleted file
\n
"
);
ok
(
ret
,
"deleted file
\n
"
);
}
}
static
void
test_nonroot_transacted
(
void
)
static
void
test_nonroot_transacted
(
void
)
...
@@ -1833,6 +1839,7 @@ static void test_nonroot_transacted(void)
...
@@ -1833,6 +1839,7 @@ static void test_nonroot_transacted(void)
static
const
WCHAR
stgname
[]
=
{
'P'
,
'E'
,
'R'
,
'M'
,
'S'
,
'T'
,
'G'
,
0
};
static
const
WCHAR
stgname
[]
=
{
'P'
,
'E'
,
'R'
,
'M'
,
'S'
,
'T'
,
'G'
,
0
};
static
const
WCHAR
stmname
[]
=
{
'C'
,
'O'
,
'N'
,
'T'
,
'E'
,
'N'
,
'T'
,
'S'
,
0
};
static
const
WCHAR
stmname
[]
=
{
'C'
,
'O'
,
'N'
,
'T'
,
'E'
,
'N'
,
'T'
,
'S'
,
0
};
static
const
WCHAR
stmname2
[]
=
{
'F'
,
'O'
,
'O'
,
0
};
static
const
WCHAR
stmname2
[]
=
{
'F'
,
'O'
,
'O'
,
0
};
BOOL
ret
;
DeleteFileA
(
filenameA
);
DeleteFileA
(
filenameA
);
...
@@ -1941,8 +1948,8 @@ static void test_nonroot_transacted(void)
...
@@ -1941,8 +1948,8 @@ static void test_nonroot_transacted(void)
IStorage_Release
(
stg
);
IStorage_Release
(
stg
);
r
=
DeleteFileA
(
filenameA
);
r
et
=
DeleteFileA
(
filenameA
);
ok
(
r
==
TRUE
,
"deleted file
\n
"
);
ok
(
ret
,
"deleted file
\n
"
);
}
}
static
void
test_ReadClassStm
(
void
)
static
void
test_ReadClassStm
(
void
)
...
@@ -2925,6 +2932,7 @@ static void test_rename(void)
...
@@ -2925,6 +2932,7 @@ static void test_rename(void)
static
const
WCHAR
stgname2
[]
=
{
'S'
,
'T'
,
'G'
,
0
};
static
const
WCHAR
stgname2
[]
=
{
'S'
,
'T'
,
'G'
,
0
};
static
const
WCHAR
stmname
[]
=
{
'C'
,
'O'
,
'N'
,
'T'
,
'E'
,
'N'
,
'T'
,
'S'
,
0
};
static
const
WCHAR
stmname
[]
=
{
'C'
,
'O'
,
'N'
,
'T'
,
'E'
,
'N'
,
'T'
,
'S'
,
0
};
static
const
WCHAR
stmname2
[]
=
{
'E'
,
'N'
,
'T'
,
'S'
,
0
};
static
const
WCHAR
stmname2
[]
=
{
'E'
,
'N'
,
'T'
,
'S'
,
0
};
BOOL
ret
;
DeleteFileA
(
filenameA
);
DeleteFileA
(
filenameA
);
...
@@ -2981,8 +2989,8 @@ static void test_rename(void)
...
@@ -2981,8 +2989,8 @@ static void test_rename(void)
IStorage_Release
(
stg
);
IStorage_Release
(
stg
);
r
=
DeleteFileA
(
filenameA
);
r
et
=
DeleteFileA
(
filenameA
);
ok
(
r
==
TRUE
,
"deleted file
\n
"
);
ok
(
ret
,
"deleted file
\n
"
);
}
}
static
void
test_toplevel_stat
(
void
)
static
void
test_toplevel_stat
(
void
)
...
@@ -3068,6 +3076,7 @@ static void test_substorage_enum(void)
...
@@ -3068,6 +3076,7 @@ static void test_substorage_enum(void)
HRESULT
r
;
HRESULT
r
;
ULONG
ref
;
ULONG
ref
;
static
const
WCHAR
stgname
[]
=
{
'P'
,
'E'
,
'R'
,
'M'
,
'S'
,
'T'
,
'G'
,
0
};
static
const
WCHAR
stgname
[]
=
{
'P'
,
'E'
,
'R'
,
'M'
,
'S'
,
'T'
,
'G'
,
0
};
BOOL
ret
;
DeleteFileA
(
filenameA
);
DeleteFileA
(
filenameA
);
...
@@ -3103,8 +3112,8 @@ static void test_substorage_enum(void)
...
@@ -3103,8 +3112,8 @@ static void test_substorage_enum(void)
IStorage_Release
(
stg
);
IStorage_Release
(
stg
);
r
=
DeleteFileA
(
filenameA
);
r
et
=
DeleteFileA
(
filenameA
);
ok
(
r
==
TRUE
,
"deleted file
\n
"
);
ok
(
ret
,
"deleted file
\n
"
);
}
}
static
void
test_copyto_locking
(
void
)
static
void
test_copyto_locking
(
void
)
...
@@ -3115,6 +3124,7 @@ static void test_copyto_locking(void)
...
@@ -3115,6 +3124,7 @@ static void test_copyto_locking(void)
static
const
WCHAR
stgname
[]
=
{
'S'
,
'T'
,
'G'
,
'1'
,
0
};
static
const
WCHAR
stgname
[]
=
{
'S'
,
'T'
,
'G'
,
'1'
,
0
};
static
const
WCHAR
stgname2
[]
=
{
'S'
,
'T'
,
'G'
,
'2'
,
0
};
static
const
WCHAR
stgname2
[]
=
{
'S'
,
'T'
,
'G'
,
'2'
,
0
};
static
const
WCHAR
stmname
[]
=
{
'C'
,
'O'
,
'N'
,
'T'
,
'E'
,
'N'
,
'T'
,
'S'
,
0
};
static
const
WCHAR
stmname
[]
=
{
'C'
,
'O'
,
'N'
,
'T'
,
'E'
,
'N'
,
'T'
,
'S'
,
0
};
BOOL
ret
;
DeleteFileA
(
filenameA
);
DeleteFileA
(
filenameA
);
...
@@ -3154,8 +3164,8 @@ static void test_copyto_locking(void)
...
@@ -3154,8 +3164,8 @@ static void test_copyto_locking(void)
IStorage_Release
(
stg2
);
IStorage_Release
(
stg2
);
IStorage_Release
(
stg
);
IStorage_Release
(
stg
);
r
=
DeleteFileA
(
filenameA
);
r
et
=
DeleteFileA
(
filenameA
);
ok
(
r
==
TRUE
,
"deleted file
\n
"
);
ok
(
ret
,
"deleted file
\n
"
);
}
}
static
void
test_copyto_recursive
(
void
)
static
void
test_copyto_recursive
(
void
)
...
@@ -3164,6 +3174,7 @@ static void test_copyto_recursive(void)
...
@@ -3164,6 +3174,7 @@ static void test_copyto_recursive(void)
HRESULT
r
;
HRESULT
r
;
static
const
WCHAR
stgname
[]
=
{
'S'
,
'T'
,
'G'
,
'1'
,
0
};
static
const
WCHAR
stgname
[]
=
{
'S'
,
'T'
,
'G'
,
'1'
,
0
};
static
const
WCHAR
stgname2
[]
=
{
'S'
,
'T'
,
'G'
,
'2'
,
0
};
static
const
WCHAR
stgname2
[]
=
{
'S'
,
'T'
,
'G'
,
'2'
,
0
};
BOOL
ret
;
DeleteFileA
(
filenameA
);
DeleteFileA
(
filenameA
);
...
@@ -3205,8 +3216,8 @@ static void test_copyto_recursive(void)
...
@@ -3205,8 +3216,8 @@ static void test_copyto_recursive(void)
IStorage_Release
(
stg2
);
IStorage_Release
(
stg2
);
IStorage_Release
(
stg
);
IStorage_Release
(
stg
);
r
=
DeleteFileA
(
filenameA
);
r
et
=
DeleteFileA
(
filenameA
);
ok
(
r
==
TRUE
,
"deleted file
\n
"
);
ok
(
ret
,
"deleted file
\n
"
);
}
}
static
void
test_hglobal_storage_creation
(
void
)
static
void
test_hglobal_storage_creation
(
void
)
...
...
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