[libcxx] [test] Fix nodiscard warnings.
authorStephan T. Lavavej <stl@exchange.microsoft.com>
Thu, 12 Apr 2018 23:56:12 +0000 (23:56 +0000)
committerStephan T. Lavavej <stl@exchange.microsoft.com>
Thu, 12 Apr 2018 23:56:12 +0000 (23:56 +0000)
MSVC's STL has marked to_bytes/from_bytes as nodiscard.

Fixes D45595.

llvm-svn: 329975

libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp

index 70204c2..8126531 100644 (file)
@@ -33,7 +33,7 @@ int main()
         Myconv myconv;
         try
         {
-            myconv.to_bytes(L"\xDA83");
+            (void)myconv.to_bytes(L"\xDA83");
             assert(false);
         }
         catch (const std::range_error&)
@@ -41,7 +41,7 @@ int main()
         }
         try
         {
-            myconv.from_bytes('\xA5');
+            (void)myconv.from_bytes('\xA5');
             assert(false);
         }
         catch (const std::range_error&)
@@ -56,7 +56,7 @@ int main()
 #ifndef TEST_HAS_NO_EXCEPTIONS
         try
         {
-            myconv.from_bytes('\xA5');
+            (void)myconv.from_bytes('\xA5');
             assert(false);
         }
         catch (const std::range_error&)