fenugrec / freediag

OBD2 scantool
GNU General Public License v3.0
329 stars 73 forks source link

use of assert() : move to always-enabled DIAG_ASSERT ? #72

Open fenugrec opened 3 years ago

fenugrec commented 3 years ago

Follow-up to discussion in PR https://github.com/fenugrec/freediag/pull/71 , as well as issue #68 .

There's already some use of assert() throughout the codebase, but there could be more - for instance more argument validation (such as calling diag_l0_send with len == 0), etc.

To have those always-enabled (regardless of NDEBUG), it could be a better idea to use a new macro or wrapper func with our own assert implementation.