All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: "Richard W.M. Jones" <rjones@redhat.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] block/iscsi.c: Fix printf format error.
Date: Wed, 31 Jul 2013 21:29:06 +0200	[thread overview]
Message-ID: <51F96582.4070602@weilnetz.de> (raw)
In-Reply-To: <1375297725-11344-1-git-send-email-rjones@redhat.com>

Am 31.07.2013 21:08, schrieb Richard W.M. Jones:
> From: "Richard W.M. Jones" <rjones@redhat.com>
>
> The error on armv7hl was:
>
> block/iscsi.c: In function ‘is_request_lun_aligned’:
> block/iscsi.c:251:26: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int64_t’ [-Werror=format=]
>                           iscsilun->block_size, sector_num, nb_sectors);
>                           ^
> ---
>  block/iscsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/iscsi.c b/block/iscsi.c
> index 5f28c6a..d02b4fc 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -247,7 +247,7 @@ static bool is_request_lun_aligned(int64_t sector_num, int nb_sectors,
>  {
>      if ((sector_num * BDRV_SECTOR_SIZE) % iscsilun->block_size ||
>          (nb_sectors * BDRV_SECTOR_SIZE) % iscsilun->block_size) {
> -            error_report("iSCSI misaligned request: iscsilun->block_size %u, sector_num %ld, nb_sectors %d",
> +            error_report("iSCSI misaligned request: iscsilun->block_size %u, sector_num %" PRIi64 ", nb_sectors %d",
>                           iscsilun->block_size, sector_num, nb_sectors);
>              return 0;
>      }

Hello Richard,

the fix looks good, but the line is rather long.
It was already too long before, but should now
be split to satisfy the coding style.

Regards,
Stefan



WARNING: multiple messages have this Message-ID (diff)
From: Stefan Weil <sw@weilnetz.de>
To: "Richard W.M. Jones" <rjones@redhat.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] block/iscsi.c: Fix printf format error.
Date: Wed, 31 Jul 2013 21:29:06 +0200	[thread overview]
Message-ID: <51F96582.4070602@weilnetz.de> (raw)
In-Reply-To: <1375297725-11344-1-git-send-email-rjones@redhat.com>

Am 31.07.2013 21:08, schrieb Richard W.M. Jones:
> From: "Richard W.M. Jones" <rjones@redhat.com>
>
> The error on armv7hl was:
>
> block/iscsi.c: In function ‘is_request_lun_aligned’:
> block/iscsi.c:251:26: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int64_t’ [-Werror=format=]
>                           iscsilun->block_size, sector_num, nb_sectors);
>                           ^
> ---
>  block/iscsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/iscsi.c b/block/iscsi.c
> index 5f28c6a..d02b4fc 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -247,7 +247,7 @@ static bool is_request_lun_aligned(int64_t sector_num, int nb_sectors,
>  {
>      if ((sector_num * BDRV_SECTOR_SIZE) % iscsilun->block_size ||
>          (nb_sectors * BDRV_SECTOR_SIZE) % iscsilun->block_size) {
> -            error_report("iSCSI misaligned request: iscsilun->block_size %u, sector_num %ld, nb_sectors %d",
> +            error_report("iSCSI misaligned request: iscsilun->block_size %u, sector_num %" PRIi64 ", nb_sectors %d",
>                           iscsilun->block_size, sector_num, nb_sectors);
>              return 0;
>      }

Hello Richard,

the fix looks good, but the line is rather long.
It was already too long before, but should now
be split to satisfy the coding style.

Regards,
Stefan

  reply	other threads:[~2013-07-31 19:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-31 19:08 [Qemu-trivial] [PATCH] block/iscsi.c: Fix printf format error Richard W.M. Jones
2013-07-31 19:08 ` [Qemu-devel] " Richard W.M. Jones
2013-07-31 19:29 ` Stefan Weil [this message]
2013-07-31 19:29   ` Stefan Weil

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=51F96582.4070602@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=rjones@redhat.com \
    /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.