Skip to content

Implement G_ANALYZER_NORETURN for Coverity

Michael Catanzaro requested to merge mcatanzaro/coverity-noreturn into master

This change is proposed by Kamil Dudka. It teaches Coverity to assume that g_critical() will never return, which is desirable for the same reasons it is for scan-build: once you've triggered undefined behavior, the game is already lost, and there's limited benefit from trying to avoid every possible memory leak on such codepaths. Notably, this affects g_return_if_fail().

Arguably it might be desirable to fix every such issue, but if we're already not doing so for scan-build, it doesn't make sense to hold developers working with Coverity to a higher standard. This allows focusing on more serious issues found by Coverity.

Thanks Kamil!

Merge request reports