parted/0018-libparted-Fix-warnings-from-GCC-s-Wimplicit-fallthro.patch
DistroBaker b7125dc640 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/parted.git#633c371306f0da38c70879e948b612775032740a
2020-12-01 18:08:09 +00:00

45 lines
1.5 KiB
Diff

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