From nobody Mon Feb 9 23:04:18 2026 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 1D2EB21A446 for ; Tue, 1 Apr 2025 18:26:06 +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=1743531968; cv=none; b=IBZurXSsl1MPJxkunISIKr1BJ0+tzCvWwnhw0lIBUyyQ3vr5uVXbHAmlds5+R6TKbDyiMy/y0x8ZuHcRC6dabCqBuB63AT8bAkBKgBiV8ZtdzMdzU1y+jbiF8ih/s6rnErVBRSykGq4DrVtIZoK/RnZ3A6GQwro+ZWNAUpyaq1M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743531968; c=relaxed/simple; bh=VYAhgSHR8CjW8YATc0oZ3XPUiaGVjv/5MYlkyFYu2lI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=jSGhwZbq6a16OG5e0SA5u3beiMsMx+HisbrIHh6CbNOCwKIpHk74PUmuU2HbCpbNGCTMPq8g3bmS+2HlRL+WbJYzuQyuW9fxabJE+oJYY+eXvMpTTgq3jYms8iZq7/kif2/iKlWICXWFpKu5hTIyy1GAppEpTputuGjpk0j1tcA= 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=yNsK088E; 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="yNsK088E" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-30566e34290so1226104a91.3 for ; Tue, 01 Apr 2025 11:26:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1743531966; x=1744136766; darn=vger.kernel.org; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=3GhpEMZc+Go5hXkRH+5nn2InkEe+78BeHi9RfDz0OEg=; b=yNsK088EKqqT5DybR6+96tfxYTjYd+kg3GsYH4iRO66jQYzz9moDQss1mYH5f7xbhj 8COoRraqrwBAeRMmwkAG58TaN/mIiKGvw5ldZG8RfPsfTFiZTHu8w0MsS13qt4UR+VeZ LJkOPH6gkT7ahKPSEdYibxM0Jzc5xjfVOvATp6H6UBTK8xNoOB7U654twqBmUtsBb4uB ocf+B2uy3SfNI/SSIp0QpAQ5w8q63JCpTe5mJ/JlgaMP/vb8CqG1IDRC5GN1rSLaTiWI mYj7nY5m6CscEQUHjatr+JjA8FdmdC+zlr5a4p5NRacZt9rOMCB288pOPHXfNLf9zrB6 Ywhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743531966; x=1744136766; h=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=3GhpEMZc+Go5hXkRH+5nn2InkEe+78BeHi9RfDz0OEg=; b=LO/n4psH3N+jrDLx8J8UcWywlgvToNZnmlYxNhsARC6gOhml2fm4pCIrlns3DdKLKY 9dB0O5OAzokahE6CUKuXJy5sltjeEr+aolv8twj6siLTvZtLJVvg0uXaY/A+oQIuy+Ig Kt+IE6QhPMWvmG1+HLm8ytjPwLdVDZeP66OoD6zwqJdzz61VMa3w5szEzNHxoHsP0kHX bKqVR4NOaTeOTIHDlc/r7JrnfWlEcUrnSOIJW5bA48B765pZ4YNfabFN+cNtXYU9yxKb 4vDBduMiLxNo+IW9NNcfV7TZ59z9sW9PkS26Y9eFI9iOB6pQ6z3+/EGkd1Jxo/pksVM5 ZUyg== X-Forwarded-Encrypted: i=1; AJvYcCVzSRD0utLpD/WdOKHcARF7yCawGZG1KgSAT6mbImRUpnfymgXF/fiBkIJkdRir42Xsh9KUFcFhyF4p9/Q=@vger.kernel.org X-Gm-Message-State: AOJu0Yyh+FzehjSK0haTURatMxfRxGSVQb9PdJ2BPKljU0lucZR9h0nT fILKWQ52vVBw6ljtc9SkOAwFZ+101Kn0n94Ebj3t+oud8rQrlNK52UglYmO5z8D+dYipKqmfA6I K7BqMqw== X-Google-Smtp-Source: AGHT+IH28uehI5+J49TPsEd9NihvXOguO0Bih1z8y7KT4XeqjB74B1qbmMSKwRKZHS/+SGf0DQUxAQTZmWKE X-Received: from pjbqn13.prod.google.com ([2002:a17:90b:3d4d:b0:2e9:38ea:ca0f]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:53d0:b0:2ee:8430:b831 with SMTP id 98e67ed59e1d1-30531f715eamr22653376a91.2.1743531966013; Tue, 01 Apr 2025 11:26:06 -0700 (PDT) Date: Tue, 1 Apr 2025 11:23:42 -0700 In-Reply-To: <20250401182347.3422199-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: <20250401182347.3422199-1-irogers@google.com> X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog Message-ID: <20250401182347.3422199-45-irogers@google.com> Subject: [PATCH v1 44/48] perf zlib: Silence -Wshorten-64-to-32 warnings From: Ian Rogers To: Yury Norov , Rasmus Villemoes , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , 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 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.504.g3bcea36a83-goog