]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix missing returns in libstdc++ header and tests
authorJonathan Wakely <jwakely@redhat.com>
Fri, 16 Jun 2017 12:41:45 +0000 (13:41 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 16 Jun 2017 12:41:45 +0000 (13:41 +0100)
* include/bits/locale_conv.h (wbuffer_convert::_M_put): Add missing
return statement.
* testsuite/23_containers/map/modifiers/insert_or_assign/1.cc: Add
missing return statements.
* testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
Likewise.

From-SVN: r249251

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_conv.h
libstdc++-v3/testsuite/23_containers/map/modifiers/insert_or_assign/1.cc
libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc

index 1287ffdd06d976231613015b421a8c4951319ce2..f6779412fc603e8eb1cf219c19d6c348182053ca 100644 (file)
@@ -1,3 +1,12 @@
+2017-06-16  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/bits/locale_conv.h (wbuffer_convert::_M_put): Add missing
+       return statement.
+       * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc: Add
+       missing return statements.
+       * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
+       Likewise.
+
 2017-06-07  Jonathan Wakely  <jwakely@redhat.com>
 
        PR libstdc++/81002
index ba04824ebdd250782811f847d2e718dae0379b46..c34146dfa5c95286a3d6a28ea257813490996919 100644 (file)
@@ -482,6 +482,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
       {
        if (_M_buf->sputn(__p, __n) < __n)
          return false;
+       return true;
       }
 
       // convert the put area and write to the byte stream buffer
index 9db533bb0da7f620a20958ae7b1cda2aca08b083..6da5597320c3dfd147bce28354b33a2cd249d43f 100644 (file)
@@ -41,10 +41,12 @@ struct Val
   {
     val = other.val;
     other.moved_from_assign = true;
+    return *this;
   }
   Val& operator=(const Val& other)
   {
     val = other.val;
+    return *this;
   }
 };
 
index 2ff624dd18d76cc1808251ececd35ccdf1aec8bc..bcc418c88128023981f7d2e75dec0dd988ae88c7 100644 (file)
@@ -41,10 +41,12 @@ struct Val
   {
     val = other.val;
     other.moved_from_assign = true;
+    return *this;
   }
   Val& operator=(const Val& other)
   {
     val = other.val;
+    return *this;
   }
 };