On Di, 2015-06-23 at 09:53 +0800, arei.gong...@huawei.com wrote:
> static uint64_t qdev_get_prop_mask64(Property *prop)
> {
> assert(prop->info == &qdev_prop_bit);
> -return 0x1 << prop->bitnr;
> +return 0x1ull << prop->bitnr;
> }
Reviewed-by: Gerd Hoffmann
writes:
> From: Gonglei
>
> Potentially overflowing expression "1 << prop->bitnr" with
> type "int" (32 bits, signed) is evaluated using 32-bit arithmetic,
> and then used in a context that expects an expression of type
> "uint64_t" (64 bits, unsigned).
>
> Cc: Gerd Hoffmann
> Signed-off-by: Pa
From: Gonglei
Potentially overflowing expression "1 << prop->bitnr" with
type "int" (32 bits, signed) is evaluated using 32-bit arithmetic,
and then used in a context that expects an expression of type
"uint64_t" (64 bits, unsigned).
Cc: Gerd Hoffmann
Signed-off-by: Paolo Bonzini
Signed-off-by