Skip to content

Commit

Permalink
ch_init(): Add braces to appease older clang compilers
Browse files Browse the repository at this point in the history
They produce a warning `suggest braces around initialization of subobject`
otherwise.

Add -Wno-missing-braces to silence old clang compilers

And drop unnecessary braces in zeroing initializers.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #21823)
  • Loading branch information
t8m authored and hlandau committed Aug 25, 2023
1 parent 5ad3cc1 commit d848520
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Configure
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ my @clang_devteam_warn = qw(
-Wno-parentheses-equality
-Wno-language-extension-token
-Wno-extended-offsetof
-Wno-missing-braces
-Wconditional-uninitialized
-Wincompatible-pointer-types-discards-qualifiers
-Wmissing-variable-declarations
Expand Down
4 changes: 2 additions & 2 deletions ssl/quic/quic_ackm.c
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ static void ackm_on_pkts_lost(OSSL_ACKM *ackm, int pkt_space,
const OSSL_ACKM_TX_PKT *p, *pnext;
OSSL_RTT_INFO rtt;
QUIC_PN largest_pn_lost = 0;
OSSL_CC_LOSS_INFO loss_info = {{0}};
OSSL_CC_LOSS_INFO loss_info = {0};
uint32_t flags = 0;

for (p = lpkt; p != NULL; p = pnext) {
Expand Down Expand Up @@ -984,7 +984,7 @@ static void ackm_on_pkts_acked(OSSL_ACKM *ackm, const OSSL_ACKM_TX_PKT *apkt)
{
const OSSL_ACKM_TX_PKT *anext;
QUIC_PN last_pn_acked = 0;
OSSL_CC_ACK_INFO ainfo = {{0}};
OSSL_CC_ACK_INFO ainfo = {0};

for (; apkt != NULL; apkt = anext) {
if (apkt->is_inflight) {
Expand Down

0 comments on commit d848520

Please sign in to comment.