gamemode icon indicating copy to clipboard operation
gamemode copied to clipboard

Completion of error handling

Open elfring opened this issue 6 years ago • 5 comments

Would you like to add more error handling for return values from functions like the following?

elfring avatar Mar 17 '19 17:03 elfring

It'll be worth giving the code a once over to make sure we're checking return values when it's appropriate and graceful recovery is possible.

Realistically, with the examples you've given, there's not much we can do except "exit immediately" if those particular functions return errors.

afayaz-feral avatar Jul 17 '20 16:07 afayaz-feral

How do you think about to improve static source code analysis also for this software?

elfring avatar Jul 17 '20 16:07 elfring

https://www.github.com/FeralInteractive/gamemode/tree/master/scripts%2Fstatic-analyser-check.sh already has static analysis implemented

mdiluz avatar Jul 17 '20 16:07 mdiluz

Does a combination of analysis tools point any remaining open issues out?

elfring avatar Jul 17 '20 16:07 elfring

I ran this check just now and got nothing but false positives. A few instances of "Called function pointer is null (null dereference)".

These all came from the fact that the analyzer assumes that internal_load_libgamemode() will return successfully but it doesn't take into account that the only way it can return successfully is if its managed to set global function pointers.

afayaz-feral avatar Jul 17 '20 18:07 afayaz-feral