From patchwork Tue Oct 16 14:13:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrea Parri X-Patchwork-Id: 10643595 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3C8A413AD for ; Tue, 16 Oct 2018 14:14:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B0BB28675 for ; Tue, 16 Oct 2018 14:14:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1ED2329B4E; Tue, 16 Oct 2018 14:14:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A67728675 for ; Tue, 16 Oct 2018 14:14:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726778AbeJPWEx (ORCPT ); Tue, 16 Oct 2018 18:04:53 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:40406 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726986AbeJPWEw (ORCPT ); Tue, 16 Oct 2018 18:04:52 -0400 Received: by mail-ed1-f65.google.com with SMTP id r1-v6so21490674edd.7 for ; Tue, 16 Oct 2018 07:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BHN27KQ6yFIIIp4s95TmyBuNYCs1hvD4Fo3NP2Yl0is=; b=kMGR1b8Fxlvc7enhCQ/ZHnBJPbK/M8h3xzyGa8WGq4qvKravHybg+Zq85hZBUS337o phUMikrLJ0J7G504gp7s06zjygPqsFqDVg2CyN53e2ijxUidvc88wlLTZ7zJkJSWA95C 2tr0Jp9JKSdEFvTzYfniIKROgny50tYfv+W58= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BHN27KQ6yFIIIp4s95TmyBuNYCs1hvD4Fo3NP2Yl0is=; b=iG/QUBMVCo3WozimvrrQ8SpH2PVe4uKQvxNMIcGnPL4SM3/Umu1RLThrOD28WwGj0L rZ3RHhnY1q7iZpZYvVBbF4Tg+UOI9gnvXKfrxd0KGPTK+frDeB/Bq/l0OYQ+K94bKPZd b+4sx7Kx2E3UJRJORjhxivPTA2Nb1XXmKuT/pA9Ze5cETdoSlF5794qD4TjpDcZKqsQ8 13vQpDVjbMmFDXgq9BGYVWuCAHWJ9CgdtRmIpdlJzBTok3lPd7WvfxBurcYVOn2cMPNF OitE1RQ4/w27G7eUcdPziypmFBs7ZHnOLvM5/TYXKgybVd4VGaCrrCZAa8G0AGNlJndC lFqQ== X-Gm-Message-State: ABuFfohz/T8Ki4ntkgYa3aWCUopBh5vKkCUiLldJgqAGyD+2qf6gkidh SwP6k3O1qpUM90YYxXOMVZF5eQ== X-Google-Smtp-Source: ACcGV61cTI8KA5hznqKQMyeKVHaEVmaQ/0dOJ2ntGk3VF5hr9q0g2EPZAcFIki459wH3jyZhgJY5fw== X-Received: by 2002:aa7:d615:: with SMTP id c21-v6mr29595039edr.286.1539699251687; Tue, 16 Oct 2018 07:14:11 -0700 (PDT) Received: from andrea.amarulasolutions.com (85.100.broadband17.iol.cz. [109.80.100.85]) by smtp.gmail.com with ESMTPSA id h21-v6sm7059872eda.23.2018.10.16.07.14.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 07:14:10 -0700 (PDT) From: Andrea Parri To: Shuah Khan Cc: Paolo Bonzini , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Andrea Parri Subject: [PATCH] selftests: kvm: Fix -Wformat warnings Date: Tue, 16 Oct 2018 16:13:46 +0200 Message-Id: <20181016141346.19922-1-andrea.parri@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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