Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/bug-1000478 into 
lp:zorba.

Requested reviews:
  Paul J. Lucas (paul-lucas)
Related bugs:
  Bug #1000478 in Zorba: "Build errors using Xcode 4.3.2"
  https://bugs.launchpad.net/zorba/+bug/1000478

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/bug-1000478/+merge/106087

Fixed the build error and also fixed several warnings that are new with Xcode 
4.3.2.
-- 
https://code.launchpad.net/~paul-lucas/zorba/bug-1000478/+merge/106087
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/runtime/full_text/ft_module_impl.cpp'
--- src/runtime/full_text/ft_module_impl.cpp	2012-05-16 00:52:46 +0000
+++ src/runtime/full_text/ft_module_impl.cpp	2012-05-17 02:33:19 +0000
@@ -487,11 +487,14 @@
       ERROR_LOC( loc )
     );
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wbind-to-temporary-copy"
   state->tresult_ = std::move(
     state->thesaurus_->lookup(
       state->phrase_, state->relationship_, state->at_least_, state->at_most_
     )
   );
+#pragma GCC diagnostic pop
   ZORBA_ASSERT( state->tresult_.get() );
 
   while ( state->tresult_->next( &synonym ) ) {
@@ -509,11 +512,14 @@
     StateTraitsImpl<ThesaurusLookupIteratorState>::getState(
       plan_state, this->theStateOffset
     );
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wbind-to-temporary-copy"
   state->tresult_ = std::move(
     state->thesaurus_->lookup(
       state->phrase_, state->relationship_, state->at_least_, state->at_most_
     )
   );
+#pragma GCC diagnostic pop
   ZORBA_ASSERT( state->tresult_.get() );
 }
 

=== modified file 'src/unit_tests/string_instantiate.cpp'
--- src/unit_tests/string_instantiate.cpp	2012-05-03 12:31:51 +0000
+++ src/unit_tests/string_instantiate.cpp	2012-05-17 02:33:19 +0000
@@ -196,63 +196,63 @@
   s1.substr();
   s1.swap( s2 );
 
-  s1 == s2;
-  s1 == ss;
-  ss == s1;
-  s1 == cs;
-  s1 == csc;
-  cs == s1;
-  csc == s1;
-
-  s1 != s2;
-  s1 != ss;
-  ss != s1;
-  s1 != cs;
-  s1 != csc;
-  cs != s1;
-  csc != s1;
-
-  s1 < s2;
-  s1 < ss;
-  ss < s1;
-  s1 < cs;
-  s1 < csc;
-  cs < s1;
-  csc < s1;
-
-  s1 <= s2;
-  s1 <= ss;
-  ss <= s1;
-  s1 <= cs;
-  s1 <= csc;
-  cs <= s1;
-  csc <= s1;
-
-  s1 > s2;
-  s1 > ss;
-  ss > s1;
-  s1 > cs;
-  s1 > csc;
-  cs > s1;
-  csc > s1;
-
-  s1 >= s2;
-  s1 >= ss;
-  ss >= s1;
-  s1 >= cs;
-  s1 >= csc;
-  cs >= s1;
-  csc >= s1;
-
-  s1 + s1;
-  s1 + ss;
-  ss + s1;
-  s1 + cs;
-  s1 + csc;
-  cs + s1;
-  csc + s1;
-  s1 + c;
-  c + s1;
+  (void)(s1 == s2);
+  (void)(s1 == ss);
+  (void)(ss == s1);
+  (void)(s1 == cs);
+  (void)(s1 == csc);
+  (void)(cs == s1);
+  (void)(csc == s1);
+
+  (void)(s1 != s2);
+  (void)(s1 != ss);
+  (void)(ss != s1);
+  (void)(s1 != cs);
+  (void)(s1 != csc);
+  (void)(cs != s1);
+  (void)(csc != s1);
+
+  (void)(s1 < s2);
+  (void)(s1 < ss);
+  (void)(ss < s1);
+  (void)(s1 < cs);
+  (void)(s1 < csc);
+  (void)(cs < s1);
+  (void)(csc < s1);
+
+  (void)(s1 <= s2);
+  (void)(s1 <= ss);
+  (void)(ss <= s1);
+  (void)(s1 <= cs);
+  (void)(s1 <= csc);
+  (void)(cs <= s1);
+  (void)(csc <= s1);
+
+  (void)(s1 > s2);
+  (void)(s1 > ss);
+  (void)(ss > s1);
+  (void)(s1 > cs);
+  (void)(s1 > csc);
+  (void)(cs > s1);
+  (void)(csc > s1);
+
+  (void)(s1 >= s2);
+  (void)(s1 >= ss);
+  (void)(ss >= s1);
+  (void)(s1 >= cs);
+  (void)(s1 >= csc);
+  (void)(cs >= s1);
+  (void)(csc >= s1);
+
+  (void)(s1 + s1);
+  (void)(s1 + ss);
+  (void)(ss + s1);
+  (void)(s1 + cs);
+  (void)(s1 + csc);
+  (void)(cs + s1);
+  (void)(csc + s1);
+  (void)(s1 + c);
+  (void)(c + s1);
 
   cout << s1;
 }
