C: build_reference_db: fixed gcc warning/error

This commit is contained in:
mercierc
2021-05-31 16:59:17 +12:00
parent da91ffc2c7
commit 51a3c68fb5

View File

@ -863,7 +863,8 @@ int build_reference_db(const char* dms_name,
fprintf(stderr,"\rDone : 100 %% \n");
// Add information about the threshold used to build the DB
snprintf(threshold_str, 5, "%f", threshold);
#define snprintf_nowarn(...) (snprintf(__VA_ARGS__) < 0 ? abort() : (void)0)
snprintf_nowarn(threshold_str, 5, "%f", threshold);
new_comments = obi_add_comment((o_view->infos)->comments, DB_THRESHOLD_KEY_IN_COMMENTS, threshold_str);
if (new_comments == NULL)