Fix missing returns in libstdc++ header and tests
authorJonathan Wakely <jwakely@redhat.com>
Fri, 16 Jun 2017 08:13:37 +0000 (09:13 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 16 Jun 2017 08:13:37 +0000 (09:13 +0100)
* include/bits/locale_conv.h (wbuffer_convert::_M_put): Add missing
return statement.
* testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
Return void.
* testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
Likewise.
* 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.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc:
Return void.
* testsuite/special_functions/14_expint/pr68397.cc: Likewise.

From-SVN: r249238

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_conv.h
libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/char/1.cc
libstdc++-v3/testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc
libstdc++-v3/testsuite/23_containers/map/modifiers/insert_or_assign/1.cc
libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc
libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc
libstdc++-v3/testsuite/special_functions/14_expint/pr68397.cc

index 26b3075143d224929f8b0ed4669fd16e96eba88e..09d1abe4fb77a7f696878a0a8f349bd4e8332f73 100644 (file)
@@ -1,3 +1,19 @@
+2017-06-16  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/bits/locale_conv.h (wbuffer_convert::_M_put): Add missing
+       return statement.
+       * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
+       Return void.
+       * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
+       Likewise.
+       * 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.
+       * testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc:
+       Return void.
+       * testsuite/special_functions/14_expint/pr68397.cc: Likewise.
+
 2017-06-16  François Dumont  <fdumont@gcc.gnu.org>
 
        * include/bits/stl_bvector.h
index 9b952d45165767f360872c57f8a11ebba6a768c8..74beaec5ae60d27d97cd8e41eb753c13152d0405 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 88a74f6ee8781e984f23652752b83c8d9151e26e..c2d195122c859bf204b61cff35be6f47b5e1eee2 100644 (file)
@@ -22,7 +22,7 @@
 #include <string_view>
 #include <testsuite_hooks.h>
 
-bool
+void
 test01()
 {
   typedef std::string_view::size_type csize_type;
index 0e625d638a7f27e084ddf8a1d37443c19edd18c5..957c80c5a33d1e1c8a7f55395f7138a44b39f470 100644 (file)
@@ -22,7 +22,7 @@
 #include <string_view>
 #include <testsuite_hooks.h>
 
-bool
+void
 test01()
 {
   typedef std::wstring_view::size_type csize_type;
index 48c17ebc5ef35432f875c987f15c562b3bf645ef..aaf5d8a888bea965ede350c4923b62c21c050bb2 100644 (file)
@@ -39,10 +39,12 @@ struct Val
   {
     val = other.val;
     other.moved_from_assign = true;
+    return *this;
   }
   Val& operator=(const Val& other)
   {
     val = other.val;
+    return *this;
   }
 };
 
index 67fd164a37014623c1de8e7709d434ecc0818bc4..d4b9601c1caaed1ec16bdd6eee9c6c8d343b3dec 100644 (file)
@@ -38,10 +38,12 @@ struct Val
   {
     val = other.val;
     other.moved_from_assign = true;
+    return *this;
   }
   Val& operator=(const Val& other)
   {
     val = other.val;
+    return *this;
   }
 };
 
index 24cd2f5d4be9ae6d2ad39677d59791e29d3cdb8c..7e3b77372859d76ced708364d22bb549d36c1f02 100644 (file)
@@ -50,7 +50,7 @@ void test12_aux(bool integer_type)
   VERIFY(is.fail());
 }
 
-bool test12()
+void test12()
 {
   test12_aux<short>(true);
   test12_aux<int>(true);
index 8da16d1fc69badc94a8a52e898088b5478d109f6..9527f4050ad79506a53111d9f94ce215d4f6d0c8 100644 (file)
@@ -23,7 +23,7 @@
 #include <cmath>
 #include <testsuite_hooks.h>
 
-int
+void
 test01()
 {
   // Answers from Wolfram Alpha.