[PATCH 0/2] Remove static analysis cruft

Peter Krempa posted 2 patches 2 years, 11 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1621506221.git.pkrempa@redhat.com
src/conf/domain_conf.c               | 13 -------------
src/conf/virdomainobjlist.c          |  2 --
src/conf/virnwfilterbindingobjlist.c |  1 -
src/cpu/cpu_x86.c                    |  1 -
src/libxl/libxl_driver.c             |  9 ---------
src/qemu/qemu_command.c              |  2 --
src/qemu/qemu_driver.c               |  2 --
src/qemu/qemu_monitor.c              |  3 ---
src/qemu/qemu_process.c              |  2 --
src/remote/remote_driver.c           |  1 -
src/rpc/virnetserver.c               |  4 ----
src/storage/parthelper.c             |  2 --
src/util/vircommand.c                |  3 ---
src/util/virconf.c                   |  6 ------
src/util/virhostmem.c                |  2 --
src/util/virnetdev.c                 |  1 -
src/util/virobject.c                 |  1 -
src/util/virprocess.c                |  1 -
src/util/virutil.c                   |  3 ---
tests/commandtest.c                  |  2 --
tests/virdrivermoduletest.c          |  1 -
tools/virsh.c                        |  1 -
tools/virt-admin.c                   |  1 -
tools/vsh.c                          |  1 -
24 files changed, 65 deletions(-)
[PATCH 0/2] Remove static analysis cruft
Posted by Peter Krempa 2 years, 11 months ago
Remove comments for silencing coverity and static assers which are no
longer needed.

CI pipelines:

Yesterday's all-green:

https://gitlab.com/pipo.sk/libvirt/-/pipelines/305953275

New run started when I've rebased this to current master:

https://gitlab.com/pipo.sk/libvirt/-/pipelines/306458103

Peter Krempa (2):
  Drop magic comments for coverity
  Remove static analysis assertions

 src/conf/domain_conf.c               | 13 -------------
 src/conf/virdomainobjlist.c          |  2 --
 src/conf/virnwfilterbindingobjlist.c |  1 -
 src/cpu/cpu_x86.c                    |  1 -
 src/libxl/libxl_driver.c             |  9 ---------
 src/qemu/qemu_command.c              |  2 --
 src/qemu/qemu_driver.c               |  2 --
 src/qemu/qemu_monitor.c              |  3 ---
 src/qemu/qemu_process.c              |  2 --
 src/remote/remote_driver.c           |  1 -
 src/rpc/virnetserver.c               |  4 ----
 src/storage/parthelper.c             |  2 --
 src/util/vircommand.c                |  3 ---
 src/util/virconf.c                   |  6 ------
 src/util/virhostmem.c                |  2 --
 src/util/virnetdev.c                 |  1 -
 src/util/virobject.c                 |  1 -
 src/util/virprocess.c                |  1 -
 src/util/virutil.c                   |  3 ---
 tests/commandtest.c                  |  2 --
 tests/virdrivermoduletest.c          |  1 -
 tools/virsh.c                        |  1 -
 tools/virt-admin.c                   |  1 -
 tools/vsh.c                          |  1 -
 24 files changed, 65 deletions(-)

-- 
2.31.1

Re: [PATCH 0/2] Remove static analysis cruft
Posted by Pavel Hrdina 2 years, 11 months ago
On Thu, May 20, 2021 at 12:26:22PM +0200, Peter Krempa wrote:
> Remove comments for silencing coverity and static assers which are no
> longer needed.
> 
> CI pipelines:
> 
> Yesterday's all-green:
> 
> https://gitlab.com/pipo.sk/libvirt/-/pipelines/305953275
> 
> New run started when I've rebased this to current master:
> 
> https://gitlab.com/pipo.sk/libvirt/-/pipelines/306458103
> 
> Peter Krempa (2):
>   Drop magic comments for coverity
>   Remove static analysis assertions

I have no objection to this patches but I would way if others have
different opinion.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Re: [PATCH 0/2] Remove static analysis cruft
Posted by Michal Prívozník 2 years, 11 months ago
On 5/20/21 12:26 PM, Peter Krempa wrote:
> Remove comments for silencing coverity and static assers which are no
> longer needed.
> 
> CI pipelines:
> 
> Yesterday's all-green:
> 
> https://gitlab.com/pipo.sk/libvirt/-/pipelines/305953275
> 
> New run started when I've rebased this to current master:
> 
> https://gitlab.com/pipo.sk/libvirt/-/pipelines/306458103
> 
> Peter Krempa (2):
>   Drop magic comments for coverity
>   Remove static analysis assertions
> 
>  src/conf/domain_conf.c               | 13 -------------
>  src/conf/virdomainobjlist.c          |  2 --
>  src/conf/virnwfilterbindingobjlist.c |  1 -
>  src/cpu/cpu_x86.c                    |  1 -
>  src/libxl/libxl_driver.c             |  9 ---------
>  src/qemu/qemu_command.c              |  2 --
>  src/qemu/qemu_driver.c               |  2 --
>  src/qemu/qemu_monitor.c              |  3 ---
>  src/qemu/qemu_process.c              |  2 --
>  src/remote/remote_driver.c           |  1 -
>  src/rpc/virnetserver.c               |  4 ----
>  src/storage/parthelper.c             |  2 --
>  src/util/vircommand.c                |  3 ---
>  src/util/virconf.c                   |  6 ------
>  src/util/virhostmem.c                |  2 --
>  src/util/virnetdev.c                 |  1 -
>  src/util/virobject.c                 |  1 -
>  src/util/virprocess.c                |  1 -
>  src/util/virutil.c                   |  3 ---
>  tests/commandtest.c                  |  2 --
>  tests/virdrivermoduletest.c          |  1 -
>  tools/virsh.c                        |  1 -
>  tools/virt-admin.c                   |  1 -
>  tools/vsh.c                          |  1 -
>  24 files changed, 65 deletions(-)
> 

So how are we supposed to deal with Coverity false positives? I know
that we are not happy to change our code esp. to silence a false
positive on some "random" tool.

Anyway, changes make sense:

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal