From a25cb53c192495a8407fae8e642bce6e9902a9ee Mon Sep 17 00:00:00 2001 From: Alexander Mai Date: Wed, 30 Apr 2014 19:33:17 +0200 Subject: [PATCH] #5751 - Warning unhandledExceptionSpecification is issued even if warnings are not enabled --- lib/checkexceptionsafety.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/checkexceptionsafety.cpp b/lib/checkexceptionsafety.cpp index 09d0589cb..ac6fc8707 100644 --- a/lib/checkexceptionsafety.cpp +++ b/lib/checkexceptionsafety.cpp @@ -261,6 +261,9 @@ void CheckExceptionSafety::nothrowThrows() //-------------------------------------------------------------------------- void CheckExceptionSafety::unhandledExceptionSpecification() { + if (!_settings->isEnabled("warning")) + return; + const SymbolDatabase* const symbolDatabase = _tokenizer->getSymbolDatabase(); const std::size_t functions = symbolDatabase->functionScopes.size();