From 2edee3e606109659fd871208a20a7d4bb48e080b Mon Sep 17 00:00:00 2001 From: Utkarsh Mishra <32216308+utkarshmsr3@users.noreply.github.com> Date: Thu, 13 Feb 2025 10:41:33 +0530 Subject: [PATCH] fix_uninitialized_var_error --- include/date/date.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/date/date.h b/include/date/date.h index 3fc1f74f..f4ebddef 100644 --- a/include/date/date.h +++ b/include/date/date.h @@ -6789,8 +6789,8 @@ from_stream(std::basic_istream& is, const CharT* fmt, ws(is); using dfs = detail::decimal_format_seconds; CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width; - int tH; - int tM; + int tH = not_a_hour; + int tM = not_a_minute; long double S{}; read(is, ru{tH, 1, 2}, CharT{':'}, ru{tM, 1, 2}, CharT{':'}, rld{S, 1, w}); @@ -7519,7 +7519,7 @@ from_stream(std::basic_istream& is, const CharT* fmt, case 'z': if (command) { - int tH, tM; + int tH = not_a_hour, tM = not_a_minute; minutes toff = not_a_offset; bool neg = false; auto ic = is.peek();