From ccea7a0df27d671f6db755ea89695df5df1006b6 Mon Sep 17 00:00:00 2001 From: tobhe Date: Thu, 20 Jul 2017 10:10:24 +0200 Subject: [PATCH] pkg/heatshrink: fix fallthrough warnings --- ...1-Fixed-fallthrough-compiler-warning.patch | 24 +++++++++++++++++++ .../0002-Fixed-fallthrough-in-getopt-h.patch | 24 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 pkg/heatshrink/patches/0001-Fixed-fallthrough-compiler-warning.patch create mode 100644 pkg/heatshrink/patches/0002-Fixed-fallthrough-in-getopt-h.patch diff --git a/pkg/heatshrink/patches/0001-Fixed-fallthrough-compiler-warning.patch b/pkg/heatshrink/patches/0001-Fixed-fallthrough-compiler-warning.patch new file mode 100644 index 0000000000..7ee9037958 --- /dev/null +++ b/pkg/heatshrink/patches/0001-Fixed-fallthrough-compiler-warning.patch @@ -0,0 +1,24 @@ +From d48f439824ecc17b3fd9cc1d9b8cbea7b00a5b0c Mon Sep 17 00:00:00 2001 +From: tobhe +Date: Wed, 19 Jul 2017 13:11:05 +0200 +Subject: [PATCH 1/2] Fixed fallthrough compiler warning + +--- + heatshrink_encoder.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/heatshrink_encoder.c b/heatshrink_encoder.c +index edf4abe..602e177 100644 +--- a/heatshrink_encoder.c ++++ b/heatshrink_encoder.c +@@ -235,6 +235,7 @@ HSE_poll_res heatshrink_encoder_poll(heatshrink_encoder *hse, + break; + case HSES_FLUSH_BITS: + hse->state = st_flush_bit_buffer(hse, &oi); ++ return HSER_POLL_EMPTY; + case HSES_DONE: + return HSER_POLL_EMPTY; + default: +-- +2.13.3 + diff --git a/pkg/heatshrink/patches/0002-Fixed-fallthrough-in-getopt-h.patch b/pkg/heatshrink/patches/0002-Fixed-fallthrough-in-getopt-h.patch new file mode 100644 index 0000000000..1a5a1f9cec --- /dev/null +++ b/pkg/heatshrink/patches/0002-Fixed-fallthrough-in-getopt-h.patch @@ -0,0 +1,24 @@ +From 0cdd305bdae80c9ee9a170e5a3de2853b1fb0a42 Mon Sep 17 00:00:00 2001 +From: tobhe +Date: Wed, 19 Jul 2017 13:18:54 +0200 +Subject: [PATCH 2/2] Fixed fallthrough in getopt 'h' + +--- + heatshrink.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/heatshrink.c b/heatshrink.c +index 8c3ec5b..a4b675a 100755 +--- a/heatshrink.c ++++ b/heatshrink.c +@@ -409,6 +409,7 @@ static void proc_args(config *cfg, int argc, char **argv) { + switch (a) { + case 'h': /* help */ + usage(); ++ break; + case 'e': /* encode */ + cfg->cmd = OP_ENC; break; + case 'd': /* decode */ +-- +2.13.3 +