Skip to content

Commit 08437cf

Browse files
fix: char buf[1] = "X" → {'X'} for -Wunterminated-string-initialization on Windows/clang
Signed-off-by: Raul Acosta <raul.acosta.mmm@gmail.com>
1 parent 43558a1 commit 08437cf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tests/test_ast_profile.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ TEST(ast_profile_to_str_null) {
8888
TEST(ast_profile_to_str_small_buf) {
8989
cbm_ast_profile_t p = make_profile();
9090
/* buf too small: should write empty string */
91-
char buf[1] = "X";
91+
char buf[1] = {'X'};
9292
cbm_ast_profile_to_str(&p, buf, 0);
9393
/* 0-length buffer: function should handle gracefully */
9494
PASS();

0 commit comments

Comments
 (0)