diff options
author | Brad King <brad.king@kitware.com> | 2016-04-15 14:13:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-04-15 14:13:12 (GMT) |
commit | 2faa8b362050c716cc5626f9bb9d8a8612b97f95 (patch) | |
tree | c00fab30e02021d6a3c232db009cc02c7106d5d8 /Source/cmCommandArgumentParserHelper.cxx | |
parent | da07c506b9044e89ad9d904450aa590bb260bd78 (diff) | |
download | CMake-2faa8b362050c716cc5626f9bb9d8a8612b97f95.zip CMake-2faa8b362050c716cc5626f9bb9d8a8612b97f95.tar.gz CMake-2faa8b362050c716cc5626f9bb9d8a8612b97f95.tar.bz2 |
Add call stack to unused/uninitialized variable warnings
In commit v2.8.4~32^2~14 (Use cmake::IssueMessage for warnings,
2010-12-07) these warnings became formatted. It is more informative to
give the full call stack with such warnings. Also it is easier to
implement warnings with a full call stack because we do not have to
construct a custom backtrace with only the top.
Diffstat (limited to 'Source/cmCommandArgumentParserHelper.cxx')
-rw-r--r-- | Source/cmCommandArgumentParserHelper.cxx | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 14e9e56..15ab746 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -140,15 +140,8 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var) this->Makefile->GetHomeOutputDirectory())) { std::ostringstream msg; - cmListFileContext lfc; - cmOutputConverter converter(this->Makefile->GetStateSnapshot()); - lfc.FilePath = converter.Convert(this->FileName, - cmOutputConverter::HOME); - - lfc.Line = this->FileLine; msg << "uninitialized variable \'" << var << "\'"; - this->Makefile->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING, - msg.str(), lfc); + this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, msg.str()); } } return 0; |