]> git.pld-linux.org Git - packages/parted.git/blob - 0102-Fix-warnings-from-GCC-7-s-Wimplicit-fallthrough.patch
- release 6 (by relup.sh)
[packages/parted.git] / 0102-Fix-warnings-from-GCC-7-s-Wimplicit-fallthrough.patch
1 From 25a19f80a97b4b04d1ada3fdfe45671121886b6d Mon Sep 17 00:00:00 2001
2 From: dann frazier <dann.frazier@canonical.com>
3 Date: Fri, 31 Aug 2018 09:28:28 -0600
4 Subject: [PATCH 102/103] Fix warnings from GCC 7's -Wimplicit-fallthrough
5
6 All of these locations appear to have intentional fallthroughs. Add
7 comments that GCC will detect to mute warnings w/ -Wimplicit-fallthrough.
8
9 Signed-off-by: Brian C. Lane <bcl@redhat.com>
10 ---
11  libparted/arch/linux.c | 8 ++++++++
12  libparted/labels/rdb.c | 1 +
13  2 files changed, 9 insertions(+)
14
15 diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
16 index 4c778ea..02d7a52 100644
17 --- a/libparted/arch/linux.c
18 +++ b/libparted/arch/linux.c
19 @@ -961,6 +961,7 @@ init_ide (PedDevice* dev)
20  
21                          case PED_EXCEPTION_UNHANDLED:
22                                  ped_exception_catch ();
23 +                                /* FALLTHROUGH */
24                          case PED_EXCEPTION_IGNORE:
25                                  dev->model = strdup(_("Generic IDE"));
26                                  break;
27 @@ -998,6 +999,7 @@ init_ide (PedDevice* dev)
28  
29                                  case PED_EXCEPTION_UNHANDLED:
30                                          ped_exception_catch ();
31 +                                        /* FALLTHROUGH */
32                                  case PED_EXCEPTION_IGNORE:
33                                          break;
34                                  default:
35 @@ -1347,6 +1349,7 @@ init_generic (PedDevice* dev, const char* model_name)
36  
37                          case PED_EXCEPTION_UNHANDLED:
38                                  ped_exception_catch ();
39 +                                /* FALLTHROUGH */
40                          case PED_EXCEPTION_IGNORE:
41                                  break;
42                          default:
43 @@ -1890,6 +1893,7 @@ linux_read (const PedDevice* dev, void* buffer, PedSector start,
44  
45                          case PED_EXCEPTION_UNHANDLED:
46                                  ped_exception_catch ();
47 +                                /* FALLTHROUGH */
48                          case PED_EXCEPTION_CANCEL:
49                                  return 0;
50                          default:
51 @@ -1933,6 +1937,7 @@ linux_read (const PedDevice* dev, void* buffer, PedSector start,
52  
53                          case PED_EXCEPTION_UNHANDLED:
54                                  ped_exception_catch ();
55 +                                /* FALLTHROUGH */
56                          case PED_EXCEPTION_CANCEL:
57                                  free(diobuf);
58                                  return 0;
59 @@ -2032,6 +2037,7 @@ linux_write (PedDevice* dev, const void* buffer, PedSector start,
60  
61                          case PED_EXCEPTION_UNHANDLED:
62                                  ped_exception_catch ();
63 +                                /* FALLTHROUGH */
64                          case PED_EXCEPTION_CANCEL:
65                                  return 0;
66                          default:
67 @@ -2075,6 +2081,7 @@ linux_write (PedDevice* dev, const void* buffer, PedSector start,
68  
69                          case PED_EXCEPTION_UNHANDLED:
70                                  ped_exception_catch ();
71 +                                /* FALLTHROUGH */
72                          case PED_EXCEPTION_CANCEL:
73                                  free(diobuf_start);
74                                  return 0;
75 @@ -2146,6 +2153,7 @@ _do_fsync (PedDevice* dev)
76  
77                          case PED_EXCEPTION_UNHANDLED:
78                                  ped_exception_catch ();
79 +                                /* FALLTHROUGH */
80                          case PED_EXCEPTION_CANCEL:
81                                  return 0;
82                          default:
83 diff --git a/libparted/labels/rdb.c b/libparted/labels/rdb.c
84 index 34b59aa..48e8d7a 100644
85 --- a/libparted/labels/rdb.c
86 +++ b/libparted/labels/rdb.c
87 @@ -175,6 +175,7 @@ _amiga_read_block (const PedDevice *dev, struct AmigaBlock *blk,
88                                 _amiga_calculate_checksum(AMIGA(blk));
89                                 if (!ped_device_write ((PedDevice*)dev, blk, block, 1))
90                                         return NULL;
91 +                               /* FALLTHROUGH */
92                         case PED_EXCEPTION_IGNORE :
93                         case PED_EXCEPTION_UNHANDLED :
94                         default :
95 -- 
96 2.17.2
97
This page took 0.028025 seconds and 3 git commands to generate.