Feature #1997
openImprove error check at compilation time
0%
Description
I recently fixed a crash which was originated by a function expected to return a pointer and actually missing an explicit return in a specific code path instead of returning NULL.
IMHO this should enable compilation flags to at least have warning about this kind of error to avoid running into similar issues in the future (and we may actually find there are still similar issues nowadays).
It should at least print a warning message at compile time (-Wreturn-type ?), but I think the best would be to treat those cases as errors by default (-Werror), so that we keep the code clean and we then care about the issues printed by the compiler. Other kind of similar checks would be also welcome.
As far as I know, there's some part at least in osmo-iuh which is auto-generated and may print lots of warnings which we cannot fix. I guess in this case we can apply different CFLAGS to that specific set of files which is more relaxed to avoid lots of garbage warnings.