qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/6] block: Use correct width in format strings


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH 2/6] block: Use correct width in format strings
Date: Tue, 29 Apr 2014 19:43:19 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

Am 29.04.2014 19:03, schrieb Max Reitz:
> Instead of blindly relying on a normal integer having a width of 32 bits
> (which is a pretty good assumption, but we should not rely on it if
> there is no need), use the correct format string macros.
> 

The old code would only fail on platforms with sizeof(int) < 32. I doubt
that QEMU will ever run on a platform with 16 bit integers.

Platforms with larger integers are not a problem because the compiler
must expand any smaller argument to integer size in variable argument
lists. Therefore, this patch is not strictly necessary.

Technically, the modifications for vdi.c are okay, but I'd terminate
the format string on the same line, not on the following line (that
looks a little bit strange IMHO).

Stefan





reply via email to

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