qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] [PATCH v2] block/iscsi.c: Fix printf for


From: Andreas Färber
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH v2] block/iscsi.c: Fix printf format error.
Date: Wed, 31 Jul 2013 21:59:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7

Am 31.07.2013 21:41, schrieb Richard W.M. Jones:
> From: "Richard W.M. Jones" <address@hidden>
> 
> 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 <address@hidden>
> ---
>  block/iscsi.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/block/iscsi.c b/block/iscsi.c
> index 5f28c6a..03a1c0a 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",

Tab-damaged now. ;) scripts/checkpatch.pl complains about both issues -
can be used as commit hook for convenience.

Cheers,
Andreas

>                           iscsilun->block_size, sector_num, nb_sectors);
>              return 0;
>      }
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]