-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
initializer-string for array of ... warnings #17687
Comments
We bundle libmagic to be able to use the Zend memory manager, but will unlikely fix any issues. Consider to report that upstream (if not already reported/fixed there). Wrt php-src: please compile again without ext/fileinfo ( |
@cmb69 The data file is PHP's creation, not upstream's. |
counts here
|
Not sure what to do here. E.g. the PDO state is deliberately not zero-terminated, and should be properly treated this way in the code. I guess we could change that (either leave room for the terminating NUL, or use a char initializer), but I'm not sure it's worth it. |
I wasn't so sure either.. this issue starts to pop up now in a few other repos as well, as people test gcc15, https://github.com/search?q=Wunterminated-string-initialization&type=issues. You could fix these for now by either adding
|
Maybe we should wait what happens with https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178. |
Description
Starting with gcc 15 the warning
-Wunterminated-string-initialization
is apparently enabled by default with-Wextra
This will cause initializations like these
to show a warning
In the case of compiling the php-src this makes the entire compilation output completely unreadable and spams the terminal with debug diagnostics
just one example output line
(ofc my terminal will add line breaks so it's much worse)
Overall the entire compilation log of
make -j32 &> make.log
has 26494 lines..if needed I can share the compile output to help silencing this, not sure if there is an option to disable the warning
most warnings originate from
php-src/ext/fileinfo/libmagic/../data_file.c
fyi this is allowed in c, but typically a user error if done so that's why it was enabled by default
The text was updated successfully, but these errors were encountered: