Piotr Caban : msvcp60/tests: Remove unneeded casts.
Alexandre Julliard
julliard at winehq.org
Thu Jun 23 11:15:24 CDT 2016
Module: wine
Branch: master
Commit: 2d4aac74089789107abe56c2685c54ee17d0e330
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2d4aac74089789107abe56c2685c54ee17d0e330
Author: Piotr Caban <piotr at codeweavers.com>
Date: Thu Jun 23 10:24:13 2016 +0200
msvcp60/tests: Remove unneeded casts.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcp60/tests/ios.c | 8 ++++----
dlls/msvcp60/tests/string.c | 28 ++++++++++++++--------------
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/dlls/msvcp60/tests/ios.c b/dlls/msvcp60/tests/ios.c
index f121604..a79d51b 100644
--- a/dlls/msvcp60/tests/ios.c
+++ b/dlls/msvcp60/tests/ios.c
@@ -1435,7 +1435,7 @@ static void test_istream_tellg(void)
if (tests[i].seekoff != -1) /* to test without seek */
call_func2_ptr_fpos(p_basic_istream_char_seekg_fpos, &ss.base.base1, spos);
- rpos = (fpos_int *)call_func2(p_basic_istream_char_tellg, &ss.base.base1, &tpos);
+ rpos = call_func2(p_basic_istream_char_tellg, &ss.base.base1, &tpos);
ok(tests[i].telloff_ss == tpos.off, "wrong offset, expected = %ld found = %ld\n", tests[i].telloff_ss, tpos.off);
ok(rpos == &tpos, "wrong return fpos, expected = %p found = %p\n", rpos, &tpos);
@@ -1460,7 +1460,7 @@ static void test_istream_tellg(void)
if (tests[i].seekoff != -1) /* to test without seek */
call_func2_ptr_fpos(p_basic_istream_wchar_seekg_fpos, &wss.base.base1, spos);
- rpos = (fpos_int *)call_func2(p_basic_istream_wchar_tellg, &wss.base.base1, &tpos);
+ rpos = call_func2(p_basic_istream_wchar_tellg, &wss.base.base1, &tpos);
ok(tests[i].telloff_ss == tpos.off, "wrong offset, expected = %ld found = %ld\n", tests[i].telloff_ss, tpos.off);
ok(rpos == &tpos, "wrong return fpos, expected = %p found = %p\n", rpos, &tpos);
@@ -1488,7 +1488,7 @@ static void test_istream_tellg(void)
if (tests[i].seekoff != -1) /* to test without seek */
call_func2_ptr_fpos(p_basic_istream_char_seekg_fpos, &fs.base.base1, spos);
- rpos = (fpos_int *)call_func2(p_basic_istream_char_tellg, &fs.base.base1, &tpos);
+ rpos = call_func2(p_basic_istream_char_tellg, &fs.base.base1, &tpos);
ok(tests[i].tellpos == tpos.pos, "wrong filepos, expected = %s found = %s\n",
debugstr_longlong(tests[i].tellpos), debugstr_longlong(tpos.pos));
@@ -1511,7 +1511,7 @@ static void test_istream_tellg(void)
if (tests[i].seekoff != -1) /* to test without seek */
call_func2_ptr_fpos(p_basic_istream_wchar_seekg_fpos, &wfs.base.base1, spos);
- rpos = (fpos_int *)call_func2(p_basic_istream_wchar_tellg, &wfs.base.base1, &tpos);
+ rpos = call_func2(p_basic_istream_wchar_tellg, &wfs.base.base1, &tpos);
ok(tests[i].tellpos == tpos.pos, "wrong filepos, expected = %s found = %s\n",
debugstr_longlong(tests[i].tellpos), debugstr_longlong(tpos.pos));
diff --git a/dlls/msvcp60/tests/string.c b/dlls/msvcp60/tests/string.c
index 2cbf025..f61ad4a 100644
--- a/dlls/msvcp60/tests/string.c
+++ b/dlls/msvcp60/tests/string.c
@@ -377,9 +377,9 @@ static void test_basic_string_char_swap(void) {
strcpy(atmp1, "qwerty");
call_func3(p_basic_string_char_ctor_cstr_alloc, &str1, atmp1, &fake_allocator);
call_func2(p_basic_string_char_swap, &str1, &str1);
- ok(strcmp(atmp1, (const char *) call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n");
+ ok(strcmp(atmp1, call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n");
call_func2(p_basic_string_char_swap, &str1, &str1);
- ok(strcmp(atmp1, (const char *) call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n");
+ ok(strcmp(atmp1, call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n");
call_func1(p_basic_string_char_dtor, &str1);
/* str1 allocated, str2 local */
@@ -388,11 +388,11 @@ static void test_basic_string_char_swap(void) {
call_func3(p_basic_string_char_ctor_cstr_alloc, &str1, atmp1, &fake_allocator);
call_func3(p_basic_string_char_ctor_cstr_alloc, &str2, atmp2, &fake_allocator);
call_func2(p_basic_string_char_swap, &str1, &str2);
- ok(strcmp(atmp2, (const char *) call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n");
- ok(strcmp(atmp1, (const char *) call_func1(p_basic_string_char_cstr, &str2)) == 0, "Invalid value of str2\n");
+ ok(strcmp(atmp2, call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n");
+ ok(strcmp(atmp1, call_func1(p_basic_string_char_cstr, &str2)) == 0, "Invalid value of str2\n");
call_func2(p_basic_string_char_swap, &str1, &str2);
- ok(strcmp(atmp1, (const char *) call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n");
- ok(strcmp(atmp2, (const char *) call_func1(p_basic_string_char_cstr, &str2)) == 0, "Invalid value of str2\n");
+ ok(strcmp(atmp1, call_func1(p_basic_string_char_cstr, &str1)) == 0, "Invalid value of str1\n");
+ ok(strcmp(atmp2, call_func1(p_basic_string_char_cstr, &str2)) == 0, "Invalid value of str2\n");
call_func1(p_basic_string_char_dtor, &str1);
call_func1(p_basic_string_char_dtor, &str2);
}
@@ -580,8 +580,8 @@ static void test_basic_string_char_replace(void) {
ret = call_func4(p_basic_string_char_replace_cstr, &str, tests[i].off, tests[i].len, tests[i].replace);
ok(ret == &str, "str = %p ret = %p\n", ret, &str);
- ok(strcmp(tests[i].ret, (const char *) call_func1(p_basic_string_char_cstr, ret)) == 0, "str = %s ret = %s\n",
- tests[i].ret, (const char *) call_func1(p_basic_string_char_cstr, ret));
+ ok(strcmp(tests[i].ret, call_func1(p_basic_string_char_cstr, ret)) == 0, "str = %s ret = %s\n",
+ tests[i].ret, (const char*)call_func1(p_basic_string_char_cstr, ret));
call_func1(p_basic_string_char_dtor, &str);
}
@@ -667,9 +667,9 @@ static void test_basic_string_wchar_swap(void) {
mbstowcs(wtmp1, "qwerty", 32);
call_func3(p_basic_string_wchar_ctor_cstr_alloc, &str1, wtmp1, &fake_allocator);
call_func2(p_basic_string_wchar_swap, &str1, &str1);
- ok(wcscmp(wtmp1, (const wchar_t *) call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n");
+ ok(wcscmp(wtmp1, call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n");
call_func2(p_basic_string_wchar_swap, &str1, &str1);
- ok(wcscmp(wtmp1, (const wchar_t *) call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n");
+ ok(wcscmp(wtmp1, call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n");
call_func1(p_basic_string_wchar_dtor, &str1);
/* str1 allocated, str2 local */
@@ -678,11 +678,11 @@ static void test_basic_string_wchar_swap(void) {
call_func3(p_basic_string_wchar_ctor_cstr_alloc, &str1, wtmp1, &fake_allocator);
call_func3(p_basic_string_wchar_ctor_cstr_alloc, &str2, wtmp2, &fake_allocator);
call_func2(p_basic_string_wchar_swap, &str1, &str2);
- ok(wcscmp(wtmp2, (const wchar_t *) call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n");
- ok(wcscmp(wtmp1, (const wchar_t *) call_func1(p_basic_string_wchar_cstr, &str2)) == 0, "Invalid value of str2\n");
+ ok(wcscmp(wtmp2, call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n");
+ ok(wcscmp(wtmp1, call_func1(p_basic_string_wchar_cstr, &str2)) == 0, "Invalid value of str2\n");
call_func2(p_basic_string_wchar_swap, &str1, &str2);
- ok(wcscmp(wtmp1, (const wchar_t *) call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n");
- ok(wcscmp(wtmp2, (const wchar_t *) call_func1(p_basic_string_wchar_cstr, &str2)) == 0, "Invalid value of str2\n");
+ ok(wcscmp(wtmp1, call_func1(p_basic_string_wchar_cstr, &str1)) == 0, "Invalid value of str1\n");
+ ok(wcscmp(wtmp2, call_func1(p_basic_string_wchar_cstr, &str2)) == 0, "Invalid value of str2\n");
call_func1(p_basic_string_wchar_dtor, &str1);
call_func1(p_basic_string_wchar_dtor, &str2);
}
More information about the wine-cvs
mailing list