qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Nathan Froyd <froydnj@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] eliminate errors about unused results in block/vpc.c
Date: Mon, 10 Aug 2009 09:39:41 -0500	[thread overview]
Message-ID: <4A80312D.7040707@codemonkey.ws> (raw)
In-Reply-To: <1249309933-4584-1-git-send-email-froydnj@codesourcery.com>

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 <froydnj@codesourcery.com>
>   

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	other threads:[~2009-08-10 14:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-03 14:32 [Qemu-devel] [PATCH] eliminate errors about unused results in block/vpc.c Nathan Froyd
2009-08-10 14:39 ` Anthony Liguori [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-08-11 19:47 Nathan Froyd
2009-07-21 14:15 Nathan Froyd
2009-07-22 15:05 ` Anthony Liguori
2009-07-22 15:50   ` 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=4A80312D.7040707@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=froydnj@codesourcery.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).