diff options
author | Alan Conway <aconway@apache.org> | 2008-04-02 12:55:56 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-04-02 12:55:56 +0000 |
commit | 4869367d80883afc0c58b1b741636c200e8d8fa0 (patch) | |
tree | 0ceba35f2384d741140714b05aed4255e8f89455 /cpp | |
parent | cf7e26a013491118e4275d7e92652a5768c0b440 (diff) | |
download | qpid-python-4869367d80883afc0c58b1b741636c200e8d8fa0.tar.gz |
Fix gcc 4.3 warnings.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@643891 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/tests/BoundedIterator.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cpp/src/tests/BoundedIterator.cpp b/cpp/src/tests/BoundedIterator.cpp index 34e1a99cd8..f29f7c8122 100644 --- a/cpp/src/tests/BoundedIterator.cpp +++ b/cpp/src/tests/BoundedIterator.cpp @@ -27,14 +27,14 @@ using namespace qpid; QPID_AUTO_TEST_SUITE(BoundedIteratorTestSuite) BOOST_AUTO_TEST_CASE(testIncrement) { - char* b="ab"; - char* e=b+strlen(b); - BoundedIterator<char*> i(b,e); + const char* b="ab"; + const char* e=b+strlen(b); + BoundedIterator<const char*> i(b,e); BOOST_CHECK_EQUAL('a', *i); ++i; BOOST_CHECK_EQUAL('b', *i); ++i; - BOOST_CHECK(static_cast<char*>(i) == e); + BOOST_CHECK(static_cast<const char*>(i) == e); try { ++i; BOOST_FAIL("Expected exception"); @@ -43,9 +43,9 @@ BOOST_AUTO_TEST_CASE(testIncrement) { } BOOST_AUTO_TEST_CASE(testAdvance) { - char* b="abc"; - char* e=b+strlen(b); - BoundedIterator<char*> i(b,e); + const char* b="abc"; + const char* e=b+strlen(b); + BoundedIterator<const char*> i(b,e); i += 2; BOOST_CHECK_EQUAL('c', *i); try { @@ -56,11 +56,11 @@ BOOST_AUTO_TEST_CASE(testAdvance) { } BOOST_AUTO_TEST_CASE(testDeref) { - char* b="ab"; - char* e=b+strlen(b); - BoundedIterator<char*> i(b,e); + const char* b="ab"; + const char* e=b+strlen(b); + BoundedIterator<const char*> i(b,e); i += 2; - BOOST_CHECK(static_cast<char*>(i) == e); + BOOST_CHECK(static_cast<const char*>(i) == e); try { (void)*i; BOOST_FAIL("Expected exception"); |