Latest cppcheck (2.7) complains about a redundant null pointer check. And it's actually correct. However, the redundancy is hidden inside a macro call. It is not unusual to have a general purpose macro (with additional safety checks) and there is little that can be done to avoid this redundancy when such macros are involved.
Please consider the following stripped down C code snippet I extracted from a real world program:
Latest cppcheck (2.7) complains about a redundant null pointer check. And it's actually correct. However, the redundancy is hidden inside a macro call. It is not unusual to have a general purpose macro (with additional safety checks) and there is little that can be done to avoid this redundancy when such macros are involved.
Please consider the following stripped down C code snippet I extracted from a real world program: