Skip to content

Commit 4c22784

Browse files
committed
Fix C23 syntax errors
``` error C2059: syntax error: '}' ```
1 parent 6c08f20 commit 4c22784

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/lexstate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static const char *RBS_TOKENTYPE_NAMES[] = {
9292
"tANNOTATION", /* Annotation */
9393
};
9494

95-
rbs_token_t NullToken = { .type = NullType, .range = {} };
95+
rbs_token_t NullToken = { .type = NullType, .range = {0} };
9696
rbs_position_t NullPosition = { -1, -1, -1, -1 };
9797
rbs_range_t NULL_RANGE = { { -1, -1, -1, -1 }, { -1, -1, -1, -1 } };
9898

src/parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3415,7 +3415,7 @@ rbs_parser_t *rbs_parser_new(rbs_string_t string, const rbs_encoding_t *encoding
34153415
.vars = NULL,
34163416
.last_comment = NULL,
34173417

3418-
.constant_pool = {},
3418+
.constant_pool = {0},
34193419
.allocator = allocator,
34203420
.error = NULL,
34213421
};

src/util/rbs_constant_pool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ rbs_constant_pool_resize(rbs_constant_pool_t *pool) {
9696
}
9797

9898
// This storage is initialized by `Init_rbs_extension()` in `main.c`.
99-
static rbs_constant_pool_t RBS_GLOBAL_CONSTANT_POOL_STORAGE = {};
99+
static rbs_constant_pool_t RBS_GLOBAL_CONSTANT_POOL_STORAGE = {0};
100100
rbs_constant_pool_t *RBS_GLOBAL_CONSTANT_POOL = &RBS_GLOBAL_CONSTANT_POOL_STORAGE;
101101

102102
/**

0 commit comments

Comments
 (0)