diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index d0063c83b..eacbfedbe 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -581,7 +581,7 @@ bool cmStringCommand::HandleLengthCommand(std::vector const& args) size_t length = stringValue.size(); char buffer[1024]; - sprintf(buffer, "%d", length); + sprintf(buffer, "%d", static_cast(length)); m_Makefile->AddDefinition(variableName.c_str(), buffer); return true;