summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Manganelli <bruno.manga95@gmail.com>2018-12-24 12:11:26 +0000
committerBrad King <brad.king@kitware.com>2019-01-09 08:25:10 -0500
commit5bcfe98bd5215d8fc1638879c3ee92ca2c1383b8 (patch)
treea9108d3129ce6ee64c8a4603ae6f0c827a54a530
parent70e245f19ec8e753784db6a1153c64e5f5eec16a (diff)
downloadcmake-5bcfe98bd5215d8fc1638879c3ee92ca2c1383b8.tar.gz
Source: Fix various compiler warnings in Visual Studio 2017
-rw-r--r--Source/cmCPluginAPI.cxx2
-rw-r--r--Source/cmFileCommand.cxx2
-rw-r--r--Source/cmVisualStudioGeneratorOptions.cxx2
-rw-r--r--Source/cmWriteFileCommand.cxx2
4 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index 065a184ceb..1d9621c667 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -407,7 +407,7 @@ char CCONV* cmExpandVariablesInString(void* arg, const char* source,
cmMakefile* mf = static_cast<cmMakefile*>(arg);
std::string barf = source;
std::string const& result =
- mf->ExpandVariablesInString(barf, escapeQuotes, atOnly);
+ mf->ExpandVariablesInString(barf, escapeQuotes != 0, atOnly != 0);
return strdup(result.c_str());
}
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 594cb67866..fc9c1d2acb 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -220,7 +220,7 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args,
// Set permissions to writable
if (cmSystemTools::GetPermissions(fileName.c_str(), mode)) {
#if defined(_MSC_VER) || defined(__MINGW32__)
- writable = mode & S_IWRITE;
+ writable = (mode & S_IWRITE) != 0;
mode_t newMode = mode | S_IWRITE;
#else
writable = mode & S_IWUSR;
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx
index 5d67dcf510..afe9230272 100644
--- a/Source/cmVisualStudioGeneratorOptions.cxx
+++ b/Source/cmVisualStudioGeneratorOptions.cxx
@@ -269,7 +269,7 @@ void cmVisualStudioGeneratorOptions::FixManifestUACFlags()
if (keyValue[1].front() == '\'' && keyValue[1].back() == '\'') {
keyValue[1] =
- keyValue[1].substr(1, std::max<int>(0, keyValue[1].size() - 2));
+ keyValue[1].substr(1, std::max(0, cm::isize(keyValue[1]) - 2));
}
if (keyValue[0] == "level") {
diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx
index c504ef4360..49dbf1a191 100644
--- a/Source/cmWriteFileCommand.cxx
+++ b/Source/cmWriteFileCommand.cxx
@@ -50,7 +50,7 @@ bool cmWriteFileCommand::InitialPass(std::vector<std::string> const& args,
// Set permissions to writable
if (cmSystemTools::GetPermissions(fileName.c_str(), mode)) {
#if defined(_MSC_VER) || defined(__MINGW32__)
- writable = mode & S_IWRITE;
+ writable = (mode & S_IWRITE) != 0;
mode_t newMode = mode | S_IWRITE;
#else
writable = mode & S_IWUSR;