Skip to content

Fixed -Wunterminated-string-initialization with gcc15. #631

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

Merged
merged 1 commit into from
Apr 17, 2025

Conversation

arut
Copy link
Contributor

@arut arut commented Apr 16, 2025

gcc-15 introduced a new warning -Wunterminated-string-initialization which breaks nginx compilation.

See also #628 and #134.

@arut arut requested a review from pluknet April 16, 2025 14:18
@ac000
Copy link
Member

ac000 commented Apr 16, 2025

Like #134 I believe this to be the wrong fix. See #628 for what I believe is the correct way...

@arut
Copy link
Contributor Author

arut commented Apr 17, 2025

Like #134 I believe this to be the wrong fix. See #628 for what I believe is the correct way...

@ac000 why do you think so? I'd agree if the initializer was in fact a readable string, but it's all hex anyway. We keep the size and don't rely on compiler-specific attributes.

@ac000
Copy link
Member

ac000 commented Apr 17, 2025

True, with the current usages it's debatable what's more readable.

Seeing as there seems to currently only be a few non-textual character arrays... I'm not going to argue the toss.

@arut arut merged commit 444954a into nginx:master Apr 17, 2025
1 check passed
@arut arut deleted the gcc-15 branch April 17, 2025 15:13
@Maryna-f5 Maryna-f5 added this to the nginx-1.27.6 milestone Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants