coverity: fix multiple source code parse errors
Coverity scans the source code for static analysis, but its parser has a couple of flaws... The most common one is the failure to parse deprecation macros in enum definitions, like: ``` G_PARAM_PRIVATE GLIB_DEPRECATED_ENUMERATOR_IN_2_26 = G_PARAM_STATIC_NAME, ^ SD_JOURNAL_SYSTEM_ONLY _sd_deprecated_ = SD_JOURNAL_SYSTEM /* old name */ ^ ``` but also recent gcc built-in macros, like: ``` #if __has_builtin(__builtin_is_constant_evaluated) ^ #if _GLIBCXX_HAS_BUILTIN(__has_unique_object_representations) ^ ``` The solution is to replace the code with regular expressions at an earlier stage. This can be configured directly in coverity with cov-configure
Loading
Please register or sign in to comment