Skip to content
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

Initialize the npf_format_spec_t struct to prevent a spurious warning #277

Conversation

chrisjbillington
Copy link

addresses #276

This prevents a -Wmaybe-uninitialized warning on GCC, where aggressive optimizations can make the #pragma to suppress the warnings not work.

Remove the #pragma to suppress the warning as it should no longer occur.

This prevents a `-Wmaybe-uninitialized` warning on GCC, where aggressive
optimizations can make the `#pragma` to suppress the warnings not work.

Remove the `#pragma` to suppress the warning as it should no longer
occur.
@chrisjbillington
Copy link
Author

Let me know if you'd prefer to limit the initialisation to only happen on recent GCC versions or anything like that - or if you'd prefer to look at the __attribute__((assume( ))) approach instead (which I also didn't previously know was a possibility - a chatbot suggested it).

@chrisjbillington
Copy link
Author

Closing in favour of #278

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.

1 participant