Fixes for -Wmissing-declaration and -Wwrite-string warnings.

This commit is contained in:
Mike McCormack 2005-06-14 17:21:18 +00:00 committed by Alexandre Julliard
parent 7e44db5c41
commit 9f92ead47f
2 changed files with 29 additions and 30 deletions

View File

@ -38,10 +38,10 @@ const char* TEST_URL_2 = "http://localhost:8080/tests%2e.html?date=Mon%2010/10/1
const char* TEST_URL_3 = "http://foo:bar@localhost:21/internal.php?query=x&return=y"; const char* TEST_URL_3 = "http://foo:bar@localhost:21/internal.php?query=x&return=y";
typedef struct _TEST_URL_CANONICALIZE { typedef struct _TEST_URL_CANONICALIZE {
char *url; const char *url;
DWORD flags; DWORD flags;
HRESULT expectret; HRESULT expectret;
char *expecturl; const char *expecturl;
} TEST_URL_CANONICALIZE; } TEST_URL_CANONICALIZE;
const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = { const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = {
@ -67,11 +67,11 @@ const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = {
}; };
typedef struct _TEST_URL_ESCAPE { typedef struct _TEST_URL_ESCAPE {
char *url; const char *url;
DWORD flags; DWORD flags;
DWORD expectescaped; DWORD expectescaped;
HRESULT expectret; HRESULT expectret;
char *expecturl; const char *expecturl;
} TEST_URL_ESCAPE; } TEST_URL_ESCAPE;
const TEST_URL_ESCAPE TEST_ESCAPE[] = { const TEST_URL_ESCAPE TEST_ESCAPE[] = {
@ -156,11 +156,11 @@ const TEST_URL_ESCAPE TEST_ESCAPE[] = {
}; };
typedef struct _TEST_URL_COMBINE { typedef struct _TEST_URL_COMBINE {
char *url1; const char *url1;
char *url2; const char *url2;
DWORD flags; DWORD flags;
HRESULT expectret; HRESULT expectret;
char *expecturl; const char *expecturl;
} TEST_URL_COMBINE; } TEST_URL_COMBINE;
const TEST_URL_COMBINE TEST_COMBINE[] = { const TEST_URL_COMBINE TEST_COMBINE[] = {
@ -178,8 +178,8 @@ const TEST_URL_COMBINE TEST_COMBINE[] = {
}; };
struct { struct {
char *path; const char *path;
char *url; const char *url;
DWORD ret; DWORD ret;
} TEST_URLFROMPATH [] = { } TEST_URLFROMPATH [] = {
{"foo", "file:foo", S_OK}, {"foo", "file:foo", S_OK},
@ -198,8 +198,8 @@ struct {
}; };
struct { struct {
char *url; const char *url;
char *path; const char *path;
DWORD ret; DWORD ret;
} TEST_PATHFROMURL[] = { } TEST_PATHFROMURL[] = {
{"file:///c:/foo/ba%5Cr", "c:\\foo\\ba\\r", S_OK}, {"file:///c:/foo/ba%5Cr", "c:\\foo\\ba\\r", S_OK},
@ -232,8 +232,8 @@ struct {
}; };
struct { struct {
char *url; char url[30];
char *expect; const char *expect;
} TEST_URL_UNESCAPE[] = { } TEST_URL_UNESCAPE[] = {
{"file://foo/bar", "file://foo/bar"}, {"file://foo/bar", "file://foo/bar"},
{"file://fo%20o%5Ca/bar", "file://fo o\\a/bar"} {"file://fo%20o%5Ca/bar", "file://fo o\\a/bar"}
@ -241,7 +241,7 @@ struct {
struct { struct {
char *path; const char *path;
BOOL expect; BOOL expect;
} TEST_PATH_IS_URL[] = { } TEST_PATH_IS_URL[] = {
{"http://foo/bar", TRUE}, {"http://foo/bar", TRUE},
@ -254,7 +254,7 @@ struct {
}; };
struct { struct {
char *url; const char *url;
BOOL expectOpaque; BOOL expectOpaque;
BOOL expectFile; BOOL expectFile;
} TEST_URLIS_ATTRIBS[] = { } TEST_URLIS_ATTRIBS[] = {

View File

@ -484,8 +484,6 @@ static void test_StrDupA()
static void test_StrFormatByteSize64A(void) static void test_StrFormatByteSize64A(void)
{ {
/* this test fails on locales which do not use '.' as a decimal separator */
#if 0
char szBuff[256]; char szBuff[256];
const StrFormatSizeResult* result = StrFormatSize_results; const StrFormatSizeResult* result = StrFormatSize_results;
@ -499,13 +497,10 @@ static void test_StrFormatByteSize64A(void)
result++; result++;
} }
#endif
} }
static void test_StrFormatKBSizeW(void) static void test_StrFormatKBSizeW(void)
{ {
/* FIXME: Awaiting NLS fixes in kernel before these succeed */
#if 0
WCHAR szBuffW[256]; WCHAR szBuffW[256];
char szBuff[256]; char szBuff[256];
const StrFormatSizeResult* result = StrFormatSize_results; const StrFormatSizeResult* result = StrFormatSize_results;
@ -519,13 +514,10 @@ static void test_StrFormatKBSizeW(void)
(LONG)(result->value >> 32), (LONG)result->value, szBuff, result->kb_size); (LONG)(result->value >> 32), (LONG)result->value, szBuff, result->kb_size);
result++; result++;
} }
#endif
} }
static void test_StrFormatKBSizeA(void) static void test_StrFormatKBSizeA(void)
{ {
/* this test fails on locales which do not use '.' as a decimal separator */
#if 0
char szBuff[256]; char szBuff[256];
const StrFormatSizeResult* result = StrFormatSize_results; const StrFormatSizeResult* result = StrFormatSize_results;
@ -538,10 +530,9 @@ static void test_StrFormatKBSizeA(void)
(LONG)(result->value >> 32), (LONG)result->value, szBuff, result->kb_size); (LONG)(result->value >> 32), (LONG)result->value, szBuff, result->kb_size);
result++; result++;
} }
#endif
} }
void test_StrFromTimeIntervalA(void) static void test_StrFromTimeIntervalA(void)
{ {
char szBuff[256]; char szBuff[256];
const StrFromTimeIntervalResult* result = StrFromTimeInterval_results; const StrFromTimeIntervalResult* result = StrFromTimeInterval_results;
@ -556,7 +547,7 @@ void test_StrFromTimeIntervalA(void)
} }
} }
void test_StrCmpA(void) static void test_StrCmpA(void)
{ {
static const char str1[] = {'a','b','c','d','e','f'}; static const char str1[] = {'a','b','c','d','e','f'};
static const char str2[] = {'a','B','c','d','e','f'}; static const char str2[] = {'a','B','c','d','e','f'};
@ -582,7 +573,7 @@ void test_StrCmpA(void)
ok(!pIntlStrEqWorkerA(TRUE, str1, str2, 5), "pIntlStrEqWorkerA(TRUE,...) isn't case-sensitive\n"); ok(!pIntlStrEqWorkerA(TRUE, str1, str2, 5), "pIntlStrEqWorkerA(TRUE,...) isn't case-sensitive\n");
} }
void test_StrCmpW(void) static void test_StrCmpW(void)
{ {
static const WCHAR str1[] = {'a','b','c','d','e','f'}; static const WCHAR str1[] = {'a','b','c','d','e','f'};
static const WCHAR str2[] = {'a','B','c','d','e','f'}; static const WCHAR str2[] = {'a','B','c','d','e','f'};
@ -747,9 +738,17 @@ START_TEST(string)
test_StrToIntExA(); test_StrToIntExA();
test_StrToIntExW(); test_StrToIntExW();
test_StrDupA(); test_StrDupA();
test_StrFormatByteSize64A(); if (0)
test_StrFormatKBSizeA(); {
test_StrFormatKBSizeW(); /* this test fails on locales which do not use '.' as a decimal separator */
test_StrFormatByteSize64A();
/* this test fails on locales which do not use '.' as a decimal separator */
test_StrFormatKBSizeA();
/* FIXME: Awaiting NLS fixes in kernel before these succeed */
test_StrFormatKBSizeW();
}
test_StrFromTimeIntervalA(); test_StrFromTimeIntervalA();
test_StrCmpA(); test_StrCmpA();
test_StrCmpW(); test_StrCmpW();