From patchwork Thu Sep 7 10:50:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 720599 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp163404wrp; Thu, 7 Sep 2023 03:51:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHBrwCdycP/1LVvwhOMBpYXL6lwQ74mUTac4uIiWHTOzl/Ocjz6MZEbT2g06SSYLR5prG3r X-Received: by 2002:ad4:528b:0:b0:63d:218:c83f with SMTP id v11-20020ad4528b000000b0063d0218c83fmr18584470qvr.36.1694083903869; Thu, 07 Sep 2023 03:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694083903; cv=none; d=google.com; s=arc-20160816; b=UDAGzsub/3wnHF86mCFn2jsbc7NLoD+kodjTIZCd97fBemQLI3OfmvyKZmuKLZJICQ oGILzMlpNH63Dl0CZUsJmDxQkG6Rp4L7kH+GEhbyjZxQkcEeWRSi+DjlDN7RmS4eASA8 m0zq8Wu6ww6zqcz7EkVjksKQkt9yMhIbuR6qCrtIIb+Lff2BJQ7sLCRV1h03+Nu5iNhA 4q7zmOorHJD1OoeumbUVkzq1mfhS0azeAAmQPAP0hJ20LUlWbDrJ5m2d6M4C0YNWhZZB u8kRHr/6nmErMjfYosp2hGo6gEG96qnM12QbXBTXZPZYBdZc/2MT/tjabLQze3HJvdBq NkMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7e245FoK5q01LB4PXDdn1jGxm+SXz3DlMpzLfK1cumM=; fh=BW8kVGHgEV8gn3zw8WoObUnBXsqPghOK4kNDCIpquMI=; b=D3jpyf2rvHwvJ9Z+rWjcqzg2qkpzgwbZWlU1MVtLmwJukC0THxgImyy57asCu26HcH O/bPpgzv+gFf9k7LGwBMtiAhH/TKhB99WZD2aVLfXdJJjlod0wW17EwAUltseZLuLztl W+oNzwVxtNybPClrahwpc8Pdy9N41E4QDorpwOKFvvyZyzymUE+4L0POnozduaMjICCO 6IfdUJLB7H64z3jGw8V9LiW20YFZTsoM3DZpBPvtCO7uC7Dv7AElXaFX/0rVLTTtpZ/j 2M9WbgOMsFo0wQQvTwWGGO+kRW4nBocW8ARyEoKSyQTJQihdfJvVIrQQG1ld7ZDeIizb Ai8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NcvG9ysu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u7-20020a0c8dc7000000b0064f3f9c672csi11297960qvb.480.2023.09.07.03.51.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 03:51:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NcvG9ysu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeCaq-000069-7n; Thu, 07 Sep 2023 06:50:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeCan-00005y-Tu for qemu-devel@nongnu.org; Thu, 07 Sep 2023 06:50:33 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qeCal-0004n8-Kh for qemu-devel@nongnu.org; Thu, 07 Sep 2023 06:50:33 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-31c63cd4ec2so814594f8f.0 for ; Thu, 07 Sep 2023 03:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694083830; x=1694688630; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7e245FoK5q01LB4PXDdn1jGxm+SXz3DlMpzLfK1cumM=; b=NcvG9ysuIlePKppQnCP/t9NVOP8XESAWpsRtmDEV//GQFF0fTmeV+p9gqHx+yW5y7C B/wHmASZqQ+nhUx02P33s4Dxqx8HpFSSqYCkisqyREc8M9pPFxO0u6MXXveuCw48d1Oq Li2Jdux8tWOE5hysOwj1sQt06/V8AzLFQPkGu9roT7eyLkDADH9rwiBKqQ7sbpwxzc17 hhBs/ACInUZnLNxE9TEezKuZ3tUSEoUQBnA1RZenjRQ3GsjEj1bmOJzUpk6usHncTvg/ xEZXcNRpRpIttHK1YIY+AK3UiC56FXtVyBT7IMJouHHdrziJKlcHilL++HkXDbwwz3Vv mW8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694083830; x=1694688630; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7e245FoK5q01LB4PXDdn1jGxm+SXz3DlMpzLfK1cumM=; b=hZ7ine9pSzS+fcvO29zLRwERTZ7KWGOeR0EjBaNMxbviycAWryRlwCGy8eFbUeVAxM 8L2kwG4wyq7YTQyEE1WgPtF6fepnUj56uiAuBLzyL0EbQBlqMUhkgq76D2M0BgxAecwy vI9onJl8bGQG05XEqjNjfGj/b5tvlCVNdcLaaEwaRRbESwXtCQi23bjwOryA7pRhR7Da jLGPqCqhMPbv8B55f07zxRRJoOdud+udnXSFgSgyWDbRPu4DnfoXNND+UPRaVoXQYs6K lGY+3J3iycBn6tBJNXs5QBp/IpQ9185Vbs4Kp+ICNPk5krGm32S/8aFxssZSOQ2oL/99 i7ig== X-Gm-Message-State: AOJu0YxWXIQhTzONsVrRuGHnW8/EmSXK1sEUb9HiZlxz3evMV35S26MP 95xqIm1lxhpgkO5jrjtoNWP7ZGRUA24gsnGl09s= X-Received: by 2002:a5d:4246:0:b0:31a:dc58:cdd9 with SMTP id s6-20020a5d4246000000b0031adc58cdd9mr4297383wrr.60.1694083830003; Thu, 07 Sep 2023 03:50:30 -0700 (PDT) Received: from m1x-phil.lan (176-131-222-226.abo.bbox.fr. [176.131.222.226]) by smtp.gmail.com with ESMTPSA id q20-20020a056000137400b003142c85fbcdsm23103720wrz.11.2023.09.07.03.50.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 07 Sep 2023 03:50:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alexandre Iooss , Paolo Bonzini , Mahmoud Mandour , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PATCH 4/5] contrib/plugins/lockstep: Fix string format Date: Thu, 7 Sep 2023 12:50:03 +0200 Message-ID: <20230907105004.88600-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907105004.88600-1-philmd@linaro.org> References: <20230907105004.88600-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This fixes on Darwin: plugins/lockstep.c:138:25: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, them->pc, g_slist_length(divergence_log), ^~~~~~ plugins/lockstep.c:138:33: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, them->pc, g_slist_length(divergence_log), ^~~~~~~~ plugins/lockstep.c:148:25: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, us->insn_count, them->pc, them->insn_count); ^~~~~~ plugins/lockstep.c:148:49: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, us->insn_count, them->pc, them->insn_count); ^~~~~~~~ plugins/lockstep.c:156:36: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] prev->block->pc, prev->block->insns, ^~~~~~~~~~~~~~~ plugins/lockstep.c:156:53: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] prev->block->pc, prev->block->insns, ^~~~~~~~~~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé --- contrib/plugins/lockstep.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 850f7b2941..682b11feb2 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -134,7 +134,9 @@ static void report_divergance(ExecState *us, ExecState *them) /* Output short log entry of going out of sync... */ if (verbose || divrec.distance == 1 || diverged) { - g_string_printf(out, "@ 0x%016lx vs 0x%016lx (%d/%d since last)\n", + g_string_printf(out, + "@ 0x%016" PRIx64 " vs 0x%016" PRIx64 + " (%d/%d since last)\n", us->pc, them->pc, g_slist_length(divergence_log), divrec.distance); qemu_plugin_outs(out->str); @@ -144,7 +146,9 @@ static void report_divergance(ExecState *us, ExecState *them) int i; GSList *entry; - g_string_printf(out, "Δ insn_count @ 0x%016lx (%ld) vs 0x%016lx (%ld)\n", + g_string_printf(out, + "Δ insn_count @ 0x%016" PRIx64 + " (%ld) vs 0x%016" PRIx64 " (%ld)\n", us->pc, us->insn_count, them->pc, them->insn_count); for (entry = log, i = 0; @@ -152,7 +156,8 @@ static void report_divergance(ExecState *us, ExecState *them) entry = g_slist_next(entry), i++) { ExecInfo *prev = (ExecInfo *) entry->data; g_string_append_printf(out, - " previously @ 0x%016lx/%ld (%ld insns)\n", + " previously @ 0x%016" PRIx64 "/%" PRId64 + " (%ld insns)\n", prev->block->pc, prev->block->insns, prev->insn_count); }