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

fix: format-overflow error in gcc 14 #315

Merged
merged 1 commit into from
Mar 4, 2025
Merged

Conversation

wineee
Copy link
Contributor

@wineee wineee commented Mar 3, 2025

log:
format-overflow 从 gcc 14 开始被视为错误而非警告

error: lib/css/src/library.c:448:41: 错误:‘sprintf’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
448 | sprintf(fullname, "%s %s", link->group->name, selector);
|

参考:
https://stackoverflow.com/questions/73769693/how-to-fix-warning-sprintf-swriting-a-termination-nul-past-the-end-ot-the-dest

Fixes #???.

Changes proposed in this pull request:

@lc-soft

log:
format-overflow 从 gcc 14 开始被视为`错误`而非`警告`
> error: lib/css/src/library.c:448:41: 错误:‘sprintf’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
>  448 |                 sprintf(fullname, "%s %s", link->group->name, selector);
>      |

参考:
https://stackoverflow.com/questions/73769693/how-to-fix-warning-sprintf-swriting-a-termination-nul-past-the-end-ot-the-dest
@lc-soft lc-soft merged commit 8f205ec into lc-soft:develop Mar 4, 2025
2 checks passed
@wineee wineee deleted the fix branch March 4, 2025 02:33
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.

None yet

2 participants