mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shuah Khan <shuah@kernel.org>
To: Andrea Parri <andrea.parri@amarulasolutions.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH] selftests: kvm: Fix -Wformat warnings
Date: Tue, 16 Oct 2018 08:50:28 -0600	[thread overview]
Message-ID: <2af4a102-f7ef-29bf-15a5-4b355e6d9be0@kernel.org> (raw)
In-Reply-To: <20181016141346.19922-1-andrea.parri@amarulasolutions.com>

On 10/16/2018 08:13 AM, Andrea Parri wrote:
> Fixes the following warnings:
> 
> dirty_log_test.c: In function ‘help’:
> dirty_log_test.c:216:9: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘int’ [-Wformat=]
>   printf(" -i: specify iteration counts (default: %"PRIu64")\n",
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from include/test_util.h:18:0,
>                  from dirty_log_test.c:16:
> /usr/include/inttypes.h:105:34: note: format string is defined here
>  # define PRIu64  __PRI64_PREFIX "u"
> dirty_log_test.c:218:9: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘int’ [-Wformat=]
>   printf(" -I: specify interval in ms (default: %"PRIu64" ms)\n",
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from include/test_util.h:18:0,
>                  from dirty_log_test.c:16:
> /usr/include/inttypes.h:105:34: note: format string is defined here
>  # define PRIu64  __PRI64_PREFIX "u"
> 
> Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com>
> ---
>  tools/testing/selftests/kvm/dirty_log_test.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/kvm/dirty_log_test.c b/tools/testing/selftests/kvm/dirty_log_test.c
> index 0c2cdc105f968..a9c4b5e21d7e7 100644
> --- a/tools/testing/selftests/kvm/dirty_log_test.c
> +++ b/tools/testing/selftests/kvm/dirty_log_test.c
> @@ -31,9 +31,9 @@
>  /* How many pages to dirty for each guest loop */
>  #define  TEST_PAGES_PER_LOOP            1024
>  /* How many host loops to run (one KVM_GET_DIRTY_LOG for each loop) */
> -#define  TEST_HOST_LOOP_N               32
> +#define  TEST_HOST_LOOP_N               32UL
>  /* Interval for each host loop (ms) */
> -#define  TEST_HOST_LOOP_INTERVAL        10
> +#define  TEST_HOST_LOOP_INTERVAL        10UL
>  
>  /*
>   * Guest variables.  We use these variables to share data between host
> 

Thanks for the patch. Applied to linux-kselftest next for 4.20-rc1

thanks,
-- Shuah

      reply	other threads:[~2018-10-16 14:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-16 14:13 Andrea Parri
2018-10-16 14:50 ` Shuah Khan [this message]

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=2af4a102-f7ef-29bf-15a5-4b355e6d9be0@kernel.org \
    --to=shuah@kernel.org \
    --cc=andrea.parri@amarulasolutions.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=pbonzini@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®