Skip to content

Commit 0e1681a

Browse files
committed
Minor bug fixes and silencing false positive warnings
1 parent 3e5b814 commit 0e1681a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/AST/ast_layout.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,9 @@ void ast_layout_endpoint_init(ast_layout_endpoint_t *endpoint){
405405
successful_t ast_layout_endpoint_init_with(ast_layout_endpoint_t *endpoint, uint16_t *indices, length_t length){
406406
if(length > AST_LAYOUT_MAX_DEPTH) return false;
407407

408+
// Silence warnings about copying uninitialized data
409+
memset(endpoint->indices, 0, sizeof(uint16_t) * AST_LAYOUT_MAX_DEPTH);
410+
408411
// Set end index, so we can determine the length of this endpoint's indices
409412
if(length != AST_LAYOUT_MAX_DEPTH) endpoint->indices[length] = AST_LAYOUT_ENDPOINT_END_INDEX;
410413

0 commit comments

Comments
 (0)