From: Al Viro <viro@zeniv.linux.org.uk>
To: Brahmajit Das <brahmajit.xyz@gmail.com>
Cc: brauner@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] fs/qnx6: Fix building with GCC 15
Date: Fri, 15 Nov 2024 05:03:58 +0000 [thread overview]
Message-ID: <20241115050358.GQ3387508@ZenIV> (raw)
In-Reply-To: <20241004195132.1393968-1-brahmajit.xyz@gmail.com>
On Sat, Oct 05, 2024 at 01:21:32AM +0530, Brahmajit Das wrote:
> qnx6_checkroot() had been using weirdly spelled initializer - it needed
> to initialize 3-element arrays of char and it used NUL-padded
> 3-character string literals (i.e. 4-element initializers, with
> completely pointless zeroes at the end).
>
> That had been spotted by gcc-15[*]; prior to that gcc quietly dropped
> the 4th element of initializers.
>
> However, none of that had been needed in the first place - all this
> array is used for is checking that the first directory entry in root
> directory is "." and the second - "..". The check had been expressed as
> a loop, using that match_root[] array. Since there is no chance that we
> ever want to extend that list of entries, the entire thing is much too
> fancy for its own good; what we need is just a couple of explicit
> memcmp() and that's it.
>
> [*]: fs/qnx6/inode.c: In function ‘qnx6_checkroot’:
> fs/qnx6/inode.c:182:41: error: initializer-string for array of ‘char’ is too long [-Werror=unterminated-string-initialization]
> 182 | static char match_root[2][3] = {".\0\0", "..\0"};
> | ^~~~~~~
> fs/qnx6/inode.c:182:50: error: initializer-string for array of ‘char’ is too long [-Werror=unterminated-string-initialization]
> 182 | static char match_root[2][3] = {".\0\0", "..\0"};
> | ^~~~~~
>
> Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Sorry, hadn't realized it had fallen through the cracks.
Christian, usually you are handling vfs/vfs.git#vfs.misc; I can put
it there myself, if you prefer it that way...
next prev parent reply other threads:[~2024-11-15 5:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 21:16 Build failure with GCC 15 due to -Werror=unterminated-string-initialization Brahmajit
2024-10-02 21:46 ` Al Viro
2024-10-02 21:54 ` Al Viro
2024-10-03 6:52 ` Brahmajit
2024-10-04 9:49 ` [PATCH 1/1] fs/qnx6: Fix building with GCC 15 Brahmajit Das
2024-10-04 18:44 ` Al Viro
2024-10-04 19:51 ` Brahmajit
2024-10-04 19:51 ` [PATCH v2 " Brahmajit Das
2024-11-15 5:03 ` Al Viro [this message]
2024-12-02 4:29 ` Al Viro
2024-12-03 9:41 ` Christian Brauner
2024-10-06 19:38 ` [PATCH " David Laight
2024-10-06 20:00 ` Al Viro
2024-10-06 23:05 ` 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=20241115050358.GQ3387508@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=brahmajit.xyz@gmail.com \
--cc=brauner@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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.