On Mon, Feb 8, 2021 at 12:39 PM Gedare Bloom <ged...@rtems.org> wrote:
> > > On Mon, Feb 8, 2021 at 11:24 AM Joel Sherrill <j...@rtems.org> wrote: > >> Hi >> >> There are more than a couple of these. in our set of CIDs. I am wondering >> if these can be addressed with a macro like this: >> >> #define _IGNORED_RETURN_STATUS(_status, _ok) \ >> do { \ >> _Assert((_status) == (_ok)); \ >> > > Can you also pass the comparison? I guess it would usually be ==, but it > could be != sometimes? I think that is the main challenge here. > How about 2 macro names? One for positive and one for negative _IGNORE_RETURN_STATUS_EQ _IGNORE_RETURN_STATUS_NEQ Or even _Assert_Return_status_eq and _neq. I'd like these to be candidates for our internal assert.h It will end up being three arguments otherwise. It would be nice to keep it reliably to one line. > > >> (void) (_status); >> } while (0); >> >> Or _Assert_Ignored_return? >> >> The ones I have looked at, the return value should always be successful >> but there isn't any reason we can't be defensive about them. >> >> Thoughts. >> >> --joel >> _______________________________________________ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel > >
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel