[parted-devel] [PATCH 03/24] libparted: Fix warnings from GCC's -Wimplicit-fallthrough
Brian C. Lane
bcl at redhat.com
Sat Nov 14 00:11:46 GMT 2020
From: Shin'ichiro Kawasaki <kawasaki at juno.dti.ne.jp>
Two case statements have intentional fall-throughs but do not have
comments to note it. GCC detects and warns those case statements. To
avoid the warning, add fall-through comments.
Signed-off-by: Shin'ichiro Kawasaki <kawasaki at juno.dti.ne.jp>
Signed-off-by: Brian C. Lane <bcl at redhat.com>
---
libparted/fs/amiga/amiga.c | 1 +
libparted/fs/r/hfs/reloc.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/libparted/fs/amiga/amiga.c b/libparted/fs/amiga/amiga.c
index be10dae..eb63f24 100644
--- a/libparted/fs/amiga/amiga.c
+++ b/libparted/fs/amiga/amiga.c
@@ -217,6 +217,7 @@ _amiga_read_block (PedDevice *dev, struct AmigaBlock *blk, PedSector block, stru
return NULL;
}
}
+ /* FALLTHROUGH */
case PED_EXCEPTION_IGNORE :
case PED_EXCEPTION_UNHANDLED :
default :
diff --git a/libparted/fs/r/hfs/reloc.c b/libparted/fs/r/hfs/reloc.c
index 0b8ddc1..d0477ae 100644
--- a/libparted/fs/r/hfs/reloc.c
+++ b/libparted/fs/r/hfs/reloc.c
@@ -224,6 +224,7 @@ hfs_do_move (PedFileSystem* fs, unsigned int *ptr_src,
priv_data->catalog_file
->cache[ref->ref_index].start_block =
PED_CPU_TO_BE16(new_start);
+ /* FALLTHROUGH */
case CR_BTREE_EXT_0 :
file = priv_data->extent_file;
goto CR_BTREE;
--
2.26.2
More information about the parted-devel
mailing list