[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
- [Qemu-devel] [PATCH 0/6] block: Several fixes, Max Reitz, 2014/04/29
- [Qemu-devel] [PATCH 1/6] qcow2: Avoid overflow in alloc_clusters_noref(), Max Reitz, 2014/04/29
- [Qemu-devel] [PATCH 2/6] block: Use correct width in format strings, Max Reitz, 2014/04/29
- Re: [Qemu-devel] [PATCH 2/6] block: Use correct width in format strings,
Stefan Weil <=
- [Qemu-devel] [PATCH 3/6] qcow2: Catch bdrv_getlength() error, Max Reitz, 2014/04/29
- [Qemu-devel] [PATCH 4/6] qcow2: Check min_size in qcow2_grow_l1_table(), Max Reitz, 2014/04/29
- [Qemu-devel] [PATCH 5/6] block/bochs: Fix error handling for seek_to_sector(), Max Reitz, 2014/04/29
- [Qemu-devel] [PATCH 6/6] block/vdi: Error out immediately in vdi_create(), Max Reitz, 2014/04/29
- Re: [Qemu-devel] [PATCH 0/6] block: Several fixes, Kevin Wolf, 2014/04/30