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

Avoid string truncation warning by leaving space for null terminator #146

Merged

Conversation

SimonHeim
Copy link
Contributor

Removes a string truncation warning emitted by GCC-13.

The next line sets the last byte to the null-terminator, so the strncpy is redundant. Meaning we can reduce the size of the strcpy by 1 byte.

@ben-strasser
Copy link
Owner

That GCC never fixes this bug on their side is really annoying. This issue was raised in the past and was rejected because we cannot work around every bug in compiler warnings... but I guess this is not going to get fixed.

@ben-strasser ben-strasser merged commit 574a9fe into ben-strasser:master Feb 2, 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.

2 participants