diff --git a/Cantera/clib/src/ct.cpp b/Cantera/clib/src/ct.cpp index 09fb5824c..4698c187f 100755 --- a/Cantera/clib/src/ct.cpp +++ b/Cantera/clib/src/ct.cpp @@ -926,7 +926,7 @@ extern "C" { bool stherm = (show_thermo != 0); string s = report(*th(nth), stherm); if (int(s.size()) > ibuf - 1) { - return -(s.size() + 1); + return -(static_cast(s.size()) + 1); } copy(s.begin(), s.end(), buf); buf[s.size() - 1] = '\0'; @@ -940,7 +940,7 @@ extern "C" { string e; e = lastErrorMessage(); if (buflen > 0) { - int n = min(e.size(), buflen-1); + int n = min(static_cast(e.size()), buflen-1); copy(e.begin(), e.begin() + n, buf); buf[min(n, buflen-1)] = '\0'; } @@ -956,7 +956,7 @@ extern "C" { string s; writelog("function readlog is deprecated!"); //getlog(s); - int nlog = s.size(); + int nlog = static_cast(s.size()); if (n < 0) return nlog; int nn = min(n-1, nlog); copy(s.begin(), s.begin() + nn, diff --git a/Cantera/clib/src/ctonedim.cpp b/Cantera/clib/src/ctonedim.cpp index c07575331..69af23a4d 100644 --- a/Cantera/clib/src/ctonedim.cpp +++ b/Cantera/clib/src/ctonedim.cpp @@ -2,6 +2,7 @@ #ifdef WIN32 #pragma warning(disable:4786) #pragma warning(disable:4503) +#pragma warning(disable:4800) #endif @@ -109,7 +110,7 @@ extern "C" { int lout = min(sz, nm.size()); copy(nm.c_str(), nm.c_str() + lout, buf); buf[lout] = '\0'; - return nm.size(); + return static_cast(nm.size()); } catch (CanteraError) { return -1; } }