@@ -485,65 +485,65 @@
   u1.swap( s );
   u1.swap( u1 );
 
-  u1 == s;
-  u1 == ss;
-  ss == u1;
-  u1 == cs;
-  u1 == csc;
-  cs == u1;
-  csc == u1;
-
-  u1 != s;
-  u1 != ss;
-  ss != u1;
-  u1 != cs;
-  u1 != csc;
-  cs != u1;
-  csc != u1;
-
-  u1 < s;
-  u1 < ss;
-  ss < u1;
-  u1 < cs;
-  u1 < csc;
-  cs < u1;
-  csc < u1;
-
-  u1 <= s;
-  u1 <= ss;
-  ss <= u1;
-  u1 <= cs;
-  u1 <= csc;
-  cs <= u1;
-  csc <= u1;
-
-  u1 > s;
-  u1 > ss;
-  ss > u1;
-  u1 > cs;
-  u1 > csc;
-  cs > u1;
-  csc > u1;
-
-  u1 >= s;
-  u1 >= ss;
-  ss >= u1;
-  u1 >= cs;
-  u1 >= csc;
-  cs >= u1;
-  csc >= u1;
-
-  u1 + u1;
-  u1 + s;
-  s + u1;
-  u1 + ss;
-  ss + u1;
-  u1 + cs;
-  u1 + csc;
-  cs + u1;
-  csc + u1;
-  u1 + c;
-  c + u1;
+  (void)(u1 == s);
+  (void)(u1 == ss);
+  (void)(ss == u1);
+  (void)(u1 == cs);
+  (void)(u1 == csc);
+  (void)(cs == u1);
+  (void)(csc == u1);
+
+  (void)(u1 != s);
+  (void)(u1 != ss);
+  (void)(ss != u1);
+  (void)(u1 != cs);
+  (void)(u1 != csc);
+  (void)(cs != u1);
+  (void)(csc != u1);
+
+  (void)(u1 < s);
+  (void)(u1 < ss);
+  (void)(ss < u1);
+  (void)(u1 < cs);
+  (void)(u1 < csc);
+  (void)(cs < u1);
+  (void)(csc < u1);
+
+  (void)(u1 <= s);
+  (void)(u1 <= ss);
+  (void)(ss <= u1);
+  (void)(u1 <= cs);
+  (void)(u1 <= csc);
+  (void)(cs <= u1);
+  (void)(csc <= u1);
+
+  (void)(u1 > s);
+  (void)(u1 > ss);
+  (void)(ss > u1);
+  (void)(u1 > cs);
+  (void)(u1 > csc);
+  (void)(cs > u1);
+  (void)(csc > u1);
+
+  (void)(u1 >= s);
+  (void)(u1 >= ss);
+  (void)(ss >= u1);
+  (void)(u1 >= cs);
+  (void)(u1 >= csc);
+  (void)(cs >= u1);
+  (void)(csc >= u1);
+
+  (void)(u1 + u1);
+  (void)(u1 + s);
+  (void)(s + u1);
+  (void)(u1 + ss);
+  (void)(ss + u1);
+  (void)(u1 + cs);
+  (void)(u1 + csc);
+  (void)(cs + u1);
+  (void)(csc + u1);
+  (void)(u1 + c);
+  (void)(c + u1);
 }
 
 ///////////////////////////////////////////////////////////////////////////////

=== modified file 'src/util/fs_util.cpp'
--- src/util/fs_util.cpp	2012-05-03 12:31:51 +0000
+++ src/util/fs_util.cpp	2012-05-17 02:33:19 +0000
@@ -324,7 +324,7 @@
         case DT_DIR: {
           char const *const name = ent_->d_name;
           // skip "." and ".." entries
-          if ( name[0] == '.' && (!name[1] || name[1] == '.' && !name[2]) )
+          if ( name[0] == '.' && (!name[1] || (name[1] == '.' && !name[2])) )
             continue;
           ent_type_ = directory;
           break;

=== modified file 'src/util/string/rstring.h'
--- src/util/string/rstring.h	2012-05-03 12:31:51 +0000
+++ src/util/string/rstring.h	2012-05-17 02:33:19 +0000
@@ -2051,13 +2051,12 @@
 
   string_data data_;
 
-#if defined _MSC_VER || defined CLANG
 //
-// Microsoft's Visual Studio C++ compiler doesn't consider the operator+()
-// functions as friends even though they're declared as such.
+// I currently don't understand why the compiler complains about append_safe()
+// being private within operator+() functions even though they are declared as
+// friends.  For now, just make them "public."
 //
 public:
-#endif
   // RSTRING_APPEND_SAFE_CP_ST_CP_ST_X
   /**
    * Appends one or two C strings with known-valid length parameters.
@@ -2073,9 +2072,7 @@
    */
   void append_safe( const_pointer s1, size_type n1,
                     const_pointer s2 = nullptr, size_type n2 = 0 );
-#if defined _MSC_VER || defined CLANG
 private:
-#endif
 
   /**
    * A version of assign() optimized slightly for when \a n == 1.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to