Menu

#26 Use do { } while (0) in macroses

Unstable_(example)
open
nobody
None
1
2015-10-20
2015-10-20
No

All the CUnit test macroses should use do { } while (0) construction to prevent compiler errors like in this case:

if (something)
  CU_ASSERT(test1);
else
  CU_ASSERT(test2);
1 Attachments

Discussion

Anonymous
Anonymous

Add attachments
Cancel