diff --git a/libcxx/test/std/strings/string.conversions/stod.pass.cpp b/libcxx/test/std/strings/string.conversions/stod.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stod.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stod.pass.cpp @@ -60,7 +60,7 @@ { size_t idx = 0; try { - std::stod("", &idx); + (void)std::stod("", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -69,7 +69,7 @@ { size_t idx = 0; try { - std::stod(" - 8", &idx); + (void)std::stod(" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -78,7 +78,7 @@ { size_t idx = 0; try { - std::stod("a1", &idx); + (void)std::stod("a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -127,7 +127,7 @@ { size_t idx = 0; try { - std::stod(L"", &idx); + (void)std::stod(L"", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -136,7 +136,7 @@ { size_t idx = 0; try { - std::stod(L" - 8", &idx); + (void)std::stod(L" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -145,7 +145,7 @@ { size_t idx = 0; try { - std::stod(L"a1", &idx); + (void)std::stod(L"a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); diff --git a/libcxx/test/std/strings/string.conversions/stof.pass.cpp b/libcxx/test/std/strings/string.conversions/stof.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stof.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stof.pass.cpp @@ -61,7 +61,7 @@ { size_t idx = 0; try { - std::stof("", &idx); + (void)std::stof("", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -70,7 +70,7 @@ { size_t idx = 0; try { - std::stof(" - 8", &idx); + (void)std::stof(" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -79,7 +79,7 @@ { size_t idx = 0; try { - std::stof("a1", &idx); + (void)std::stof("a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -129,7 +129,7 @@ { size_t idx = 0; try { - std::stof(L"", &idx); + (void)std::stof(L"", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -138,7 +138,7 @@ { size_t idx = 0; try { - std::stof(L" - 8", &idx); + (void)std::stof(L" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -147,7 +147,7 @@ { size_t idx = 0; try { - std::stof(L"a1", &idx); + (void)std::stof(L"a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); diff --git a/libcxx/test/std/strings/string.conversions/stoi.pass.cpp b/libcxx/test/std/strings/string.conversions/stoi.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stoi.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stoi.pass.cpp @@ -32,7 +32,7 @@ if (std::numeric_limits::max() > std::numeric_limits::max()) { size_t idx = 0; try { - std::stoi("0x100000000", &idx, 16); + (void)std::stoi("0x100000000", &idx, 16); assert(false); } catch (const std::out_of_range&) { @@ -41,7 +41,7 @@ { size_t idx = 0; try { - std::stoi("", &idx); + (void)std::stoi("", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -50,7 +50,7 @@ { size_t idx = 0; try { - std::stoi(" - 8", &idx); + (void)std::stoi(" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -59,7 +59,7 @@ { size_t idx = 0; try { - std::stoi("a1", &idx); + (void)std::stoi("a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -81,7 +81,7 @@ if (std::numeric_limits::max() > std::numeric_limits::max()) { size_t idx = 0; try { - std::stoi(L"0x100000000", &idx, 16); + (void)std::stoi(L"0x100000000", &idx, 16); assert(false); } catch (const std::out_of_range&) { @@ -90,7 +90,7 @@ { size_t idx = 0; try { - std::stoi(L"", &idx); + (void)std::stoi(L"", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -99,7 +99,7 @@ { size_t idx = 0; try { - std::stoi(L" - 8", &idx); + (void)std::stoi(L" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -108,7 +108,7 @@ { size_t idx = 0; try { - std::stoi(L"a1", &idx); + (void)std::stoi(L"a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); diff --git a/libcxx/test/std/strings/string.conversions/stol.pass.cpp b/libcxx/test/std/strings/string.conversions/stol.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stol.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stol.pass.cpp @@ -32,7 +32,7 @@ { size_t idx = 0; try { - std::stol("", &idx); + (void)std::stol("", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -41,7 +41,7 @@ { size_t idx = 0; try { - std::stol(" - 8", &idx); + (void)std::stol(" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -50,7 +50,7 @@ { size_t idx = 0; try { - std::stol("a1", &idx); + (void)std::stol("a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -60,7 +60,7 @@ size_t idx = 0; try { // LWG#2009 and PR14919 - std::stol("9999999999999999999999999999999999999999999999999", &idx); + (void)std::stol("9999999999999999999999999999999999999999999999999", &idx); assert(false); } catch (const std::out_of_range&) { assert(idx == 0); @@ -82,7 +82,7 @@ { size_t idx = 0; try { - std::stol(L"", &idx); + (void)std::stol(L"", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -91,7 +91,7 @@ { size_t idx = 0; try { - std::stol(L" - 8", &idx); + (void)std::stol(L" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -100,7 +100,7 @@ { size_t idx = 0; try { - std::stol(L"a1", &idx); + (void)std::stol(L"a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -110,7 +110,7 @@ size_t idx = 0; try { // LWG#2009 and PR14919 - std::stol(L"9999999999999999999999999999999999999999999999999", &idx); + (void)std::stol(L"9999999999999999999999999999999999999999999999999", &idx); assert(false); } catch (const std::out_of_range&) { assert(idx == 0); diff --git a/libcxx/test/std/strings/string.conversions/stold.pass.cpp b/libcxx/test/std/strings/string.conversions/stold.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stold.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stold.pass.cpp @@ -49,7 +49,7 @@ { size_t idx = 0; try { - std::stold("", &idx); + (void)std::stold("", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -58,7 +58,7 @@ { size_t idx = 0; try { - std::stold(" - 8", &idx); + (void)std::stold(" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -67,7 +67,7 @@ { size_t idx = 0; try { - std::stold("a1", &idx); + (void)std::stold("a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -113,7 +113,7 @@ { size_t idx = 0; try { - std::stold(L"", &idx); + (void)std::stold(L"", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -122,7 +122,7 @@ { size_t idx = 0; try { - std::stold(L" - 8", &idx); + (void)std::stold(L" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -131,7 +131,7 @@ { size_t idx = 0; try { - std::stold(L"a1", &idx); + (void)std::stold(L"a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); diff --git a/libcxx/test/std/strings/string.conversions/stoll.pass.cpp b/libcxx/test/std/strings/string.conversions/stoll.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stoll.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stoll.pass.cpp @@ -32,7 +32,7 @@ { size_t idx = 0; try { - std::stoll("", &idx); + (void)std::stoll("", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -41,7 +41,7 @@ { size_t idx = 0; try { - std::stoll(" - 8", &idx); + (void)std::stoll(" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -50,7 +50,7 @@ { size_t idx = 0; try { - std::stoll("a1", &idx); + (void)std::stoll("a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -60,7 +60,7 @@ size_t idx = 0; try { // LWG#2009 and PR14919 - std::stoll("99999999999999999999999999", &idx); + (void)std::stoll("99999999999999999999999999", &idx); assert(false); } catch (const std::out_of_range&) { assert(idx == 0); @@ -82,7 +82,7 @@ { size_t idx = 0; try { - std::stoll(L"", &idx); + (void)std::stoll(L"", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -91,7 +91,7 @@ { size_t idx = 0; try { - std::stoll(L" - 8", &idx); + (void)std::stoll(L" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -100,7 +100,7 @@ { size_t idx = 0; try { - std::stoll(L"a1", &idx); + (void)std::stoll(L"a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -110,7 +110,7 @@ size_t idx = 0; try { // LWG#2009 and PR14919 - std::stoll(L"99999999999999999999999999", &idx); + (void)std::stoll(L"99999999999999999999999999", &idx); assert(false); } catch (const std::out_of_range&) { assert(idx == 0); diff --git a/libcxx/test/std/strings/string.conversions/stoul.pass.cpp b/libcxx/test/std/strings/string.conversions/stoul.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stoul.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stoul.pass.cpp @@ -31,7 +31,7 @@ { size_t idx = 0; try { - std::stoul("", &idx); + (void)std::stoul("", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -40,7 +40,7 @@ { size_t idx = 0; try { - std::stoul(" - 8", &idx); + (void)std::stoul(" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -49,7 +49,7 @@ { size_t idx = 0; try { - std::stoul("a1", &idx); + (void)std::stoul("a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -59,7 +59,7 @@ size_t idx = 0; try { // LWG#2009 and PR14919 - std::stoul("9999999999999999999999999999999999999999999999999", &idx); + (void)std::stoul("9999999999999999999999999999999999999999999999999", &idx); assert(false); } catch (const std::out_of_range&) { assert(idx == 0); @@ -80,7 +80,7 @@ { size_t idx = 0; try { - std::stoul(L"", &idx); + (void)std::stoul(L"", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -89,7 +89,7 @@ { size_t idx = 0; try { - std::stoul(L" - 8", &idx); + (void)std::stoul(L" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -98,7 +98,7 @@ { size_t idx = 0; try { - std::stoul(L"a1", &idx); + (void)std::stoul(L"a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -108,7 +108,7 @@ size_t idx = 0; try { // LWG#2009 and PR14919 - std::stoul(L"9999999999999999999999999999999999999999999999999", &idx); + (void)std::stoul(L"9999999999999999999999999999999999999999999999999", &idx); assert(false); } catch (const std::out_of_range&) { assert(idx == 0); diff --git a/libcxx/test/std/strings/string.conversions/stoull.pass.cpp b/libcxx/test/std/strings/string.conversions/stoull.pass.cpp --- a/libcxx/test/std/strings/string.conversions/stoull.pass.cpp +++ b/libcxx/test/std/strings/string.conversions/stoull.pass.cpp @@ -31,7 +31,7 @@ { size_t idx = 0; try { - std::stoull("", &idx); + (void)std::stoull("", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -40,7 +40,7 @@ { size_t idx = 0; try { - std::stoull(" - 8", &idx); + (void)std::stoull(" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -49,7 +49,7 @@ { size_t idx = 0; try { - std::stoull("a1", &idx); + (void)std::stoull("a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -59,7 +59,7 @@ size_t idx = 0; try { // LWG#2009 and PR14919 - std::stoull("9999999999999999999999999999999999999999999999999", &idx); + (void)std::stoull("9999999999999999999999999999999999999999999999999", &idx); assert(false); } catch (const std::out_of_range&) { assert(idx == 0); @@ -80,7 +80,7 @@ { size_t idx = 0; try { - std::stoull(L"", &idx); + (void)std::stoull(L"", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -89,7 +89,7 @@ { size_t idx = 0; try { - std::stoull(L" - 8", &idx); + (void)std::stoull(L" - 8", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -98,7 +98,7 @@ { size_t idx = 0; try { - std::stoull(L"a1", &idx); + (void)std::stoull(L"a1", &idx); assert(false); } catch (const std::invalid_argument&) { assert(idx == 0); @@ -108,7 +108,7 @@ size_t idx = 0; try { // LWG#2009 and PR14919 - std::stoull(L"9999999999999999999999999999999999999999999999999", &idx); + (void)std::stoull(L"9999999999999999999999999999999999999999999999999", &idx); assert(false); } catch (const std::out_of_range&) { assert(idx == 0);