Hi all,
I've noticed in several places the pattern of adding a message to
assertions in the form of a string constant:
g_assert(condition && "explanation");
This seems dangerous to me, primarily because if anyone ever mistypes
the && as a || then the assertion becomes dead code - it will always
pass. Also (though less important):
- it doesn't really add any benefit over simply putting the message in
a comment - a developer will have to open up the code anyways to
figure out what the problem is
- it bloats the size of the binary with a couple of unnecessary string constants
Barring any objections I will convert all such assertion messages to
regular comments.
Cheers,
Evan