DrylandEcology / STEPWAT2

folder
4 stars 5 forks source link

New compiler warnings #574

Open kpalmqui opened 3 months ago

kpalmqui commented 3 months ago

Two new compiler warnings are occurring on commit https://github.com/DrylandEcology/STEPWAT2/pull/573/commits/07cf11e0ea7e2d53cd6c837c1ab8bf0815ad013e:

ST_grid.c:264:2: warning: 'snprintf' will always overflow; destination buffer has size 507, but size argument is 508 [-Wbuiltin-memcpy-chk-size] snprintf(SW_prefix_permanent, sizeof(SW_prefix_permanent) + 1, "%s/%s", ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:3: note: expanded from macro 'snprintf' builtin___snprintf_chk (str, len, 0, darwin_obsz(str), VA_ARGS__) ^ ST_grid.c:559:3: warning: 'snprintf' will always overflow; destination buffer has size 507, but size argument is 2049 [-Wbuiltin-memcpy-chk-size] snprintf(SoilWatAll.Weather.name_prefix, sizeof(aString... ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:3: note: expanded from macro 'snprintf' builtin_snprintf_chk (str, len, 0, darwin_obsz(str), __VA_ARGS__) ^ 2 warnings generated.