dhewm/dhewm3-sdk

[dantonmod] Resolve issues found by PVS studio

demoth opened this issue · 1 comments

Hi guys

This is the report of issues found by static analysis tool PVS studio.
I hope it will be helpful to identify potential and real bugs.
Run over dantonmod branch
https://docs.google.com/spreadsheets/d/1NZSJ1BfDV_ciyK0p6UvnkwAzURwMbdxChrRw4hXNpUQ/edit?usp=sharing

turol commented

I took a quick look and at least some of these are false positives caused by the analyzyer not knowing that idGameLocal::Error doesn't return.

Someone should tag that function (and others which don't return like the Error methods called by this function) with some kind of macro which expands to compiler-specific "does not return"-annotation. For GCC that is __attribute__((noreturn)). I have no idea if PVS understands it, someone check the documentation.