From f66e735de393c25408d9e955aa8f27c9611ac245 Mon Sep 17 00:00:00 2001 From: David Cole Date: Wed, 22 Feb 2012 17:12:11 -0500 Subject: [PATCH] Fix compiler warning reported on older Borland dashboard. Avoid assignment inside the if. --- Source/cmDepends.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index b511f65b5..9296d4cca 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -266,7 +266,8 @@ void cmDepends::SetIncludePathFromLanguage(const char* lang) includePathVar += lang; includePathVar += "_TARGET_INCLUDE_PATH"; cmMakefile* mf = this->LocalGenerator->GetMakefile(); - if(includePath = mf->GetDefinition(includePathVar.c_str())) + includePath = mf->GetDefinition(includePathVar.c_str()); + if(includePath) { cmSystemTools::ExpandListArgument(includePath, this->IncludePath); } @@ -276,7 +277,8 @@ void cmDepends::SetIncludePathFromLanguage(const char* lang) includePathVar = "CMAKE_"; includePathVar += lang; includePathVar += "_INCLUDE_PATH"; - if(includePath = mf->GetDefinition(includePathVar.c_str())) + includePath = mf->GetDefinition(includePathVar.c_str()); + if(includePath) { cmSystemTools::ExpandListArgument(includePath, this->IncludePath); }