qobject_to() drops const-ness by accident, but our function arguments (x, y) are const. Make num_x/num_y const too.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- This is a new patch added in v3 of the series. --- qobject/qnum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qobject/qnum.c b/qobject/qnum.c index d328d91fcb..e5ea728638 100644 --- a/qobject/qnum.c +++ b/qobject/qnum.c @@ -209,8 +209,8 @@ char *qnum_to_string(QNum *qn) */ bool qnum_is_equal(const QObject *x, const QObject *y) { - QNum *num_x = qobject_to(QNum, x); - QNum *num_y = qobject_to(QNum, y); + const QNum *num_x = qobject_to(QNum, x); + const QNum *num_y = qobject_to(QNum, y); switch (num_x->kind) { case QNUM_I64: -- 2.28.0