diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-03-23 11:44:19 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-27 16:35:39 +0200 |
commit | 2c4845ce331e5dfaf5e106f74871ce16721a1358 (patch) | |
tree | 32bf5ee220e114e0bee7ab49fc79a3a287c0f121 /tests/auto/testlib/selftests/strcmp | |
parent | 0ee1b4a1dea8b587a5d39bfeb7e18c97f13dd877 (diff) |
Fix some compiler warnings in tests.
- Unused variables
- Deprecated conversion from const char * to char *.
Change-Id: Iea0b9c4613ea74cead6d95ba12ad1028f531cbff
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'tests/auto/testlib/selftests/strcmp')
-rw-r--r-- | tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp b/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp index 20bfc2228a..73de6df5f3 100644 --- a/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp +++ b/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp @@ -65,7 +65,7 @@ void tst_StrCmp::compareCharStars() const QCOMPARE(str1, "foo"); QCOMPARE(str1, str1); - char *str2 = "foo"; + char *str2 = const_cast<char *>("foo"); QCOMPARE("foo", str2); QCOMPARE(str2, "foo"); QCOMPARE(str2, str2); @@ -88,8 +88,8 @@ void tst_StrCmp::compareByteArray() const QCOMPARE(ba.constData(), "bar"); QCOMPARE(ba.constData(), "foo"); - char *bar = "bar"; - char *foo = "foo"; + char *bar = const_cast<char *>("bar"); + char *foo = const_cast<char *>("foo"); QEXPECT_FAIL("", "Next test should fail", Continue); QCOMPARE(ba.data(), bar); |