Skip to content

Commit

Permalink
silence warnings, style
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael ZBYSZYNSKI committed Nov 14, 2023
1 parent 143c216 commit 50b8371
Show file tree
Hide file tree
Showing 4 changed files with 384 additions and 385 deletions.
2 changes: 1 addition & 1 deletion dependencies/jsoncpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4206,7 +4206,7 @@ JSONCPP_STRING valueToString(double value, bool useSpecialFloats, unsigned int p
int len = -1;

char formatString[6];
sprintf(formatString, "%%.%dg", precision);
snprintf(formatString, 6, "%%.%dg", precision);

// Print into the buffer. We need not request the alternative representation
// that always has a decimal point because JSON doesn't distingish the
Expand Down
2 changes: 1 addition & 1 deletion dependencies/libsvm/libsvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace LIBSVM {
char buf[BUFSIZ];
va_list ap;
va_start(ap,fmt);
vsprintf(buf,fmt,ap);
vsnprintf(buf,BUFSIZ,fmt,ap);
va_end(ap);
(*svm_print_string)(buf);
}
Expand Down
Loading

0 comments on commit 50b8371

Please sign in to comment.