Commit 3f12ca57 authored by Philip Withnall's avatar Philip Withnall

gtestutils: Clarify that g_assert() should not have side effects

g_assert() gets completely compiled out if G_DISABLE_ASSERT is defined,
so applications should not depend on side effects of the expression in
an assertion.
parent 4607bd37
......@@ -380,7 +380,8 @@
* an error message is logged and the application is terminated.
*
* The macro can be turned off in final releases of code by defining
* `G_DISABLE_ASSERT` when compiling the application.
* `G_DISABLE_ASSERT` when compiling the application, so code must
* not depend on any side effects from @expr.
*/
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment