From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E0E8371895 for ; Thu, 21 May 2026 16:29:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779380985; cv=none; b=mNBhoFtULzbGoeNWz3hyULpWFJDr1npYYvUpHFx3J6i0g+vknLs1hKcZ3brMukjOFNN3+GGw3lbXUXE6zCpcB/n/OiWyaoPpk7rLoGpXaUyxTriMAywMQ1fFkf2iZnETTMXK1HOo1Uk1hloEJu/dRPG2Nb9OZ7IIRI4q6s1DDjs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779380985; c=relaxed/simple; bh=vo9Ot6RiKEj3QiJvt55Jt7E9av3V2YZ1slgnnQPQXzg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WxDmxGDxrz3KEc+XGS8Id4sQ7WgXA62yVYSQkpu7KzVgHpFLnDxQPTELxngSSpUDSO7PunQdP7WJrWfxiW0VCJhH8R2W41pnjbB++qxMAODEpq8/8avY7LyuK4BL5A6YCYbl08GWqNKeH37xivYWX21QxpehuQdtXlqNJUazMyw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=eqBJHqvY; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="eqBJHqvY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1779380975; bh=vo9Ot6RiKEj3QiJvt55Jt7E9av3V2YZ1slgnnQPQXzg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=eqBJHqvYstGChOOhGgZQFPdhJcy4f3oBT+We43W3875zyQHklQRwx1db/5Qr/9nPP kfQmkAxMCGYvotAZRIwzNG63gM4xlafSU2P3dD1Tyji0nMOhNPumeZQlvnsqycWFDQ dpn1yAxISyYvQqnULGIY2upr1rjhOGDPsqOf0a6k= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 21 May 2026 18:29:29 +0200 Subject: [PATCH 1/3] tools/nolibc: cast default values of program_invocation_name 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 Message-Id: <20260521-nolibc-write-strings-v1-1-2debb3ad4142@weissschuh.net> References: <20260521-nolibc-write-strings-v1-0-2debb3ad4142@weissschuh.net> In-Reply-To: <20260521-nolibc-write-strings-v1-0-2debb3ad4142@weissschuh.net> To: Willy Tarreau Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1779380974; l=1103; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=vo9Ot6RiKEj3QiJvt55Jt7E9av3V2YZ1slgnnQPQXzg=; b=VAv9XWQShsBv3GzN9R7A2+S3LbhOFvdeLdudegscoKT1RRPfwe5NULe7vi0TY0ehcqHcDHlNz y6MXgWqrqaMAJB1EV6fSGDhn87QGr7/pYuLf3w99n5XTqjU2TOXYywv X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= With -Wwrite-strings the plain assignment triggers a warning as a 'const char *' is assigned to a 'char *', removing the const qualifier. Casting the const away is fine, as there is no valid modification that can be done to an empty string anyways. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/errno.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/include/nolibc/errno.h b/tools/include/nolibc/errno.h index bab83692ea1c..a2325596d550 100644 --- a/tools/include/nolibc/errno.h +++ b/tools/include/nolibc/errno.h @@ -15,8 +15,8 @@ #ifndef NOLIBC_IGNORE_ERRNO #define SET_ERRNO(v) do { errno = (v); } while (0) int errno __attribute__((weak)); -char *program_invocation_name __attribute__((weak)) = ""; -char *program_invocation_short_name __attribute__((weak)) = ""; +char *program_invocation_name __attribute__((weak)) = (char *)""; +char *program_invocation_short_name __attribute__((weak)) = (char *)""; #else #define SET_ERRNO(v) do { } while (0) #define program_invocation_name "" -- 2.54.0