From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 BFF801FAA for ; Wed, 22 Jan 2025 09:03:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737536609; cv=none; b=tFsU9BKJcI/GOPeBx2H4op6S8RBWwXRCk5Fp+9eYgoAgYIgkwkgh6gckLKx5GLjFtNtuZBAJwgKjedDOP4cxkaM1TZJGIF8kZQ6sdjmtcA7HIjwMZjZn2VBCp5KHjaVl4zVRBzcmgARiCymm+Cl4kgm84CXViFKm0p/cB0oCxho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737536609; c=relaxed/simple; bh=qFbPnK0PIjJquXMv/pF6+wmsX6N8W+dNvjtMoGkLcsY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=N3taGQnVuWJAJkyoeTj/0avhDXbM3hW0cWEQc1It2+hZYWbP5GPLNb0iOWP1lZa3rS09Fwf60UaMot+sFF/OlrdmSKJZZnXsw5+YduhsQXu/S+vVeAuaIqXvQIhPz+c7ZbKaHuIMAq0ntI64BdXhphCfd76blYEiji5Vx0TXYVM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CjvhQqJu; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CjvhQqJu" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-3863c36a731so5555076f8f.1 for ; Wed, 22 Jan 2025 01:03:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737536606; x=1738141406; darn=vger.kernel.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=qXa+CLoEfsGPQncdzFfwSdHRxOfs4sQtMC3wnCtXOzw=; b=CjvhQqJuk95BqJFUxBpFWlnbacYzcLqN6VtQKI7EdqPEoKP1Sn33bQ8UvktoxeK3hC mRT5LtKJGxuAIgRblyzyw7QpXSY2+AevqpV8et/y658w6JYRLE0tGmAJfBjs7S7zeOQq wqQDGRjmAO6qSmqao2zcYKK8IYMiAsa715aT7m07goj/gMuKkXfieY63mdgya4r7JdtR qy1iCPh+DQjgQGa0UJ3L99nlfBGdeTv6qi6zD7ggH1dv05JMsS/kqGE3XcgzPIh1Ay+D v21ChJcijZCGgOTMU0Zp4SBYpxdOlWnwUG8Yz9J2qY2ICOhfW7A66OlWzk4wFBdZc4tu 3Nyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737536606; x=1738141406; 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=qXa+CLoEfsGPQncdzFfwSdHRxOfs4sQtMC3wnCtXOzw=; b=gRcj37HxVqAVcxUM9sj/3kD1dQUdsbFZJUSAqrf4omDV7Rl9nefYAlS3gBiRy/KYQs e+zlyXgxoSInwm1hbEJw+TBUcaBN1BqJ9BFCeWdGBbYzIVmTWBEfgCujHchblsCxf0gl Sj4dHbLBkgQczh6CEO6uS58LMofcBYeeiVMb17HJc4MdMRcNewi1CVz5g7XF9L/x41Lt aXSgwEen0a3ScuBm0F429yneVwTtcrFYvb6IgRDJH6lTkX6ZwlwyJHxeaV/Q2OLscL7+ t+7UT3MMZA8BzNsmqFK2SbBlWSB+0LGY8d7afZgDWXJqArLj2/JVMufcRQ0VSuVQBD2E sfOQ== X-Forwarded-Encrypted: i=1; AJvYcCU1y0oOB0kij3vLRiMvUkGHHTpsiin2V7usMCJKRuuCHmV8mo8GtSTzT7HzHP51fYHJSw8jjuj4CNWmwfM=@vger.kernel.org X-Gm-Message-State: AOJu0YzrTlGedk0DQPL368KUBJ6aGAg6vl7Svugje6rHTgBym3fP5KaX 3WYyyyMZ96e+o9l80e2EDqNEbN/83v8//IHxhnIDxLctgEfj6qMse4+qBXOH X-Gm-Gg: ASbGnctFjNv05aJKyJt6DcmgGq/BzHOm8eENUr1xFv1s/gtBE/2Q66VfULTsmmVwGBd 3VwNW3se4p6iY/sGapf717jblrFKiu+Nz1s3tzQ4YYFvC4mmgQZrnyGabtHNEMya+BsNw+rjmBH SpBvvhfqhRBi4dhLIv/qs8HuWG0bdXX9w5wSCYuXdgy13QXkKWUy2MnVPKF4Yz1LN2ODyavbF+r BuJRKSN9I4X6U7RNERJ6D+l3lk3tqr0pMusJZL4US2aJSre9/kaUqNkuQzmgyBHRRPxQOFtNeab 8af0Eg== X-Google-Smtp-Source: AGHT+IGXGhemsPVUtNP+jdBatlh3IZncnXXvARsLkr1lNZDkeLiqZmq3dWZODp9aB9WOIRMwNX64tw== X-Received: by 2002:adf:ab0f:0:b0:386:3711:ff8c with SMTP id ffacd0b85a97d-38bf579348dmr13365674f8f.23.1737536605753; Wed, 22 Jan 2025 01:03:25 -0800 (PST) Received: from azathoth.suse.cz ([45.250.247.116]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-38bf3275556sm15948152f8f.72.2025.01.22.01.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jan 2025 01:03:25 -0800 (PST) From: Brahmajit Das To: brahmajit.xyz@gmail.com, david.laight.linux@gmail.com Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org, netfs@lists.linux.dev Subject: [PATCH v2 1/1] cachefiles: fix build with GCC 15 Date: Wed, 22 Jan 2025 14:33:06 +0530 Message-ID: <20250122090306.1524098-1-brahmajit.xyz@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250121091530.1316673-1-brahmajit.xyz@gmail.com> References: <20250121091530.1316673-1-brahmajit.xyz@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Building with GCC 15 results in the following error fs/cachefiles/key.c:12:9: error: initializer-string for array of ‘char’ is too long [-Werror=unterminated-string-initialization] 12 | "0123456789" /* 0 - 9 */ | ^~~~~~~~~~~~ cc1: all warnings being treated as errors This due to GCC 15 having enabled -Wunterminated-string-initialization by default[0]. Here we're increasing the size of cachefiles_charmap from 64 to 65 to ensure space for NUL. Unfortunately using __attribute__((nonstring)) or converting to unsigned char [] didn't help in this case (thanks to David Laight ). Please also refer: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178, and https://gcc.gnu.org/pipermail/gcc-patches/2024-December/671714.html [0]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wno-unterminated-string-initialization Signed-off-by: Brahmajit Das --- fs/cachefiles/key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cachefiles/key.c b/fs/cachefiles/key.c index bf935e25bdbe..a75ea693f649 100644 --- a/fs/cachefiles/key.c +++ b/fs/cachefiles/key.c @@ -8,7 +8,7 @@ #include #include "internal.h" -static const char cachefiles_charmap[64] = +static const char cachefiles_charmap[65] = "0123456789" /* 0 - 9 */ "abcdefghijklmnopqrstuvwxyz" /* 10 - 35 */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" /* 36 - 61 */ -- 2.48.1