qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/2] migration: Fix incorrect integer->float conversion ca


From: Dr. David Alan Gilbert
Subject: Re: [PATCH v3 1/2] migration: Fix incorrect integer->float conversion caught by clang
Date: Mon, 20 Jan 2020 18:43:19 +0000
User-agent: Mutt/1.13.0 (2019-11-30)

* Markus Armbruster (address@hidden) wrote:
> Markus Armbruster <address@hidden> writes:
> 
> > Juan Quintela <address@hidden> writes:
> >
> >> Markus Armbruster <address@hidden> wrote:
> >>> From: Fangrui Song <address@hidden>
> >>>
> >>> Clang does not like qmp_migrate_set_downtime()'s code to clamp double
> >>> @value to 0..INT64_MAX:
> >>>
> >>>     qemu/migration/migration.c:2038:24: error: implicit conversion from 
> >>> 'long' to 'double' changes value from 9223372036854775807 to 
> >>> 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion]
> >>>
> >>> The warning will be enabled by default in clang 10. It is not
> >>> available for clang <= 9.
> >>>
> >>> The clamp is actually useless; @value is checked to be within
> >>> 0..MAX_MIGRATE_DOWNTIME_SECONDS immediately before.  Delete it.
> >>>
> >>> While there, make the conversion from double to int64_t explicit.
> >>>
> >>> Signed-off-by: Fangrui Song <address@hidden>
> >>> Reviewed-by: Markus Armbruster <address@hidden>
> >>> [Patch split, commit message improved]
> >>> Signed-off-by: Markus Armbruster <address@hidden>
> >>
> >> Reviewed-by: Juan Quintela <address@hidden>
> >>
> >> Should I get this through migration tree, or are you going to pull it?
> >
> > Plase take this patch through the migration tree.
> 
> Ping...

This looks like it went in in today's migration pull.

Dave

--
Dr. David Alan Gilbert / address@hidden / Manchester, UK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]