cabinet/tests: Write-strings warnings fix

Andrew Talbot Andrew.Talbot at talbotville.com
Sat Jul 29 09:57:17 CDT 2006


Changelog:
    cabinet/tests: Write-strings warnings fix.

diff -urN a/dlls/cabinet/tests/extract.c b/dlls/cabinet/tests/extract.c
--- a/dlls/cabinet/tests/extract.c	2006-05-23 13:47:36.000000000 +0100
+++ b/dlls/cabinet/tests/extract.c	2006-07-29 14:58:04.000000000 +0100
@@ -257,16 +257,18 @@
     return (INT_PTR)handle;
 }
 
-static void add_file(HFCI hfci, char *file)
+static void add_file(HFCI hfci, const char *file)
 {
     char path[MAX_PATH];
+    char file_copy[MAX_PATH]; /* FCIAddFile() requires non-const filename */
     BOOL res;
 
     lstrcpyA(path, CURR_DIR);
     lstrcatA(path, "\\");
     lstrcatA(path, file);
+    lstrcpyA(file_copy, file);
 
-    res = FCIAddFile(hfci, path, file, FALSE, get_next_cabinet, progress,
+    res = FCIAddFile(hfci, path, file_copy, FALSE, get_next_cabinet, progress,
                      get_open_info, tcompTYPE_MSZIP);
     ok(res, "Expected FCIAddFile to succeed\n");
 }



More information about the wine-patches mailing list