From: David Laight <david.laight.linux@gmail.com>
To: Brahmajit Das <brahmajit.xyz@gmail.com>
Cc: Robert Moore <robert.moore@intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] ACPI: Fix building with GCC 15
Date: Tue, 15 Apr 2025 19:04:57 +0100 [thread overview]
Message-ID: <20250415190457.351e22a1@pumpkin> (raw)
In-Reply-To: <20250414161644.30400-1-listout@listout.xyz>
On Mon, 14 Apr 2025 21:46:42 +0530
Brahmajit Das <brahmajit.xyz@gmail.com> wrote:
> Since the Linux kernel initializes many non-C-string char arrays with
> literals. While it would be possible to convert initializers from:
> { "BOOP", ... }
> to something like:
> { { 'B', 'O', 'O', 'P' }, ... }
> that is annoying.
> Making -Wunterminated-string-initialization stay silent about char
> arrays marked with nonstring would be much better.
...
> diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
> index 6f4fe47c955b..d2cda1b35e59 100644
> --- a/drivers/acpi/acpica/aclocal.h
> +++ b/drivers/acpi/acpica/aclocal.h
> @@ -293,7 +293,7 @@ acpi_status (*acpi_internal_method) (struct acpi_walk_state * walk_state);
> * expected_return_btypes - Allowed type(s) for the return value
> */
> struct acpi_name_info {
> - char name[ACPI_NAMESEG_SIZE];
> + char name[ACPI_NAMESEG_SIZE] __attribute__((nonstring));
Doesn't than generate an 'unknown attribute' error on older compilers?
Does:
typedef char char_nonstring __attribute__((nonstring));
char_nonstring name[4] = "abcd";
work?
If so the attribute could even be applied to 'u8'.
David
next prev parent reply other threads:[~2025-04-15 18:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 16:16 [PATCH 1/1] ACPI: Fix building with GCC 15 Brahmajit Das
2025-04-14 16:24 ` Brahmajit
2025-04-14 16:39 ` Rafael J. Wysocki
2025-04-15 18:04 ` David Laight [this message]
2025-04-15 20:30 ` Brahmajit
-- strict thread matches above, loose matches on Subject: below --
2025-01-21 21:42 Brahmajit Das
2025-02-13 15:46 ` Ard Biesheuvel
2025-02-13 20:06 ` David Laight
2025-02-14 19:27 ` Brahmajit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250415190457.351e22a1@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=acpica-devel@lists.linux.dev \
--cc=brahmajit.xyz@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=robert.moore@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.