How can I use C ++ code to find all unused return values?

I would like to statically check all calls to non-void functions where the return value is not used.

In essence, this will be similar to applying __attribute__ ((warn_unused_result))to all non-void functions, but, of course, for a large project that is not practical to do.

Is there any static analysis tool that can provide this information?

+6
source share

Source: https://habr.com/ru/post/1017026/


All Articles