utils/macros.h: Add `MUST_CHECK', so return codes aren't ignored.
[mLib] / utils / macros.3
index f5dac97..d481a47 100644 (file)
@@ -30,6 +30,7 @@ macros \- useful macros
 .\" @DEPRECATED
 .\" @EXECL_LIKE
 .\" @IGNORABLE
+.\" @MUST_CHECK
 .\" @NORETURN
 .\" @PRINTF_LIKE
 .\" @SCANF_LIKE
@@ -74,6 +75,7 @@ macros \- useful macros
 .BI "DEPRECATED(" msg ")"
 .BI "EXECL_LIKE(" ntrail ")"
 .BI "IGNORABLE"
+.BI "MUST_CHECK"
 .BI "NORETURN"
 .BI "PRINTF_LIKE(" fmt-index ", " arg-index ")"
 .BI "SCANF_LIKE(" fmt-index ", " arg-index ")"
@@ -193,6 +195,12 @@ need not be used.  This may muffle warnings about leaving the marked
 definition unused.
 .PP
 A function marked as
+.B MUST_CHECK
+returns an important value: a warning may be issued if a caller
+ignores the value.  The return type must not be
+.BR void .
+.PP
+A function marked as
 .B NORETURN
 must not return.  It must have return type
 .BR void .