I wish to retrigger a Windows timer using a VCL6 TTimer
object. I'm doing this by toggling the Enabled
property, this of course can be confusing, but I added a comment about this. For Cppcheck I added a comment as well in its language:
m_pTimer->Enabled = false;
// die "doppelte Zuweisung" sorgt für einen Neustart des Timers
// cppcheck-suppress redundantAssignment
m_pTimer->Enabled = true;
...but it obviously doesn't help, I still see this style warning:
Variable 'Enabled' is reassigned a value before the old one has been used.
What am I doing wrong?
For the command line version inline suppressions must be enabled through the command line switch
--inline-suppr
. For details refer to the manual.For the GUI version you have to activate inline suppressions through the preferences dialog (Menu Edit->Preferences, tab General, Enable inline suppressions).