stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r814405 - /stdcxx/branches/4.2.x/tests/src/char.cpp
Date Sun, 13 Sep 2009 22:28:15 GMT
Author: sebor
Date: Sun Sep 13 22:28:15 2009
New Revision: 814405

URL: http://svn.apache.org/viewvc?rev=814405&view=rev
Log:
2009-09-13  Martin Sebor  <sebor@apache.org>

	STDCXX-791
	* tests/src/char.cpp (UserTraits::lt, UserTraits::compare,
	UserTraits::copy, UserTraits::move): Parenthesized logic expression
	to silence gcc -Wparentheses warning. (Missed in r814400).

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

Modified: stdcxx/branches/4.2.x/tests/src/char.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/src/char.cpp?rev=814405&r1=814404&r2=814405&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/src/char.cpp (original)
+++ stdcxx/branches/4.2.x/tests/src/char.cpp Sun Sep 13 22:28:15 2009
@@ -332,21 +332,21 @@
 {
     ++n_calls_ [MemFun::lt];
 
-    return c1.f < c2.f || c1.f == c2.f && c1.c < c2.c;
+    return c1.f < c2.f || (c1.f == c2.f && c1.c < c2.c);
 }
 
 
 int UserTraits<UserChar>::
 compare (const char_type *s1, const char_type *s2, size_t n)
 {
-    RW_ASSERT (0 == n || s1 && s2);
+    RW_ASSERT (0 == n || (s1 && s2));
 
     ++n_calls_ [MemFun::compare];
 
     for (size_t i = 0; i != n; ++i) {
         if (s1 [i].f != s2 [i].f || s1 [i].c != s2 [i].c) {
             if (   s1 [i].f < s2 [i].f
-                || s1 [i].f == s2 [i].f && s1 [i].c < s2 [i].c)
+                || (s1 [i].f == s2 [i].f && s1 [i].c < s2 [i].c))
                 return -1;
 
             return 1;
@@ -393,7 +393,7 @@
 UserTraits<UserChar>::
 copy (char_type *dst, const char_type *src, size_t n)
 {
-    RW_ASSERT (0 == n || dst && src);
+    RW_ASSERT (0 == n || (dst && src));
 
     ++n_calls_ [MemFun::copy];
 
@@ -408,7 +408,7 @@
 UserTraits<UserChar>::
 move (char_type *dst, const char_type *src, size_t n)
 {
-    RW_ASSERT (0 == n || dst && src);
+    RW_ASSERT (0 == n || (dst && src));
 
     ++n_calls_ [MemFun::move];
 



Mime
View raw message