Skip to content

Commit eeed606

Browse files
committed
Update tooManyConfigsError error message to prevent duplication in error message
1 parent f0866e5 commit eeed606

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/cppcheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,7 @@ void CppCheck::tooManyConfigsError(const std::string &file, const int numberOfCo
16841684
msg << "Too many #ifdef configurations - cppcheck only checks " << mSettings.maxConfigs;
16851685
if (numberOfConfigurations > mSettings.maxConfigs)
16861686
msg << " of " << numberOfConfigurations << " configurations. Use --force to check all configurations.\n";
1687-
if (file.empty())
1687+
else if (file.empty())
16881688
msg << " configurations. Use --force to check all configurations. For more details, use --enable=information.\n";
16891689
msg << "The checking of the file will be interrupted because there are too many "
16901690
"#ifdef configurations. Checking of all #ifdef configurations can be forced "

0 commit comments

Comments
 (0)