[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #50598] GCC7: -Werror=implicit-fallthrough
From: |
Martin Liška |
Subject: |
[bug #50598] GCC7: -Werror=implicit-fallthrough |
Date: |
Mon, 20 Mar 2017 10:21:39 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.59 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?50598>
Summary: GCC7: -Werror=implicit-fallthrough
Project: GNU GRUB
Submitted by: marxin
Submitted on: Mon 20 Mar 2017 02:21:38 PM UTC
Category: None
Severity: Major
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release:
Release: Git master
Reproducibility: None
Planned Release: None
_______________________________________________________
Details:
Following issues are seen by GCC7:
1)
util/getroot.c: In function ‘grub_util_pull_device’:
util/getroot.c:101:7: error: this statement may fall through
[-Werror=implicit-fallthrough=]
grub_util_pull_lvm_by_command (os_dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
util/getroot.c:103:5: note: here
case GRUB_DEV_ABSTRACTION_LUKS:
^~~~
Can be fixed by:
diff --git a/util/getroot.c b/util/getroot.c
index 92c0d709b..41bed6131 100644
--- a/util/getroot.c
+++ b/util/getroot.c
@@ -99,7 +99,7 @@ grub_util_pull_device (const char *os_dev)
{
case GRUB_DEV_ABSTRACTION_LVM:
grub_util_pull_lvm_by_command (os_dev);
- /* Fallthrough in case that lvm-tools are unavailable. */
+ /* Fallthrough- in case that lvm-tools are unavailable. */
case GRUB_DEV_ABSTRACTION_LUKS:
grub_util_pull_devmapper (os_dev);
return;
2)
grub-core/lib/xzembed/xz_dec_lzma2.c: In function ‘xz_dec_lzma2_run’:
grub-core/lib/xzembed/xz_dec_lzma2.c:1045:22: error: this statement may fall
through [-Werror=implicit-fallthrough=]
s->lzma2.sequence = SEQ_LZMA_PREPARE;
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
grub-core/lib/xzembed/xz_dec_lzma2.c:1047:3: note: here
case SEQ_LZMA_PREPARE:
^~~~
grub-core/lib/xzembed/xz_dec_lzma2.c:1055:22: error: this statement may fall
through [-Werror=implicit-fallthrough=]
s->lzma2.sequence = SEQ_LZMA_RUN;
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
grub-core/lib/xzembed/xz_dec_lzma2.c:1057:3: note: here
case SEQ_LZMA_RUN:
^~~~
3) grub-core/lib/xzembed/xz_dec_stream.c: In function ‘dec_main’:
grub-core/lib/xzembed/xz_dec_stream.c:751:16: error: this statement may fall
through [-Werror=implicit-fallthrough=]
s->sequence = SEQ_BLOCK_START;
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
grub-core/lib/xzembed/xz_dec_stream.c:753:3: note: here
case SEQ_BLOCK_START:
^~~~
grub-core/lib/xzembed/xz_dec_stream.c:774:16: error: this statement may fall
through [-Werror=implicit-fallthrough=]
s->sequence = SEQ_BLOCK_HEADER;
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
grub-core/lib/xzembed/xz_dec_stream.c:776:3: note: here
case SEQ_BLOCK_HEADER:
^~~~
grub-core/lib/xzembed/xz_dec_stream.c:784:16: error: this statement may fall
through [-Werror=implicit-fallthrough=]
s->sequence = SEQ_BLOCK_UNCOMPRESS;
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
grub-core/lib/xzembed/xz_dec_stream.c:786:3: note: here
case SEQ_BLOCK_UNCOMPRESS:
^~~~
grub-core/lib/xzembed/xz_dec_stream.c:811:16: error: this statement may fall
through [-Werror=implicit-fallthrough=]
s->sequence = SEQ_BLOCK_CHECK;
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
grub-core/lib/xzembed/xz_dec_stream.c:813:3: note: here
case SEQ_BLOCK_CHECK:
^~~~
grub-core/lib/xzembed/xz_dec_stream.c:859:16: error: this statement may fall
through [-Werror=implicit-fallthrough=]
s->sequence = SEQ_INDEX_CRC32;
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
grub-core/lib/xzembed/xz_dec_stream.c:861:3: note: here
case SEQ_INDEX_CRC32:
^~~~
grub-core/lib/xzembed/xz_dec_stream.c:867:16: error: this statement may fall
through [-Werror=implicit-fallthrough=]
s->sequence = SEQ_STREAM_FOOTER;
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
grub-core/lib/xzembed/xz_dec_stream.c:869:3: note: here
case SEQ_STREAM_FOOTER:
^~~~
4) util/grub-mkimagexx.c:899:5: error: this statement may fall through
[-Werror=implicit-fallthrough=]
{
^
util/grub-mkimagexx.c:910:3: note: here
case R_IA64_LTOFF_FPTR22:
^~~~
And maybe other locations.
Thanks
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50598>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #50598] GCC7: -Werror=implicit-fallthrough,
Martin Liška <=