-
Notifications
You must be signed in to change notification settings - Fork 7.9k
initializer-string for array of ... warnings #17687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
seems like |
I'll introduce a ZEND_ macro for the non string attribute.
You need to PR the changes to that lexbor repository, and then it will get pulled in at the next sync indeed. |
Starting with gcc 15 the warning `-Wunterminated-string-initialization` is enabled by default. We make now use of the `nonstring` attribute to silence the warning for the cases where this is intended. This is targeted to 8.3 because of the people who compile with -Werror.
Uh oh!
There was an error while loading. Please reload this page.
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: