cppcheck reports: style: Argument '(void*)p' to function Free is always 1 [constArgument]
If the (admittedly unnecessary) void pointer cast is removed from the Free() call, it disappears.
Used cppcheck version is 1.89.
Older version 1.77 did not report this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I couldn't understand this so I'm reporting it.
cppcheck reports: style: Argument '(void*)p' to function Free is always 1 [constArgument]
If the (admittedly unnecessary) void pointer cast is removed from the Free() call, it disappears.
Used cppcheck version is 1.89.
Older version 1.77 did not report this.
I think this is fixed on the latest master on cppcheck. I think this is related to:
https://trac.cppcheck.net/ticket/9332
In the latest, cppcheck we no longer set non-null pointers to
1
(which is what caused this error).