qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Jes.Sorensen@redhat.com
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 05/14] Remove unused argument for check_for_block_signature()
Date: Mon, 30 Aug 2010 11:16:46 -0500	[thread overview]
Message-ID: <4C7BD96E.3010500@codemonkey.ws> (raw)
In-Reply-To: <1283183960-28404-6-git-send-email-Jes.Sorensen@redhat.com>

On 08/30/2010 10:59 AM, Jes.Sorensen@redhat.com wrote:
> From: Jes Sorensen<Jes.Sorensen@redhat.com>
>
> Signed-off-by: Jes Sorensen<Jes.Sorensen@redhat.com>
> ---
>   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;
>    

  reply	other threads:[~2010-08-30 16:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-30 15:59 [Qemu-devel] [PATCH 00/14] gcc extra warning fixes v2 Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 01/14] Remove unused argument for nbd_client() Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 02/14] Respect return value from nbd_client() Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 03/14] Fix repeated typo: was "end if list" instead of "end of list" Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 04/14] Zero initialize timespec struct explicitly Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 05/14] Remove unused argument for check_for_block_signature() Jes.Sorensen
2010-08-30 16:16   ` Anthony Liguori [this message]
2010-08-30 16:40     ` [Qemu-devel] " Paolo Bonzini
2010-08-30 18:19       ` Jes Sorensen
2010-08-30 18:27         ` Anthony Liguori
2010-08-30 19:24           ` Richard Henderson
2010-08-31  7:13           ` Jes Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 06/14] Remove unused argument for encrypt_sectors() Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 07/14] Remove unused argument for get_whole_cluster() Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 08/14] Remove unused argument for qcow2_encrypt_sectors() Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 09/14] Remove unused arguments for add_aio_request() and free_aio_req() Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 11/14] Remove unused function arguments Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 12/14] size_t is unsigned, change to ssize_t to handle errors from tight_compress_data() Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 13/14] Change DPRINTF() to do{}while(0) to avoid compiler warning Jes.Sorensen
2010-08-30 15:59 ` [Qemu-devel] [PATCH 14/14] load_multiboot(): get_image_size() returns int Jes.Sorensen
2010-08-31  7:48 ` [Qemu-devel] Re: [PATCH 00/14] gcc extra warning fixes v2 Kevin Wolf

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=4C7BD96E.3010500@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=Jes.Sorensen@redhat.com \
    --cc=kwolf@redhat.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).