[PATCH 21/39] migration: replace assert(false) with g_assert_not_reached()

Pierrick Bouvier posted 39 patches 2 months, 2 weeks ago
There is a newer version of this series
[PATCH 21/39] migration: replace assert(false) with g_assert_not_reached()
Posted by Pierrick Bouvier 2 months, 2 weeks ago
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 migration/dirtyrate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c
index 1d9db812990..a28c07327e8 100644
--- a/migration/dirtyrate.c
+++ b/migration/dirtyrate.c
@@ -228,7 +228,7 @@ static int time_unit_to_power(TimeUnit time_unit)
     case TIME_UNIT_MILLISECOND:
         return -3;
     default:
-        assert(false); /* unreachable */
+        g_assert_not_reached(); /* unreachable */
         return 0;
     }
 }
-- 
2.39.2
Re: [PATCH 21/39] migration: replace assert(false) with g_assert_not_reached()
Posted by Peter Xu 2 months, 1 week ago
On Tue, Sep 10, 2024 at 03:15:48PM -0700, Pierrick Bouvier wrote:
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>

Reviewed-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu
Re: [PATCH 21/39] migration: replace assert(false) with g_assert_not_reached()
Posted by Richard Henderson 2 months, 2 weeks ago
On 9/10/24 15:15, Pierrick Bouvier wrote:
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   migration/dirtyrate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c
> index 1d9db812990..a28c07327e8 100644
> --- a/migration/dirtyrate.c
> +++ b/migration/dirtyrate.c
> @@ -228,7 +228,7 @@ static int time_unit_to_power(TimeUnit time_unit)
>       case TIME_UNIT_MILLISECOND:
>           return -3;
>       default:
> -        assert(false); /* unreachable */
> +        g_assert_not_reached(); /* unreachable */
>           return 0;
>       }
>   }

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Re: [PATCH 21/39] migration: replace assert(false) with g_assert_not_reached()
Posted by Richard Henderson 2 months, 2 weeks ago
On 9/10/24 15:15, Pierrick Bouvier wrote:
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   migration/dirtyrate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c
> index 1d9db812990..a28c07327e8 100644
> --- a/migration/dirtyrate.c
> +++ b/migration/dirtyrate.c
> @@ -228,7 +228,7 @@ static int time_unit_to_power(TimeUnit time_unit)
>       case TIME_UNIT_MILLISECOND:
>           return -3;
>       default:
> -        assert(false); /* unreachable */
> +        g_assert_not_reached(); /* unreachable */
>           return 0;
>       }
>   }

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Re: [PATCH 21/39] migration: replace assert(false) with g_assert_not_reached()
Posted by Fabiano Rosas 2 months, 2 weeks ago
Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:

> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>  migration/dirtyrate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c
> index 1d9db812990..a28c07327e8 100644
> --- a/migration/dirtyrate.c
> +++ b/migration/dirtyrate.c
> @@ -228,7 +228,7 @@ static int time_unit_to_power(TimeUnit time_unit)
>      case TIME_UNIT_MILLISECOND:
>          return -3;
>      default:
> -        assert(false); /* unreachable */
> +        g_assert_not_reached(); /* unreachable */
>          return 0;
>      }
>  }

You could drop the comment that's now redundant.

Reviewed-by: Fabiano Rosas <farosas@suse.de>