From 25a19f80a97b4b04d1ada3fdfe45671121886b6d Mon Sep 17 00:00:00 2001 From: dann frazier 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 --- 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