From d6ef44c73e21e0e1a53f00264c4ab5b36f4e3ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 27 Jan 2009 07:21:52 +0000 Subject: [PATCH] sprintf overlapping data --- src/checkother.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/checkother.cpp b/src/checkother.cpp index 0c71af870..2ece51ead 100644 --- a/src/checkother.cpp +++ b/src/checkother.cpp @@ -360,9 +360,9 @@ void CheckOther::InvalidFunctionUsage() if (parlevel < 0) break; } - else if (parlevel == 0 && tok2->varId() == varid) + else if (parlevel == 0 && Token::Match(tok2, ", %varid% [,)]", varid)) { - _errorLogger->reportErr(ErrorMessage::sprintfOverlappingData(_tokenizer, tok2, _settings, tok2->str())); + _errorLogger->reportErr(ErrorMessage::sprintfOverlappingData(_tokenizer, tok2->next(), _settings, tok2->next()->str())); break; } }