[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 3/3] xen/cppcheck: globally suppress unusedStructMember



On Fri, 3 Mar 2023, Luca Fancellu wrote:
> unusedStructMember warnings from cppcheck are not reliable and
> are causing a lot of false positives, suppress the checker
> globally for now.
> 
> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>

Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>

This is great! Results are much cleaner. With this series accepted, I
think we can start looking into how to "diff" cppcheck results to spot
regressions in new patches.


> ---
> Changes from v2:
>  - New patch
> ---
>  xen/scripts/xen_analysis/cppcheck_analysis.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/xen/scripts/xen_analysis/cppcheck_analysis.py 
> b/xen/scripts/xen_analysis/cppcheck_analysis.py
> index e385e2c8f54a..ab52ce38d502 100644
> --- a/xen/scripts/xen_analysis/cppcheck_analysis.py
> +++ b/xen/scripts/xen_analysis/cppcheck_analysis.py
> @@ -133,6 +133,8 @@ def generate_cppcheck_deps():
>      # - Explicitly suppress warnings on compiler-def.h because cppcheck 
> throws
>      #   an unmatchedSuppression due to the rule we put in 
> suppression-list.txt
>      #   to skip every finding in the file.
> +    # - Explicitly suppress findings for unusedStructMember that is not very
> +    #   reliable and causes lots of false positives.
>      #
>      # Compiler defines are in compiler-def.h which is included in config.h
>      #
> @@ -145,6 +147,7 @@ def generate_cppcheck_deps():
>   --inline-suppr
>   --suppressions-list={}/suppression-list.txt
>   --suppress='unmatchedSuppression:*'
> + --suppress='unusedStructMember:*'
>   --include={}/include/xen/config.h
>   -DCPPCHECK
>  """.format(settings.outdir, CPPCHECK_BUILD_DIR, settings.xen_dir,
> -- 
> 2.34.1
> 



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.