Skip to content

Commit fa95544

Browse files
authored
Remove a bunch of warnings caused by components (#1034)
Remove a bunch of warnings caused by components/libarchive and components/liblzma
1 parent c682fe6 commit fa95544

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

components/libarchive/lib/archive_write_set_format_7zip.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,13 @@ static int _7z_compression_init_encoder(struct archive_write *, unsigned,
310310
int);
311311
static int compression_init_encoder_zstd(struct archive *,
312312
struct la_zstream *, int, int);
313+
#ifdef UNUSED
313314
#if defined(HAVE_ZSTD_H)
314315
static int compression_code_zstd(struct archive *,
315316
struct la_zstream *, enum la_zaction);
316317
static int compression_end_zstd(struct archive *, struct la_zstream *);
317318
#endif
319+
#endif /* UNUSED */
318320
static int compression_code(struct archive *,
319321
struct la_zstream *, enum la_zaction);
320322
static int compression_end(struct archive *,

components/liblzma/lib/check/crc32_tablegen.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ print_crc32_table(void)
7979
}
8080

8181

82+
#ifdef UNUSED
8283
static void
8384
print_lz_table(void)
8485
{
@@ -100,6 +101,7 @@ print_lz_table(void)
100101

101102
return;
102103
}
104+
#endif /* UNUSED */
103105

104106

105107
int

components/liblzma/lib/lzma/lzma_decoder.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
#define len_decode(target, ld, pos_state, seq) \
3535
do { \
36+
[[fallthrough]]; \
3637
case seq ## _CHOICE: \
3738
rc_if_0(ld.choice, seq ## _CHOICE) { \
3839
rc_update_0(ld.choice); \
@@ -41,6 +42,7 @@ case seq ## _CHOICE: \
4142
target = MATCH_LEN_MIN; \
4243
} else { \
4344
rc_update_1(ld.choice); \
45+
[[fallthrough]]; \
4446
case seq ## _CHOICE2: \
4547
rc_if_0(ld.choice2, seq ## _CHOICE2) { \
4648
rc_update_0(ld.choice2); \
@@ -56,6 +58,7 @@ case seq ## _CHOICE2: \
5658
} \
5759
} \
5860
symbol = 1; \
61+
[[fallthrough]]; \
5962
case seq ## _BITTREE: \
6063
do { \
6164
rc_bit(probs[symbol], , , seq ## _BITTREE); \
@@ -346,6 +349,7 @@ lzma_decode(lzma_coder *restrict coder, lzma_dict *restrict dictptr,
346349
// since we already calculated it when setting up the local
347350
// variables.
348351
pos_state = dict.pos & pos_mask;
352+
[[fallthrough]];
349353

350354
case SEQ_NORMALIZE:
351355
case SEQ_IS_MATCH:
@@ -483,6 +487,7 @@ lzma_decode(lzma_coder *restrict coder, lzma_dict *restrict dictptr,
483487
// output history.
484488

485489
rc_update_1(coder->is_match[state][pos_state]);
490+
[[fallthrough]];
486491

487492
case SEQ_IS_REP:
488493
rc_if_0(coder->is_rep[state], SEQ_IS_REP) {
@@ -687,6 +692,7 @@ lzma_decode(lzma_coder *restrict coder, lzma_dict *restrict dictptr,
687692
ret = LZMA_DATA_ERROR;
688693
goto out;
689694
}
695+
[[fallthrough]];
690696

691697
case SEQ_IS_REP0:
692698
rc_if_0(coder->is_rep0[state], SEQ_IS_REP0) {
@@ -718,6 +724,7 @@ lzma_decode(lzma_coder *restrict coder, lzma_dict *restrict dictptr,
718724

719725
} else {
720726
rc_update_1(coder->is_rep0[state]);
727+
[[fallthrough]];
721728

722729
case SEQ_IS_REP1:
723730
// The distance is rep1, rep2 or rep3. Once
@@ -733,6 +740,7 @@ lzma_decode(lzma_coder *restrict coder, lzma_dict *restrict dictptr,
733740

734741
} else {
735742
rc_update_1(coder->is_rep1[state]);
743+
[[fallthrough]];
736744
case SEQ_IS_REP2:
737745
rc_if_0(coder->is_rep2[state],
738746
SEQ_IS_REP2) {
@@ -772,6 +780,7 @@ lzma_decode(lzma_coder *restrict coder, lzma_dict *restrict dictptr,
772780
// to trigger the algorithm to set len outside this range.
773781
assert(len >= MATCH_LEN_MIN);
774782
assert(len <= MATCH_LEN_MAX);
783+
[[fallthrough]];
775784

776785
case SEQ_COPY:
777786
// Repeat len bytes from distance of rep0.

components_pc/mongoose/mongoose.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
// SPDX-License-Identifier: GPL-2.0-only or commercial
1919

2020
#include "mongoose.h"
21+
#include "psa/crypto.h"
2122

2223
#ifdef MG_ENABLE_LINES
2324
#line 1 "src/base64.c"
@@ -17023,4 +17024,4 @@ static bool w5500_up(struct mg_tcpip_if *ifp) {
1702317024

1702417025
struct mg_tcpip_driver mg_tcpip_driver_w5500 = {w5500_init, w5500_tx, w5500_rx,
1702517026
w5500_up};
17026-
#endif
17027+
#endif

0 commit comments

Comments
 (0)