]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 21_strings / basic_string / element_access / wchar_t / 1.cc
index 13dac274b7b5d8d426f1178c83d5d4d74abf2756..a1b1742a9bf3f31b8cf1f408648aea4400cbca3c 100644 (file)
@@ -1,6 +1,6 @@
 // 1999-06-08 bkoz
 
-// Copyright (C) 1999, 2003, 2009 Free Software Foundation, Inc.
+// Copyright (C) 1999-2024 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -23,9 +23,8 @@
 #include <stdexcept>
 #include <testsuite_hooks.h>
 
-bool test01(void)
+void test01(void)
 {
-  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   typedef std::wstring::const_reference cref;
   typedef std::wstring::reference ref;
@@ -54,7 +53,7 @@ bool test01(void)
   cref cref3 = str01.at(csz01 - 1);
   VERIFY( cref3 == L'a' );
   try {
-    str01.at(csz01);
+    (void) str01.at(csz01);
     VERIFY( false ); // Should not get here, as exception thrown.
   }
   catch(std::out_of_range& fail) {
@@ -69,7 +68,7 @@ bool test01(void)
   ref ref3 = str02.at(csz02 - 1);
   VERIFY( ref3 == L'a' );
   try {
-    str02.at(csz02);
+    (void) str02.at(csz02);
     VERIFY( false ); // Should not get here, as exception thrown.
   }
   catch(std::out_of_range& fail) {
@@ -78,7 +77,6 @@ bool test01(void)
   catch(...) {
     VERIFY( false );
   }
-  return test;
 }
 
 int main()