parted/0102-Fix-warnings-from-GCC-7-s-Wimplicit-fallthrough.patch
Brian C. Lane 8f615e462d - Read NVMe model names from sysfs (dann.frazier)
- Fix warnings from GCC 7's -Wimplicit-fallthrough (dann.frazier)
- ped_unit_get_name: Resolve conflicting attributes 'const' and 'pure' (dann.frazier)
- Add udf to t1700-probe-fs and to the manpage (bcl)
- libparted: Add support for MBR id, GPT GUID and detection of UDF filesystem (pali.rohar)
- Fix potential command line buffer overflow (xu.simon)
- t6100-mdraid-partitions: Use v0.90 metadata for the test (bcl)
- parted.c: Make sure dev_name is freed (bcl)
- parted.c: Always free peek_word (bcl)
- Fix the length of several strncpy calls (bcl)
2018-10-16 15:38:03 -07:00

98 lines
4.1 KiB
Diff

From 25a19f80a97b4b04d1ada3fdfe45671121886b6d Mon Sep 17 00:00:00 2001
From: dann frazier <dann.frazier@canonical.com>
Date: Fri, 31 Aug 2018 09:28:28 -0600
Subject: [PATCH 102/103] Fix warnings from GCC 7's -Wimplicit-fallthrough
All of these locations appear to have intentional fallthroughs. Add
comments that GCC will detect to mute warnings w/ -Wimplicit-fallthrough.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
---
libparted/arch/linux.c | 8 ++++++++
libparted/labels/rdb.c | 1 +
2 files changed, 9 insertions(+)
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 4c778ea..02d7a52 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -961,6 +961,7 @@ init_ide (PedDevice* dev)
case PED_EXCEPTION_UNHANDLED:
ped_exception_catch ();
+ /* FALLTHROUGH */
case PED_EXCEPTION_IGNORE:
dev->model = strdup(_("Generic IDE"));
break;
@@ -998,6 +999,7 @@ init_ide (PedDevice* dev)
case PED_EXCEPTION_UNHANDLED:
ped_exception_catch ();
+ /* FALLTHROUGH */
case PED_EXCEPTION_IGNORE:
break;
default:
@@ -1347,6 +1349,7 @@ init_generic (PedDevice* dev, const char* model_name)
case PED_EXCEPTION_UNHANDLED:
ped_exception_catch ();
+ /* FALLTHROUGH */
case PED_EXCEPTION_IGNORE:
break;
default:
@@ -1890,6 +1893,7 @@ linux_read (const PedDevice* dev, void* buffer, PedSector start,
case PED_EXCEPTION_UNHANDLED:
ped_exception_catch ();
+ /* FALLTHROUGH */
case PED_EXCEPTION_CANCEL:
return 0;
default:
@@ -1933,6 +1937,7 @@ linux_read (const PedDevice* dev, void* buffer, PedSector start,
case PED_EXCEPTION_UNHANDLED:
ped_exception_catch ();
+ /* FALLTHROUGH */
case PED_EXCEPTION_CANCEL:
free(diobuf);
return 0;
@@ -2032,6 +2037,7 @@ linux_write (PedDevice* dev, const void* buffer, PedSector start,
case PED_EXCEPTION_UNHANDLED:
ped_exception_catch ();
+ /* FALLTHROUGH */
case PED_EXCEPTION_CANCEL:
return 0;
default:
@@ -2075,6 +2081,7 @@ linux_write (PedDevice* dev, const void* buffer, PedSector start,
case PED_EXCEPTION_UNHANDLED:
ped_exception_catch ();
+ /* FALLTHROUGH */
case PED_EXCEPTION_CANCEL:
free(diobuf_start);
return 0;
@@ -2146,6 +2153,7 @@ _do_fsync (PedDevice* dev)
case PED_EXCEPTION_UNHANDLED:
ped_exception_catch ();
+ /* FALLTHROUGH */
case PED_EXCEPTION_CANCEL:
return 0;
default:
diff --git a/libparted/labels/rdb.c b/libparted/labels/rdb.c
index 34b59aa..48e8d7a 100644
--- a/libparted/labels/rdb.c
+++ b/libparted/labels/rdb.c
@@ -175,6 +175,7 @@ _amiga_read_block (const PedDevice *dev, struct AmigaBlock *blk,
_amiga_calculate_checksum(AMIGA(blk));
if (!ped_device_write ((PedDevice*)dev, blk, block, 1))
return NULL;
+ /* FALLTHROUGH */
case PED_EXCEPTION_IGNORE :
case PED_EXCEPTION_UNHANDLED :
default :
--
2.17.2