summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-08-06 13:11:41 (GMT)
committerBrad King <brad.king@kitware.com>2014-08-06 13:11:41 (GMT)
commitc6acbc90630064aaac0d0c23ea4d7afaceac48db (patch)
tree14e90e7cc8bf0355c46eb214384bc88b88b99826 /Source/cmGeneratorExpressionEvaluator.cxx
parent4ec6ff8f9f38d02e300b3fc6bf75c2743eb70f97 (diff)
downloadCMake-c6acbc90630064aaac0d0c23ea4d7afaceac48db.zip
CMake-c6acbc90630064aaac0d0c23ea4d7afaceac48db.tar.gz
CMake-c6acbc90630064aaac0d0c23ea4d7afaceac48db.tar.bz2
Genex: Remove unnecessary check of context->Makefile
The context->Makefile is never NULL, but our checks for it convince Clang scan-build that it might be NULL. Then it warns about later unchecked uses. Drop the unnecessary checks.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 35a9fcb..70f33b7 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -394,9 +394,8 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
cmGeneratorExpressionDAGChecker *,
const std::string &lang) const
{
- const char *compilerId = context->Makefile ?
- context->Makefile->GetSafeDefinition(
- "CMAKE_" + lang + "_COMPILER_ID") : "";
+ const char *compilerId =
+ context->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER_ID");
if (parameters.size() == 0)
{
return compilerId ? compilerId : "";
@@ -500,9 +499,8 @@ struct CompilerVersionNode : public cmGeneratorExpressionNode
cmGeneratorExpressionDAGChecker *,
const std::string &lang) const
{
- const char *compilerVersion = context->Makefile ?
- context->Makefile->GetSafeDefinition(
- "CMAKE_" + lang + "_COMPILER_VERSION") : "";
+ const char *compilerVersion = context->Makefile->GetSafeDefinition(
+ "CMAKE_" + lang + "_COMPILER_VERSION");
if (parameters.size() == 0)
{
return compilerVersion ? compilerVersion : "";
@@ -583,9 +581,8 @@ struct PlatformIdNode : public cmGeneratorExpressionNode
const GeneratorExpressionContent *,
cmGeneratorExpressionDAGChecker *) const
{
- const char *platformId = context->Makefile ?
- context->Makefile->GetSafeDefinition(
- "CMAKE_SYSTEM_NAME") : "";
+ const char *platformId =
+ context->Makefile->GetSafeDefinition("CMAKE_SYSTEM_NAME");
if (parameters.size() == 0)
{
return platformId ? platformId : "";