stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r650748 - /stdcxx/branches/4.2.x/tests/src/opt_diags.cpp
Date Wed, 23 Apr 2008 05:15:11 GMT
Author: sebor
Date: Tue Apr 22 22:15:10 2008
New Revision: 650748

URL: http://svn.apache.org/viewvc?rev=650748&view=rev
Log:
2008-04-22  Martin Sebor  <sebor@roguewave.com>

	* tests/src/opt_diags.cpp (_rw_match_name): Asserted (obviously
	holding) preconditions to shut up bogus HP aCC 6 warning 20200:
	Potential null pointer dereference.

Modified:
    stdcxx/branches/4.2.x/tests/src/opt_diags.cpp

Modified: stdcxx/branches/4.2.x/tests/src/opt_diags.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/src/opt_diags.cpp?rev=650748&r1=650747&r2=650748&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/src/opt_diags.cpp (original)
+++ stdcxx/branches/4.2.x/tests/src/opt_diags.cpp Tue Apr 22 22:15:10 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -282,6 +282,8 @@
             break;
         }
 
+        RW_ASSERT (0 != end);
+
         if (':' == *end || '\0' == *end) {
             parg = end + (0 != *end);
             end  = strpbrk (parg, ":,");
@@ -299,6 +301,8 @@
                 break;
             }
 
+            RW_ASSERT (0 != end);
+
             if (':' == *end || '\0' == *end) {
                 parg = end + ('\0' != *end);
                 end  = strpbrk (parg, ":,");
@@ -316,6 +320,8 @@
                     ret = 1;
                     break;
                 }
+
+                RW_ASSERT (0 != end);
 
                 if (':' == *end || '\0' == *end) {
                     parg = end + (0 != *end);



Mime
View raw message