From 7415e6c49aba7a74533ecac5ac218a43d877b7a6 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Fri, 13 Oct 2023 18:15:47 +0000 Subject: [PATCH] Suppress warnings on MSVC Fixes #257 Signed-off-by: Michael Carroll --- include/gz/math/Helpers.hh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/gz/math/Helpers.hh b/include/gz/math/Helpers.hh index 202221978..62f79b311 100644 --- a/include/gz/math/Helpers.hh +++ b/include/gz/math/Helpers.hh @@ -951,7 +951,10 @@ namespace ignition dayString.erase(dayString.length() - 1); try { - std::stoi(dayString); + // We are only checking if it sucessfully parses, + // and are not concerned with the actual value. + auto day = std::stoi(dayString); + (void) day; } catch (const std::out_of_range &) {