parted/0018-libparted-Fix-warnings-from-GCC-s-Wimplicit-fallthro.patch

45 lines
1.5 KiB
Diff
Raw Normal View History

From 5449d1b1ee763e8ae1057fb7d18f7fbccb7a6fe0 Mon Sep 17 00:00:00 2001
From: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp>
Date: Wed, 14 Aug 2019 10:59:17 +0900
Subject: [PATCH 18/42] libparted: Fix warnings from GCC's
-Wimplicit-fallthrough
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@juno.dti.ne.jp>
Signed-off-by: Brian C. Lane <bcl@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