Re: [PATCH] qemu: fix some warnings

Carlo Marcelo Arenas Belon
2008-01-21T14:22:59Z

On Mon, Jan 21, 2008 at 01:46:11PM +0100, Jan Kiszka wrote:
> Here are 4 more warnings fixes (actually, I should sent 2 of them to
> qemu...). Nothing critical, just less noise during compilation.

probably a good idea having them in independent patches as they are unrelated
(other by the fact that they are all warnings in current git).

> Index: b/qemu/vl.c
> ===================================================================
> --- a/qemu/vl.c
> +++ b/qemu/vl.c
> @@ -8862,7 +8862,7 @@ int main(int argc, char **argv)
> if (ram_size <= 0)
> help(1);
> if (ram_size > PHYS_RAM_MAX_SIZE) {
> - fprintf(stderr, "qemu: at most %d MB RAM can be simulated\n",
> + fprintf(stderr, "qemu: at most %llu MB RAM can be simulated\n",
> PHYS_RAM_MAX_SIZE / (1024 * 1024));

using TARGET_FMT_lu instead of "%llu" would seem more appropriate here because
this is meant to reflect a physical memory address, but then the fact that kvm
is using the x64_64 target also for 32 bit will mean that the definition of
PHYS_RAM_MAX_SIZE has to be made somehow also HOST specific.

for my take on that (which will need to be updated with your version of the
exec.c changes and re-tested) look at :

http://tapir.sajinet.com.pe/gentoo/portage/app-emulation/kvm/files/kvm-51-qemu-ramaddr.patch

Carlo