shell32/tests: Initialize all fields of SHFILEOPSTRUCT variables (Coverity)
Frédéric Delanoy
frederic.delanoy at gmail.com
Thu Dec 1 15:48:59 CST 2011
Set fAnyOperationsAborted before calling SHFileOperation
CIDs 4700-4704
---
dlls/shell32/tests/shlfileop.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c
index f1e2a3e..d7b95a5 100644
--- a/dlls/shell32/tests/shlfileop.c
+++ b/dlls/shell32/tests/shlfileop.c
@@ -532,6 +532,7 @@ static void test_delete(void)
shfo.fFlags = FOF_FILESONLY | FOF_NOCONFIRMATION | FOF_SILENT;
shfo.hNameMappings = NULL;
shfo.lpszProgressTitle = NULL;
+ shfo.fAnyOperationsAborted = FALSE;
ok(!SHFileOperationA(&shfo), "Deletion was not successful\n");
ok(dir_exists("test4.txt"), "Directory should not have been removed\n");
@@ -671,6 +672,7 @@ static void test_rename(void)
shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI;
shfo.hNameMappings = NULL;
shfo.lpszProgressTitle = NULL;
+ shfo.fAnyOperationsAborted = FALSE;
set_curr_dir_path(from, "test1.txt\0");
set_curr_dir_path(to, "test4.txt\0");
@@ -835,6 +837,7 @@ static void test_copy(void)
shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI;
shfo.hNameMappings = NULL;
shfo.lpszProgressTitle = NULL;
+ shfo.fAnyOperationsAborted = FALSE;
set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0");
set_curr_dir_path(to, "test6.txt\0test7.txt\0test8.txt\0");
@@ -1773,6 +1776,7 @@ static void test_move(void)
shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI;
shfo.hNameMappings = NULL;
shfo.lpszProgressTitle = NULL;
+ shfo.fAnyOperationsAborted = FALSE;
set_curr_dir_path(from, "test1.txt\0");
set_curr_dir_path(to, "test4.txt\0");
@@ -2349,6 +2353,7 @@ static BOOL is_old_shell32(void)
shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI | FOF_MULTIDESTFILES | FOF_NOCONFIRMMKDIR;
shfo.hNameMappings = NULL;
shfo.lpszProgressTitle = NULL;
+ shfo.fAnyOperationsAborted = FALSE;
set_curr_dir_path(from, "test1.txt\0test2.txt\0test3.txt\0");
set_curr_dir_path(to, "test6.txt\0test7.txt\0");
--
1.7.7.2
More information about the wine-patches
mailing list