mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
tools/nolibc: cast default values of program_invocation_name
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 <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260525-nolibc-write-strings-v2-1-ab5cc16c7b23@weissschuh.net
This commit is contained in:
parent
835fa43a4d
commit
638b481613
|
|
@ -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 ""
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user