You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/hotpants-master# gcc -funroll-loops -O3 -ansi -std=gnu99 -pedantic-errors -Wall -I/usr/include/cfitsio/include -D_GNU_SOURCE -c main.c
main.c: In function ‘main’:
main.c:21:59: warning: "/*" within comment [-Wcomment]
21 | /*double meanksumSubstamps,scatterksumSubstamps; /* mean and scatter of ksum */
|
main.c:562:38: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size 4 [-Wformat-overflow=]
562 | sprintf(ttype[k], "Region%d", k);
| ^~
main.c:562:31: note: directive argument in the range [0, 2147483646]
562 | sprintf(ttype[k], "Region%d", k);
| ^~~~~~~~~~
In file included from /usr/include/stdio.h:894,
from main.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 8 and 17 bytes into a destination of size 10
38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
main.c:1870:30: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
1870 | sprintf(hInfo, "%s %s", hInfo, argv[i]);
| ^
In file included from /usr/include/stdio.h:894,
from main.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output 2 or more bytes (assuming 2049) into a destination of size 2048
38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
I found the unused variable error occurs when the defined variable is not used in the code.
Can somebody help me?
The text was updated successfully, but these errors were encountered:
Hello,
I am trying to install hotpants in OS environment of Ubuntu 22.04.
I set the cfitsio include and lib path like;
Referring the issue comment in #1,
I used the complier command changing c99 into gnu99;
gcc -funroll-loops -O3 -ansi -std=gnu99 -pedantic-errors -Wall -I/usr/include/cfitsio/include -D_GNU_SOURCE -c main.c
However, the "unused variable" error occurred.
I found the unused variable error occurs when the defined variable is not used in the code.
Can somebody help me?
The text was updated successfully, but these errors were encountered: