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?