I am testing the last version of cppcheck, and it warned about this part of parsewatchvalue.cpp:
if (!class_line.IsValid()) { int *p = NULL; *p = 0; } else { if (!class_line.Matches(wxT(" +0x000 a : 10"))) { int *p = NULL; *p = 0; } }
I do not understand the object of this assignments, they will raise an exception.
I guess these are the poor man asserts. If I remember correctly there we're cases where the regexp engine didn't support the given expression and this code tests if it actually works. :) I suppose it could be written in a bit better way by logging some message.
It is low severity and I'm not sure I'll spend time doing it.
I guess a better way would be to simply use wxASSERT here instead.
@fuscated?
Like this:
Last edit: Morten MacFly 2020-12-29
Or cbAssert...
Hehe... sure. :-)