From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MaW2S-00058y-UG for qemu-devel@nongnu.org; Mon, 10 Aug 2009 10:39:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MaW2M-000575-UX for qemu-devel@nongnu.org; Mon, 10 Aug 2009 10:39:51 -0400 Received: from [199.232.76.173] (port=49107 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaW2L-00056q-LR for qemu-devel@nongnu.org; Mon, 10 Aug 2009 10:39:46 -0400 Received: from mail-yx0-f188.google.com ([209.85.210.188]:59600) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MaW2L-0006CJ-9b for qemu-devel@nongnu.org; Mon, 10 Aug 2009 10:39:45 -0400 Received: by yxe26 with SMTP id 26so3905553yxe.4 for ; Mon, 10 Aug 2009 07:39:44 -0700 (PDT) Message-ID: <4A80312D.7040707@codemonkey.ws> Date: Mon, 10 Aug 2009 09:39:41 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] eliminate errors about unused results in block/vpc.c References: <1249309933-4584-1-git-send-email-froydnj@codesourcery.com> In-Reply-To: <1249309933-4584-1-git-send-email-froydnj@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nathan Froyd Cc: qemu-devel@nongnu.org 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 > 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