Skip to content

Commit

Permalink
some msvc warn fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMirzayanov committed Sep 25, 2024
1 parent 3ec5caf commit 7c3388f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -3681,7 +3681,7 @@ static inline double stringToDouble(InStream &in, const char *buffer) {
std::memset(suffix, 0, length + 1);
int scanned;
#ifdef _MSC_VER
scanned = sscanf_s(buffer, "%lf%s", &result, suffix, length + 1);
scanned = sscanf_s(buffer, "%lf%s", &result, suffix, (unsigned int)(length + 1));
#else
scanned = std::sscanf(buffer, "%lf%s", &result, suffix);
#endif
Expand Down Expand Up @@ -3763,7 +3763,7 @@ static inline double stringToStrictDouble(InStream &in, const char *buffer,
std::memset(suffix, 0, length + 1);
int scanned;
#ifdef _MSC_VER
scanned = sscanf_s(buffer, "%lf%s", &result, suffix, length + 1);
scanned = sscanf_s(buffer, "%lf%s", &result, suffix, (unsigned int)(length + 1));
#else
scanned = std::sscanf(buffer, "%lf%s", &result, suffix);
#endif
Expand Down

0 comments on commit 7c3388f

Please sign in to comment.