stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r682548 - /stdcxx/branches/4.2.x/tests/containers/23.list.erase.cpp
Date Tue, 05 Aug 2008 00:13:55 GMT
Author: vitek
Date: Mon Aug  4 17:13:55 2008
New Revision: 682548

URL: http://svn.apache.org/viewvc?rev=682548&view=rev
Log:
2008-08-04  Travis Vitek  <vitek@roguewave.com>

	STDCXX-776
	* tests/containers/23.list.erase.cpp (test_erase): Asserted
	precondition to silence another bugus HP aCC 6/cadvise warning.


Modified:
    stdcxx/branches/4.2.x/tests/containers/23.list.erase.cpp

Modified: stdcxx/branches/4.2.x/tests/containers/23.list.erase.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/containers/23.list.erase.cpp?rev=682548&r1=682547&r2=682548&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/containers/23.list.erase.cpp (original)
+++ stdcxx/branches/4.2.x/tests/containers/23.list.erase.cpp Mon Aug  4 17:13:55 2008
@@ -383,13 +383,19 @@
                      "line %d. %{$FUNCALL} != end()", __LINE__);
              }
              else {
+
+                 // assert precondition to silence a bogus HP cadvise
+                 // warning #20200-D: Potential null pointer dereference
+                 const ListIter::pointer pres_iter = &*res_iter;
+                 RW_ASSERT (pres_iter != 0);
+
                  bool success =
-                     tdata.res_ [tcase.off].data_.val_ == res_iter->data_.val_;
+                     tdata.res_ [tcase.off].data_.val_ == pres_iter->data_.val_;
 
                  rw_assert (success, 0, tcase.line,
                      "line %d. %{$FUNCALL} == %{#c}, got %{#c}",
                      __LINE__, char (tdata.res_ [tcase.off].data_.val_),
-                     char (res_iter->data_.val_));
+                     char (pres_iter->data_.val_));
              }
         }
 



Mime
View raw message