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
{{ message }}
This repository has been archived by the owner on Jul 27, 2020. It is now read-only.
BUILD/apbs/tools/mesh/smooth.c:86]: (warning) scanf without field width limits can crash with huge input data.
Source code is
if (sscanf(argv[i], "--input=%s", inPath) == 1) gotInPath = 1;
Suggest add field inside %s
Some duplicates:
apbs/tools/mesh/uhbd_asc2bin.c:30]: (warning) scanf without field width limits can crash with huge input data.
apbs/tools/mesh/uhbd_asc2bin.c:42]: (warning) scanf without field width limits can crash with huge input data.
apbs/tools/mesh/uhbd_asc2bin.c:54]: (warning) scanf without field width limits can crash with huge input data.
Regards
David Binderman
The text was updated successfully, but these errors were encountered:
@keith923 I think I got all the warnings when building either with gcc or clang.
For gcc & clang errors were mainly format errors when printing to the terminal using printf() or the maloc variation. I did make changes to CMakefiles.txt in maloc to kill a warning about double declaration of variables.
For clang I made the following changes:
bemparm.h added the function declaration to the header file since c99 does not allowed for implicit declarations.
vgrid.c:230 & merge2dx.c:372 there was a check to see if variables of type size_t were greater than or equal to zero. Since type size_t is always non-negative the checks seem unnecesary (correct me if I'm wrong).
vpmg.c:2927,3080,3658 clang was complaining that some enum types where not being taken care of in switch statements. This was because this enums were wrap in a #if and are only consider if Tinker is enabled. Added a #else with some print statements.
vyacc.c:217 clang was complaining some enums were not being taken care of in the switch statement. I added this cases with no effect as other cases in the same switch.
I think these are all the warnings. I'll wait to hear from @keith923 before closing this issue.
I think all the warnings have been eradicated. I build with gcc and clang and with and without enabling Tinker (since one of the changes involved Tinker) and everything seems to be working just fine.
From a user:
The text was updated successfully, but these errors were encountered: