Skip to content

Commit

Permalink
Merge pull request #353 from rouault/do_from_chars_coverity_warning
Browse files Browse the repository at this point in the history
do_from_chars(): initialize variable to fix Coverity Scan warning
  • Loading branch information
p-ranav authored May 5, 2024
2 parents ce7db99 + 5228c57 commit eba16b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/argparse/argparse.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ constexpr auto consume_hex_prefix(std::string_view s)

template <class T, auto Param>
inline auto do_from_chars(std::string_view s) -> T {
T x;
T x{0};
auto [first, last] = pointer_range(s);
auto [ptr, ec] = std::from_chars(first, last, x, Param);
if (ec == std::errc()) {
Expand Down

0 comments on commit eba16b3

Please sign in to comment.