Module: wine Branch: master Commit: 4aaf1f0b9ea88f88961ab2df72c0b8d634d085e1 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=4aaf1f0b9ea88f88961ab2df...
Author: Andrew Talbot Andrew.Talbot@talbotville.com Date: Fri Aug 11 16:29:02 2006 +0100
msi/tests: Write-strings warnings fix.
---
dlls/msi/tests/install.c | 8 +++++--- dlls/msi/tests/package.c | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 6ed3a4b..33f34b3 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -316,7 +316,7 @@ static int fci_delete(char *pszFile, int return 0; }
-static BOOL check_record(MSIHANDLE rec, UINT field, LPSTR val) +static BOOL check_record(MSIHANDLE rec, UINT field, LPCSTR val) { CHAR buffer[0x20]; UINT r; @@ -403,6 +403,8 @@ static void create_cab_file(const CHAR * CCAB cabParams; HFCI hfci; ERF erf; + static CHAR four_txt[] = "four.txt", + five_txt[] = "five.txt"; BOOL res;
set_cab_parameters(&cabParams, name); @@ -413,8 +415,8 @@ static void create_cab_file(const CHAR *
ok(hfci != NULL, "Failed to create an FCI context\n");
- add_file(hfci, "four.txt"); - add_file(hfci, "five.txt"); + add_file(hfci, four_txt); + add_file(hfci, five_txt);
res = FCIFlushCabinet(hfci, FALSE, get_next_cabinet, progress); ok(res, "Failed to flush the cabinet\n"); diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 55b2e1c..29b9d3f 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -1765,6 +1765,7 @@ static void test_getproperty(void) { MSIHANDLE hPackage = 0; char prop[100]; + static CHAR empty[] = ""; DWORD size; UINT r;
@@ -1783,7 +1784,7 @@ static void test_getproperty(void)
/* retrieve the size, empty string */ size = 0; - r = MsiGetProperty(hPackage, "Name", "", &size); + r = MsiGetProperty(hPackage, "Name", empty, &size); ok( r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); ok( size == 5, "Expected 5, got %ld\n", size);