mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
test: Initialize some local variables
GCC 7.3 complains about uninitialized varaibles in constexpr context.
This commit is contained in:
committed by
Victor Zverovich
parent
f45f70af09
commit
5b49177352
@ -1779,7 +1779,7 @@ struct test_context {
|
|||||||
|
|
||||||
FMT_CONSTEXPR fmt::format_specs parse_specs(const char *s) {
|
FMT_CONSTEXPR fmt::format_specs parse_specs(const char *s) {
|
||||||
fmt::format_specs specs;
|
fmt::format_specs specs;
|
||||||
test_context ctx;
|
test_context ctx{};
|
||||||
fmt::internal::specs_handler<test_context> h(specs, ctx);
|
fmt::internal::specs_handler<test_context> h(specs, ctx);
|
||||||
parse_format_specs(s, h);
|
parse_format_specs(s, h);
|
||||||
return specs;
|
return specs;
|
||||||
@ -1805,7 +1805,7 @@ TEST(FormatTest, ConstexprSpecsHandler) {
|
|||||||
FMT_CONSTEXPR fmt::internal::dynamic_format_specs<char>
|
FMT_CONSTEXPR fmt::internal::dynamic_format_specs<char>
|
||||||
parse_dynamic_specs(const char *s) {
|
parse_dynamic_specs(const char *s) {
|
||||||
fmt::internal::dynamic_format_specs<char> specs;
|
fmt::internal::dynamic_format_specs<char> specs;
|
||||||
test_context ctx;
|
test_context ctx{};
|
||||||
fmt::internal::dynamic_specs_handler<test_context> h(specs, ctx);
|
fmt::internal::dynamic_specs_handler<test_context> h(specs, ctx);
|
||||||
parse_format_specs(s, h);
|
parse_format_specs(s, h);
|
||||||
return specs;
|
return specs;
|
||||||
|
Reference in New Issue
Block a user