Skip to content

Commit a25cb53

Browse files
committed
cppcheck-opensource#5751 - Warning unhandledExceptionSpecification is issued even if warnings are not enabled
1 parent e48550d commit a25cb53

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/checkexceptionsafety.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ void CheckExceptionSafety::nothrowThrows()
261261
//--------------------------------------------------------------------------
262262
void CheckExceptionSafety::unhandledExceptionSpecification()
263263
{
264+
if (!_settings->isEnabled("warning"))
265+
return;
266+
264267
const SymbolDatabase* const symbolDatabase = _tokenizer->getSymbolDatabase();
265268

266269
const std::size_t functions = symbolDatabase->functionScopes.size();

0 commit comments

Comments
 (0)