Skip to content

Commit 4d28d79

Browse files
committed
sprintf is deprecated according to clang (c++) on mac
Replaced by snprintf
1 parent 130b114 commit 4d28d79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gsw_check_functions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ report(const char *funcname, const char *varname, gsw_error_info *errs)
660660
}
661661
strcat(message, ")");
662662
}
663-
sprintf(infoflg,"(%s%3d)",(errs->flags & GSW_ERROR_LIMIT_FLAG)?"*":"",
663+
snprintf(infoflg, sizeof(infoflg), "(%s%3d)", (errs->flags & GSW_ERROR_LIMIT_FLAG)?"*":"",
664664
errs->ncomp);
665665
ndots = 65 - strlen(message);
666666
if (errs->flags & GSW_ERROR_ERROR_FLAG) {

0 commit comments

Comments
 (0)