From 0a7a4a9d5524210e25782681f8c2bf2cf626c851 Mon Sep 17 00:00:00 2001 From: Reijo Tomperi Date: Sun, 26 Jul 2009 23:15:29 +0300 Subject: [PATCH] Update to ticket #265 (Log a warning when an include file is not found) Only warn about "foo.h", don't warn about http://sourceforge.net/apps/trac/cppcheck/ticket/265 --- src/preprocessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/preprocessor.cpp b/src/preprocessor.cpp index 4259e8876..b8174298c 100644 --- a/src/preprocessor.cpp +++ b/src/preprocessor.cpp @@ -1081,9 +1081,9 @@ void Preprocessor::handleIncludes(std::string &code, const std::string &filename } else { - if (_errorLogger && _settings && _settings->_verbose) + if (headerType == 1 && _errorLogger && _settings && _settings->_verbose) { - _errorLogger->reportOut("Include file: \"" + paths.back() + filename + "\" not found."); + _errorLogger->reportOut("Include file: \"" + filename + "\" not found."); } } }