Skip to content

Commit 8a13647

Browse files
XuanwoMichaHoffmann
authored andcommitted
fix: Warning for no-missing-field-initializers
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent d559c46 commit 8a13647

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
uses: egor-tensin/setup-mingw@v2
2020

2121
- name: build
22-
run: ${{ matrix.compiler }} -o scanner.o -I./src -c src/scanner.cc
22+
run: ${{ matrix.compiler }} -o scanner.o -I./src -c src/scanner.cc -Werror

src/scanner.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ struct Scanner {
9696
}
9797
// manage quoted context
9898
if (valid_symbols[QUOTED_TEMPLATE_START] && !in_quoted_context() && lexer->lookahead == '"') {
99-
Context ctx = { QUOTED_TEMPLATE };
99+
Context ctx = { QUOTED_TEMPLATE, "" };
100100
context_stack.push_back(ctx);
101101
return accept_and_advance(lexer, QUOTED_TEMPLATE_START);
102102
}
@@ -114,7 +114,7 @@ struct Scanner {
114114
) {
115115
advance(lexer);
116116
if (lexer->lookahead == '{') {
117-
Context ctx = { TEMPLATE_INTERPOLATION };
117+
Context ctx = { TEMPLATE_INTERPOLATION, "" };
118118
context_stack.push_back(ctx);
119119
return accept_and_advance(lexer, TEMPLATE_INTERPOLATION_START);
120120
}
@@ -142,7 +142,7 @@ struct Scanner {
142142
) {
143143
advance(lexer);
144144
if (lexer->lookahead == '{') {
145-
Context ctx = { TEMPLATE_DIRECTIVE };
145+
Context ctx = { TEMPLATE_DIRECTIVE, "" };
146146
context_stack.push_back(ctx);
147147
return accept_and_advance(lexer, TEMPLATE_DIRECTIVE_START);
148148
}

0 commit comments

Comments
 (0)