qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3] block/iscsi.c: Fix printf format error.
@ 2013-07-31 21:20 Richard W.M. Jones
  2013-08-01  4:32 ` Stefan Weil
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Richard W.M. Jones @ 2013-07-31 21:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, sw, afaerber

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);
                          ^

This also splits the long line to comply with qemu coding guidelines.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
---
 block/iscsi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/block/iscsi.c b/block/iscsi.c
index 5f28c6a..e7c1c2b 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -247,7 +247,9 @@ 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;
     }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v3] block/iscsi.c: Fix printf format error.
  2013-07-31 21:20 [Qemu-devel] [PATCH v3] block/iscsi.c: Fix printf format error Richard W.M. Jones
@ 2013-08-01  4:32 ` Stefan Weil
  2013-08-01  9:42 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
  2013-08-02 14:07 ` Michael Tokarev
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Weil @ 2013-08-01  4:32 UTC (permalink / raw)
  To: Richard W.M. Jones; +Cc: qemu-trivial, qemu-devel, afaerber

Am 31.07.2013 23:20, 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);
>                           ^
>
> This also splits the long line to comply with qemu coding guidelines.
>
> Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
> ---
>  block/iscsi.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/block/iscsi.c b/block/iscsi.c
> index 5f28c6a..e7c1c2b 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -247,7 +247,9 @@ 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;
>      }

Reviewed-by: Stefan Weil <sw@weilnetz.de>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH v3] block/iscsi.c: Fix printf format error.
  2013-07-31 21:20 [Qemu-devel] [PATCH v3] block/iscsi.c: Fix printf format error Richard W.M. Jones
  2013-08-01  4:32 ` Stefan Weil
@ 2013-08-01  9:42 ` Stefan Hajnoczi
  2013-08-02 14:07 ` Michael Tokarev
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2013-08-01  9:42 UTC (permalink / raw)
  To: Richard W.M. Jones; +Cc: qemu-trivial, sw, qemu-devel, afaerber

On Wed, Jul 31, 2013 at 10:20:26PM +0100, Richard W.M. Jones wrote:
> 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);
>                           ^
> 
> This also splits the long line to comply with qemu coding guidelines.
> 
> Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
> ---
>  block/iscsi.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH v3] block/iscsi.c: Fix printf format error.
  2013-07-31 21:20 [Qemu-devel] [PATCH v3] block/iscsi.c: Fix printf format error Richard W.M. Jones
  2013-08-01  4:32 ` Stefan Weil
  2013-08-01  9:42 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
@ 2013-08-02 14:07 ` Michael Tokarev
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2013-08-02 14:07 UTC (permalink / raw)
  To: Richard W.M. Jones; +Cc: qemu-trivial, sw, qemu-devel, afaerber

Thanks, applied to the trivial patches queue.

/mjt

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-02 14:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-31 21:20 [Qemu-devel] [PATCH v3] block/iscsi.c: Fix printf format error Richard W.M. Jones
2013-08-01  4:32 ` Stefan Weil
2013-08-01  9:42 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2013-08-02 14:07 ` Michael Tokarev

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).