Skip to content

Commit dfbf8aa

Browse files
authored
Fix warning Wdefault-const-init-unsafe (#734)
1 parent c456b29 commit dfbf8aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/s2n/s2n_tls_channel_handler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,7 @@ static struct aws_channel_handler *s_new_tls_handler(
13401340
(void *)&s2n_handler->handler,
13411341
aws_string_c_str(options->alpn_list));
13421342

1343-
const char protocols_cpy[4][128];
1343+
const char protocols_cpy[4][128] = {{0}};
13441344
AWS_ZERO_ARRAY(protocols_cpy);
13451345
size_t protocols_size = 4;
13461346
if (s_parse_protocol_preferences(options->alpn_list, protocols_cpy, &protocols_size)) {
@@ -1714,7 +1714,7 @@ static struct aws_tls_ctx *s_tls_ctx_new(
17141714

17151715
if (options->alpn_list) {
17161716
AWS_LOGF_DEBUG(AWS_LS_IO_TLS, "ctx: Setting ALPN list %s", aws_string_c_str(options->alpn_list));
1717-
const char protocols_cpy[4][128];
1717+
const char protocols_cpy[4][128] = {{0}};
17181718
AWS_ZERO_ARRAY(protocols_cpy);
17191719
size_t protocols_size = 4;
17201720
if (s_parse_protocol_preferences(options->alpn_list, protocols_cpy, &protocols_size)) {

0 commit comments

Comments
 (0)