Does not compile #200
Comments
What compiler? |
GCC 7.1.1. |
gcc what version? It's kind of a useless warning - snprintf already handles the truncation itself in the way which we expect. I would be surprised if gcc enabled that warning as part of -Wall. Perhaps the AUR (which I have no information on) passes extra options? |
Also, you should raise this with the maintainer of the package if it is a build problem with their package. |
As I wrote, gcc 7.1.1 |
Yeah, you edited in the version after my comment, good job. |
Sorry, didn't saw your comment while I was editing |
I test with 5.4.0 at the moment so it's possible that it's just a newer gcc thing which has changed the set of warnings enabled by -Wall. As I don't have 7.1.1 or an Arch environment on hand to test against I will need a PR that you (or the package maintainer) have tested to fix this. |
it seems that there is a need to add |
Added a PR which fix it... |
I get the same error I am running Kali3 on my laptop |
I am having an error:
interactive.c:143:44: error: '%03d' directive output may be truncated writing between 3 and 9 bytes into a region of size 5 [-Werror=format-truncation=]
snprintf(strFl,6,"F%03d",((a->altitude+50)/100));
^~~~
interactive.c:143:42: note: directive argument in the range [-21474836, 21474836]
snprintf(strFl,6,"F%03d",((a->altitude+50)/100));
^~~~~~~
In file included from /usr/include/stdio.h:939:0,
from dump1090.h:65,
from interactive.c:50:
/usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 5 and 11 bytes into a destination of size 6
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:49: interactive.o] Error 1
any ideas?
The text was updated successfully, but these errors were encountered: