From: Nathan Froyd <froydnj@codesourcery.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] eliminate errors about unused results in block/vpc.c
Date: Wed, 22 Jul 2009 08:50:02 -0700 [thread overview]
Message-ID: <20090722155002.GE32566@codesourcery.com> (raw)
In-Reply-To: <4A672AAE.8020503@codemonkey.ws>
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 <froydnj@codesourcery.com>
---
block/vpc.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
[...thought format.signoff would work in all cases, but apparently not...]
diff --git a/block/vpc.c b/block/vpc.c
index ba482e9..b67e9ce 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -511,10 +511,10 @@ static int vpc_create(const char *filename, QEMUOptionParameter *options)
// Prepare the Hard Disk Footer
memset(buf, 0, 1024);
- strncpy(footer->creator, "conectix", 8);
+ (void) strncpy(footer->creator, "conectix", 8);
// TODO Check if "qemu" creator_app is ok for VPC
- strncpy(footer->creator_app, "qemu", 4);
- strncpy(footer->creator_os, "Wi2k", 4);
+ (void) strncpy(footer->creator_app, "qemu", 4);
+ (void) strncpy(footer->creator_os, "Wi2k", 4);
footer->features = be32_to_cpu(0x02);
footer->version = be32_to_cpu(0x00010000);
@@ -563,7 +563,7 @@ static int vpc_create(const char *filename, QEMUOptionParameter *options)
// Prepare the Dynamic Disk Header
memset(buf, 0, 1024);
- strncpy(dyndisk_header->magic, "cxsparse", 8);
+ (void) strncpy(dyndisk_header->magic, "cxsparse", 8);
dyndisk_header->data_offset = be64_to_cpu(0xFFFFFFFF);
dyndisk_header->table_offset = be64_to_cpu(3 * 512);
--
1.6.2.4
next prev parent reply other threads:[~2009-07-22 15:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 14:15 [Qemu-devel] [PATCH] eliminate errors about unused results in block/vpc.c Nathan Froyd
2009-07-22 15:05 ` Anthony Liguori
2009-07-22 15:50 ` Nathan Froyd [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-08-03 14:32 Nathan Froyd
2009-08-10 14:39 ` Anthony Liguori
2009-08-11 19:47 Nathan Froyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090722155002.GE32566@codesourcery.com \
--to=froydnj@codesourcery.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.