qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] eliminate errors about unused results in block/


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] eliminate errors about unused results in block/vpc.c
Date: Mon, 10 Aug 2009 09:39:41 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Nathan Froyd wrote:
These errors come up when compiling with gcc-4.3.3 and some older headers:

/scratch/froydnj/qemu.git/block/vpc.c: In function 'vpc_create':
/scratch/froydnj/qemu.git/block/vpc.c:514: error: value computed is not used
/scratch/froydnj/qemu.git/block/vpc.c:516: error: value computed is not used
/scratch/froydnj/qemu.git/block/vpc.c:517: error: value computed is not used
/scratch/froydnj/qemu.git/block/vpc.c:566: error: value computed is not used

Just add void casts to silence the compiler.

Signed-off-by: Nathan Froyd <address@hidden>

Adding code to silence warnings is never the right approach. In this case, strncpy is the wrong function to use. We should just be using memcpy.

Regards,

Anthony Liguori




reply via email to

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