From nobody Fri Dec 19 17:28:34 2025 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32F632983E8 for ; Wed, 30 Apr 2025 17:52:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746035546; cv=none; b=qI/Cu0BV9UsAaP5RIfA3ijUYv0QXlOnopB2T6MtHcND2UcHLTPXrGRI179/tqwuUkMA7jCSVC0BmAvTPpzz4+bGP/w2K5fEzHruuN86/I8CC1Q29DQ5ZtPhY8JnKA0/E4hQUAAG00xQtV03XI5KFOU1F9SkqfkjD+0Q6x0ZOcvQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746035546; c=relaxed/simple; bh=SChJhTbUNPg1ND5dFZYx1lf5bG8QjJRd5Qz/8x8RQGk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ZZWfGLsazbIUic4N6ck1T9PG6fy7+yppS/XxHB3vNATPEHNmT+j7JdmGFIOFYZmXCBEYaRVFntBfB/e22zz947WU0TV+H2d3s0C85Ga0GfyYilpBVUUsA+dqsfaFVy24OJ/6zZB88qCkeiYJsDJlEBv6mIZ/pHI+KgYbS+k6Qkg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Kjb3b9VW; arc=none smtp.client-ip=209.85.216.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Kjb3b9VW" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-309c6e43a9aso224971a91.2 for ; Wed, 30 Apr 2025 10:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1746035544; x=1746640344; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=PttgRlYacSl4neWRZmL9Egf25cjRBgUThY4Fgt+xSRQ=; b=Kjb3b9VWr32N0jTCYH2KPQd9IJmDSW46RFCOVMYDh2NzHnFsdHY4xGEWP8z4/2+8En 8i53eiJlehcdEgFIKidamWCkFjFIZ/QvBXUlyfWhZmgRuEAMzYqCd7ZoM9Y5E3BRhvkg fG0VTMM8jiLzVWhCtnafGajeNEq5ys6DMc09ypL+UeRX9LQe2obDJXaVwySHPHDwvO5P Ii+4hnb91wrUwMENNc1Qn6vetgnksM2ME+/OEJ8bwQf9qanxdh+u8JNx1Uog3UGF/6t8 bxYA5dHP7ozvI7r/bQtLX7NB1abBB6lmfecnuVdVKH+qAMFEMPFgHWJl79a0Of/fo31E wvWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746035544; x=1746640344; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PttgRlYacSl4neWRZmL9Egf25cjRBgUThY4Fgt+xSRQ=; b=aPum69RBfOz3XdCVY5WgUJRtlajg38GsYpglq3rByHcLQiYjnleUCamfUAmBuIDf1+ 4nwjHwG9mV7S36f7wwCUMZbZ88L6FRcUbU5IIjgZT/GgXctXHUUsUKDgzGh2Z2MW3NTq dK5Yh/ls14KamrV8kxfTfJNyrjw0pm5M/wLf25A1Wc9aCWHQsFu6XTz+o62T3ztzJLpt M7IsG21Lc3S1f9h1oSgZKj7oN4jPW2qRQkYE7vuzranaOS2MMLyq2OfRBrENtJxypqck E36KG6s2ChvN19ZCDmh3VvMKjdmrxkKE6vz6iQCmbb4iuAior4Eho2JRfffhQqrp+Y/K FZ7g== X-Forwarded-Encrypted: i=1; AJvYcCW0QKzrq79csOubFwUBlHtr02uTiDk5Rb2BBJUvMiKUMD6CwZ3K+21UbzDTY5bIvd+stIIdNgIs+Hibbd0=@vger.kernel.org X-Gm-Message-State: AOJu0YzrJsHohulQshUkgO3CBZ8ldcuEWKh3iApZ0p3GTq2025AXCjyW QgwsTWT4ZE/uKavK2QTjXDxIXgVTxHDpbzflUFdrC5kX412CEooVKjC6BK7Y1BM6F+YwuodoaDQ vC6NyEw== X-Google-Smtp-Source: AGHT+IH609WX54b/JbVgl93PVIkC18sTffKfTUp//AJVPoOBnLr2z7CYeICMxOSMi9XQ3JkGUed341rCFivT X-Received: from pjm4.prod.google.com ([2002:a17:90b:2fc4:b0:305:2d68:2be6]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:4984:b0:2ff:58b8:5c46 with SMTP id 98e67ed59e1d1-30a344025abmr5485273a91.8.1746035543977; Wed, 30 Apr 2025 10:52:23 -0700 (PDT) Date: Wed, 30 Apr 2025 10:50:31 -0700 In-Reply-To: <20250430175036.184610-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250430175036.184610-1-irogers@google.com> X-Mailer: git-send-email 2.49.0.906.g1f30a19c02-goog Message-ID: <20250430175036.184610-44-irogers@google.com> Subject: [PATCH v2 43/47] perf zlib: Silence -Wshorten-64-to-32 warnings From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , Yury Norov , Rasmus Villemoes , Thomas Gleixner , Darren Hart , Davidlohr Bueso , "=?UTF-8?q?Andr=C3=A9=20Almeida?=" , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Yicong Yang , Jonathan Cameron , Nathan Chancellor , Bill Wendling , Justin Stitt , Josh Poimboeuf , Al Viro , Kyle Meyer , Ben Gainey , Athira Rajeev , Kajol Jain , Aditya Gupta , Eder Zulian , Dapeng Mi , Kuan-Wei Chiu , He Zhe , Dirk Gouders , Brian Geffon , Ravi Bangoria , Howard Chu , Charlie Jenkins , Colin Ian King , Dominique Martinet , Jann Horn , Masahiro Yamada , Arnd Bergmann , Yang Jihong , Dmitry Vyukov , Andi Kleen , Graham Woodward , Ilkka Koskinen , Anshuman Khandual , Zhongqiu Han , Hao Ge , Tengda Wu , Gabriele Monaco , Chun-Tse Shao , Casey Chen , "Dr. David Alan Gilbert" , Li Huafei , "Steinar H. Gunderson" , Levi Yun , Weilin Wang , Thomas Falcon , Thomas Richter , Andrew Kreimer , "=?UTF-8?q?Krzysztof=20=C5=81opatowski?=" , Christophe Leroy , Jean-Philippe Romain , Junhao He , "Masami Hiramatsu (Google)" , Xu Yang , Steve Clevenger , Zixian Cai , Stephen Brennan , Yujie Liu , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev Cc: Ian Rogers Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The clang warning -Wshorten-64-to-32 can be useful to catch inadvertent truncation. In some instances this truncation can lead to changing the sign of a result, for example, truncation to return an int to fit a sort routine. Silence the warning by making the implicit truncation explicit. Signed-off-by: Ian Rogers --- tools/perf/util/zlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/zlib.c b/tools/perf/util/zlib.c index 78d2297c1b67..d30597701fd1 100644 --- a/tools/perf/util/zlib.c +++ b/tools/perf/util/zlib.c @@ -44,7 +44,7 @@ int gzip_decompress_to_file(const char *input, int output= _fd) goto out_unmap; =20 zs.next_in =3D ptr; - zs.avail_in =3D stbuf.st_size; + zs.avail_in =3D (uInt)stbuf.st_size; =20 do { zs.next_out =3D buf; --=20 2.49.0.906.g1f30a19c02-goog