Coverity Unchecked Return Value Issues
Gedare Bloom
gedare at rtems.org
Mon Feb 8 18:38:48 UTC 2021
On Mon, Feb 8, 2021 at 11:24 AM Joel Sherrill <joel at 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.
> (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 at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210208/3cbe8cac/attachment.html>
More information about the devel
mailing list