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 compiling error for snprintf ( under Raspberry Pi OS Debian Bullseye ) #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sprhawk
Copy link

@sprhawk sprhawk commented Mar 4, 2022

it compiles failed without changes:

main.cpp:1493:36: error: ‘%s’ directive output may be truncated writing up to 557 bytes into a region of size 15 [-Werror=format-truncation=]
 1493 |  snprintf(buffer, sizeof(buffer), "%s", chip);
      |                                    ^~
......
main.cpp:1493:10: note: ‘snprintf’ output between 1 and 558 bytes into a destination of size 15
 1493 |  snprintf(buffer, sizeof(buffer), "%s", chip);
      |  ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

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