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

Compling warnings with gcc 7.2.1 20170915 #123

Closed
DwaineGarden opened this issue Nov 28, 2017 · 1 comment
Closed

Compling warnings with gcc 7.2.1 20170915 #123

DwaineGarden opened this issue Nov 28, 2017 · 1 comment

Comments

@DwaineGarden
Copy link
Contributor

Getting the following warnings when compiling direwolf dev branch with gcc v

mheard.c: In function ‘mheard_dump’:
mheard.c:210:24: warning: ‘%02d’ directive writing between 2 and 9 bytes into a region of size between 8 and 11 [-Wformat-overflow=]
sprintf (result, "%4d:%02d", h, m);
^~~~
mheard.c:210:19: note: directive argument in the range [-71582774, 71582774]
sprintf (result, "%4d:%02d", h, m);
^~~~~~~~~~
mheard.c:210:2: note: ‘sprintf’ output between 8 and 18 bytes into a destination of size 16
sprintf (result, "%4d:%02d", h, m);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mheard.c:210:24: warning: ‘%02d’ directive writing between 2 and 9 bytes into a region of size between 8 and 11 [-Wformat-overflow=]
sprintf (result, "%4d:%02d", h, m);
^~~~
mheard.c:210:19: note: directive argument in the range [-71582774, 71582774]
sprintf (result, "%4d:%02d", h, m);
^~~~~~~~~~
mheard.c:210:2: note: ‘sprintf’ output between 8 and 18 bytes into a destination of size 16
sprintf (result, "%4d:%02d", h, m);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@wb2osz
Copy link
Owner

wb2osz commented Feb 7, 2021

This was probably fixed.
I don't see it with gcc 7.4.0.

@wb2osz wb2osz closed this as completed Feb 7, 2021
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

No branches or pull requests

2 participants