mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
qobject: replace assert(0) with g_assert_not_reached()
This patch is part of a series that moves towards a consistent use of g_assert_not_reached() rather than an ad hoc mix of different assertion mechanisms. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-ID: <20240919044641.386068-6-pierrick.bouvier@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
0c79effdc7
commit
890000dd3b
2 changed files with 5 additions and 5 deletions
|
@ -85,7 +85,7 @@ bool qnum_get_try_int(const QNum *qn, int64_t *val)
|
|||
return false;
|
||||
}
|
||||
|
||||
assert(0);
|
||||
g_assert_not_reached();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ bool qnum_get_try_uint(const QNum *qn, uint64_t *val)
|
|||
return false;
|
||||
}
|
||||
|
||||
assert(0);
|
||||
g_assert_not_reached();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ double qnum_get_double(QNum *qn)
|
|||
return qn->u.dbl;
|
||||
}
|
||||
|
||||
assert(0);
|
||||
g_assert_not_reached();
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ char *qnum_to_string(QNum *qn)
|
|||
return g_strdup_printf("%.17g", qn->u.dbl);
|
||||
}
|
||||
|
||||
assert(0);
|
||||
g_assert_not_reached();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue