From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52748 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq72W-0003H6-ER for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:16:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oq72N-0002P3-F3 for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:16:48 -0400 Received: from mail-qy0-f173.google.com ([209.85.216.173]:61583) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq72N-0002Oz-Bh for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:16:47 -0400 Received: by qyk5 with SMTP id 5so3092183qyk.4 for ; Mon, 30 Aug 2010 09:16:47 -0700 (PDT) Message-ID: <4C7BD96E.3010500@codemonkey.ws> Date: Mon, 30 Aug 2010 11:16:46 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1283183960-28404-1-git-send-email-Jes.Sorensen@redhat.com> <1283183960-28404-6-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1283183960-28404-6-git-send-email-Jes.Sorensen@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 05/14] Remove unused argument for check_for_block_signature() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jes.Sorensen@redhat.com Cc: kwolf@redhat.com, qemu-devel@nongnu.org On 08/30/2010 10:59 AM, Jes.Sorensen@redhat.com wrote: > From: Jes Sorensen > > Signed-off-by: Jes Sorensen > --- > block/raw.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/block/raw.c b/block/raw.c > index 61e6748..fc057d0 100644 > --- a/block/raw.c > +++ b/block/raw.c > @@ -12,7 +12,7 @@ static int raw_open(BlockDriverState *bs, int flags) > /* check for the user attempting to write something that looks like a > block format header to the beginning of the image and fail out. > */ > -static int check_for_block_signature(BlockDriverState *bs, const uint8_t *buf) > +static int check_for_block_signature(const uint8_t *buf) > This is why this type of warning sucks. Passing BlockDriverState is a matter of readability because these are roughly methods. Just because 'this' isn't used right now, doesn't mean that it should not be a method. Regards, Anthony Liguori > { > static const uint8_t signatures[][4] = { > { 'Q', 'F', 'I', 0xfb }, /* qcow/qcow2 */ > @@ -42,7 +42,7 @@ static int check_write_unsafe(BlockDriverState *bs, int64_t sector_num, > } > > if (sector_num == 0&& nb_sectors> 0) { > - return check_for_block_signature(bs, buf); > + return check_for_block_signature(buf); > } > > return 0; >