diff mbox series

[RFC,v3,60/78] qga: add fallthrough pseudo-keyword

Message ID e42c16ba150141c248368ab3666aae54b93bd59b.1697186560.git.manos.pitsidianakis@linaro.org
State New
Headers show
Series Strict disable implicit fallthrough | expand

Commit Message

Manos Pitsidianakis Oct. 13, 2023, 8:46 a.m. UTC
In preparation of raising -Wimplicit-fallthrough to 5, replace all
fall-through comments with the fallthrough attribute pseudo-keyword.

Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 qga/main.c                  | 2 +-
 qga/vss-win32/requester.cpp | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Konstantin Kostiuk Oct. 17, 2023, 7:48 a.m. UTC | #1
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>

On Fri, Oct 13, 2023 at 11:50 AM Emmanouil Pitsidianakis <
manos.pitsidianakis@linaro.org> wrote:

> In preparation of raising -Wimplicit-fallthrough to 5, replace all
> fall-through comments with the fallthrough attribute pseudo-keyword.
>
> Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
> ---
>  qga/main.c                  | 2 +-
>  qga/vss-win32/requester.cpp | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/qga/main.c b/qga/main.c
> index 8668b9f3d3..40471e8a0b 100644
> --- a/qga/main.c
> +++ b/qga/main.c
> @@ -663,7 +663,7 @@ static gboolean channel_event_cb(GIOCondition
> condition, gpointer data)
>          if (!s->virtio) {
>              return false;
>          }
> -        /* fall through */
> +        fallthrough;
>      case G_IO_STATUS_AGAIN:
>          /* virtio causes us to spin here when no process is attached to
>           * host-side chardev. sleep a bit to mitigate this
> diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
> index 9884c65e70..36fa4fdf28 100644
> --- a/qga/vss-win32/requester.cpp
> +++ b/qga/vss-win32/requester.cpp
> @@ -611,6 +611,7 @@ void requester_thaw(int *num_vols, void *mountpints,
> ErrorSet *errset)
>              break;
>          }
>          /* fall through if hEventTimeout is signaled */
> +        fallthrough;
>
>      case (HRESULT)VSS_E_HOLD_WRITES_TIMEOUT:
>          err_set(errset, hr, "couldn't hold writes: "
> --
> 2.39.2
>
>
diff mbox series

Patch

diff --git a/qga/main.c b/qga/main.c
index 8668b9f3d3..40471e8a0b 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -663,7 +663,7 @@  static gboolean channel_event_cb(GIOCondition condition, gpointer data)
         if (!s->virtio) {
             return false;
         }
-        /* fall through */
+        fallthrough;
     case G_IO_STATUS_AGAIN:
         /* virtio causes us to spin here when no process is attached to
          * host-side chardev. sleep a bit to mitigate this
diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
index 9884c65e70..36fa4fdf28 100644
--- a/qga/vss-win32/requester.cpp
+++ b/qga/vss-win32/requester.cpp
@@ -611,6 +611,7 @@  void requester_thaw(int *num_vols, void *mountpints, ErrorSet *errset)
             break;
         }
         /* fall through if hEventTimeout is signaled */
+        fallthrough;
 
     case (HRESULT)VSS_E_HOLD_WRITES_TIMEOUT:
         err_set(errset, hr, "couldn't hold writes: "