diff --git a/test/std-format-test.cc b/test/std-format-test.cc index 8bf4b6d1a1b68..13f2a3283643f 100644 --- a/test/std-format-test.cc +++ b/test/std-format-test.cc @@ -111,7 +111,7 @@ template <> struct std::formatter { char c = get_char(); if (!isdigit(c) || (++iter, get_char()) != '}') throw format_error("invalid format"); - width_arg_id = c - '0'; + width_arg_id = static_cast(c - '0'); ctx.check_arg_id(width_arg_id); return ++iter; }