Fix -W warnings.

This commit is contained in:
Jon Griffiths 2003-07-19 03:06:03 +00:00 committed by Alexandre Julliard
parent 0aefd857b7
commit 3c95046d03
1 changed files with 19 additions and 21 deletions

View File

@ -383,7 +383,7 @@ static const dupl_ustr_t dupl_ustr[] = {
static void test_RtlDuplicateUnicodeString(void) static void test_RtlDuplicateUnicodeString(void)
{ {
int pos; size_t pos;
WCHAR source_buf[257]; WCHAR source_buf[257];
WCHAR dest_buf[257]; WCHAR dest_buf[257];
WCHAR res_buf[257]; WCHAR res_buf[257];
@ -393,7 +393,7 @@ static void test_RtlDuplicateUnicodeString(void)
CHAR dest_ansi_buf[257]; CHAR dest_ansi_buf[257];
STRING dest_ansi_str; STRING dest_ansi_str;
NTSTATUS result; NTSTATUS result;
int test_num; size_t test_num;
for (test_num = 0; test_num < NB_DUPL_USTR; test_num++) { for (test_num = 0; test_num < NB_DUPL_USTR; test_num++) {
source_str.Length = dupl_ustr[test_num].source_Length; source_str.Length = dupl_ustr[test_num].source_Length;
@ -744,13 +744,13 @@ static const ustr2astr_t ustr2astr[] = {
static void test_RtlUnicodeStringToAnsiString(void) static void test_RtlUnicodeStringToAnsiString(void)
{ {
int pos; size_t pos;
CHAR ansi_buf[257]; CHAR ansi_buf[257];
WCHAR uni_buf[257]; WCHAR uni_buf[257];
STRING ansi_str; STRING ansi_str;
UNICODE_STRING uni_str; UNICODE_STRING uni_str;
NTSTATUS result; NTSTATUS result;
int test_num; size_t test_num;
for (test_num = 0; test_num < NB_USTR2ASTR; test_num++) { for (test_num = 0; test_num < NB_USTR2ASTR; test_num++) {
ansi_str.Length = ustr2astr[test_num].ansi_Length; ansi_str.Length = ustr2astr[test_num].ansi_Length;
@ -821,7 +821,7 @@ static void test_RtlAppendAsciizToString(void)
CHAR dest_buf[257]; CHAR dest_buf[257];
STRING dest_str; STRING dest_str;
NTSTATUS result; NTSTATUS result;
int test_num; size_t test_num;
for (test_num = 0; test_num < NB_APP_ASC2STR; test_num++) { for (test_num = 0; test_num < NB_APP_ASC2STR; test_num++) {
dest_str.Length = app_asc2str[test_num].dest_Length; dest_str.Length = app_asc2str[test_num].dest_Length;
@ -893,7 +893,7 @@ static void test_RtlAppendStringToString(void)
STRING dest_str; STRING dest_str;
STRING src_str; STRING src_str;
NTSTATUS result; NTSTATUS result;
int test_num; size_t test_num;
for (test_num = 0; test_num < NB_APP_STR2STR; test_num++) { for (test_num = 0; test_num < NB_APP_STR2STR; test_num++) {
dest_str.Length = app_str2str[test_num].dest_Length; dest_str.Length = app_str2str[test_num].dest_Length;
@ -954,7 +954,7 @@ static const app_uni2str_t app_uni2str[] = {
{ 4, 12, 14, "Fake0123abcdef", "Ustr\0", 8, 12, 14, "FakeUstr\0\0cdef", STATUS_SUCCESS}, { 4, 12, 14, "Fake0123abcdef", "Ustr\0", 8, 12, 14, "FakeUstr\0\0cdef", STATUS_SUCCESS},
{ 4, 11, 14, "Fake0123abcdef", "Ustr\0", 8, 11, 14, "FakeUstr\0\0cdef", STATUS_SUCCESS}, { 4, 11, 14, "Fake0123abcdef", "Ustr\0", 8, 11, 14, "FakeUstr\0\0cdef", STATUS_SUCCESS},
{ 4, 10, 14, "Fake0123abcdef", "Ustr\0", 8, 10, 14, "FakeUstr\0\0cdef", STATUS_SUCCESS}, { 4, 10, 14, "Fake0123abcdef", "Ustr\0", 8, 10, 14, "FakeUstr\0\0cdef", STATUS_SUCCESS},
/* In the following test the native function writes beyond MaximumLength /* In the following test the native function writes beyond MaximumLength
* { 4, 9, 14, "Fake0123abcdef", "Ustr\0", 8, 9, 14, "FakeUstrabcdef", STATUS_SUCCESS}, * { 4, 9, 14, "Fake0123abcdef", "Ustr\0", 8, 9, 14, "FakeUstrabcdef", STATUS_SUCCESS},
*/ */
{ 4, 8, 14, "Fake0123abcdef", "Ustr\0", 8, 8, 14, "FakeUstrabcdef", STATUS_SUCCESS}, { 4, 8, 14, "Fake0123abcdef", "Ustr\0", 8, 8, 14, "FakeUstrabcdef", STATUS_SUCCESS},
@ -974,7 +974,7 @@ static void test_RtlAppendUnicodeToString(void)
WCHAR dest_buf[257]; WCHAR dest_buf[257];
UNICODE_STRING dest_str; UNICODE_STRING dest_str;
NTSTATUS result; NTSTATUS result;
int test_num; size_t test_num;
for (test_num = 0; test_num < NB_APP_UNI2STR; test_num++) { for (test_num = 0; test_num < NB_APP_UNI2STR; test_num++) {
dest_str.Length = app_uni2str[test_num].dest_Length; dest_str.Length = app_uni2str[test_num].dest_Length;
@ -1050,7 +1050,7 @@ static void test_RtlAppendUnicodeStringToString(void)
UNICODE_STRING dest_str; UNICODE_STRING dest_str;
UNICODE_STRING src_str; UNICODE_STRING src_str;
NTSTATUS result; NTSTATUS result;
int test_num; size_t test_num;
for (test_num = 0; test_num < NB_APP_USTR2STR; test_num++) { for (test_num = 0; test_num < NB_APP_USTR2STR; test_num++) {
dest_str.Length = app_ustr2str[test_num].dest_Length; dest_str.Length = app_ustr2str[test_num].dest_Length;
@ -1161,8 +1161,8 @@ static void test_RtlFindCharInUnicodeString(void)
UNICODE_STRING search_chars; UNICODE_STRING search_chars;
USHORT pos; USHORT pos;
NTSTATUS result; NTSTATUS result;
int idx; size_t idx;
int test_num; size_t test_num;
for (test_num = 0; test_num < NB_FIND_CH_IN_USTR; test_num++) { for (test_num = 0; test_num < NB_FIND_CH_IN_USTR; test_num++) {
if (find_ch_in_ustr[test_num].main_str != NULL) { if (find_ch_in_ustr[test_num].main_str != NULL) {
@ -1331,7 +1331,7 @@ static const str2int_t str2int[] = {
static void test_RtlUnicodeStringToInteger(void) static void test_RtlUnicodeStringToInteger(void)
{ {
int test_num; size_t test_num;
int value; int value;
NTSTATUS result; NTSTATUS result;
WCHAR *wstr; WCHAR *wstr;
@ -1395,7 +1395,7 @@ static void test_RtlUnicodeStringToInteger(void)
static void test_RtlCharToInteger(void) static void test_RtlCharToInteger(void)
{ {
int test_num; size_t test_num;
int value; int value;
NTSTATUS result; NTSTATUS result;
@ -1612,11 +1612,10 @@ static void one_RtlIntegerToUnicodeString_test(int test_num, const int2str_t *in
static void test_RtlIntegerToUnicodeString(void) static void test_RtlIntegerToUnicodeString(void)
{ {
int test_num; size_t test_num;
for (test_num = 0; test_num < NB_INT2STR; test_num++) { for (test_num = 0; test_num < NB_INT2STR; test_num++)
one_RtlIntegerToUnicodeString_test(test_num, &int2str[test_num]); one_RtlIntegerToUnicodeString_test(test_num, &int2str[test_num]);
} /* for */
} }
@ -1640,11 +1639,10 @@ static void one_RtlIntegerToChar_test(int test_num, const int2str_t *int2str)
static void test_RtlIntegerToChar(void) static void test_RtlIntegerToChar(void)
{ {
NTSTATUS result; NTSTATUS result;
int test_num; size_t test_num;
for (test_num = 0; test_num < NB_INT2STR; test_num++) { for (test_num = 0; test_num < NB_INT2STR; test_num++)
one_RtlIntegerToChar_test(test_num, &int2str[test_num]); one_RtlIntegerToChar_test(test_num, &int2str[test_num]);
} /* for */
result = pRtlIntegerToChar(int2str[0].value, 20, int2str[0].MaximumLength, NULL); result = pRtlIntegerToChar(int2str[0].value, 20, int2str[0].MaximumLength, NULL);
ok(result == STATUS_INVALID_PARAMETER, ok(result == STATUS_INVALID_PARAMETER,