[libvirt] [PATCH 00/22] Resolve Coverity and build issues

John Ferlan posted 22 patches 7 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20170322142135.3421-1-jferlan@redhat.com
src/conf/netdev_bandwidth_conf.c |  2 +-
src/conf/netdev_bandwidth_conf.h |  5 ++---
src/conf/numa_conf.h             |  4 ++--
src/cpu/cpu.h                    |  3 +--
src/network/bridge_driver.c      |  2 +-
src/qemu/qemu_driver.c           |  3 +--
src/qemu/qemu_monitor.c          |  3 +--
src/qemu/qemu_monitor.h          |  8 ++++----
src/util/virbitmap.c             | 28 +++++++++++++---------------
src/util/virbitmap.h             |  6 ++----
src/util/virhostdev.c            |  9 ++++++---
src/util/virhostdev.h            | 10 +++++-----
src/util/virnetdev.h             |  2 +-
src/util/virnetdevbandwidth.h    |  3 +--
src/util/virnetdevmacvlan.h      |  2 +-
src/util/virnetdevopenvswitch.h  |  4 ++--
src/util/virnetdevvportprofile.h | 10 ++++------
src/util/virtypedparam.h         |  3 +--
tests/testutils.c                |  2 +-
tests/virbitmaptest.c            |  2 +-
20 files changed, 51 insertions(+), 60 deletions(-)
[libvirt] [PATCH 00/22] Resolve Coverity and build issues
Posted by John Ferlan 7 years ago
Hopefully the quantity doesn't scare anyone off... These are mostly
innocuous, but separated each out to appease the masses.

The first patch fixes a recently uncovered Coverity warning regarding
FORWARD_NULL of the 'formatStr'... According to an IRC response from
pkrempa the format should be set up properly in qemuDomainSnapshotPrepare

Patches 2-22 resolve various different build issues in the Coverity
environment that sets "lv_cv_static_analysis=yes" during the build.
This is 'reproducible' if one sets that as part of their autogen.sh
processing - something that we should probably do in the CI build
environment so we can get all those ATTRIBUTE_NONNULL checks to be
run on a daily basis.

John Ferlan (22):
  qemu: Always format formatStr for blockdev-snapshot-sync
  util: Remove NONNULL(1) for virNetDevGetName
  conf: Remove NONNULL(2) for virNetDevBandwidthParse
  conf: Remove NONNULL(1,2) for virNetDevBandwidthFormat
  conf: Remove NONNULL(1) for virDomainNumaGetNodeCount
  network: Remove null newBandwidth check from networkBandwidthUpdate
  qemu: Remove non null 'vm' check from qemuMonitorOpen
  qemu: Remove NONNULL(1) for qemu_monitor prototypes
  util: Change return argument for virBitmapParseUnlimited
  util: Remove NONNULL(1) for virBitmapParseUnlimited
  util: Remove NONNULL(2,3) for virHostdevReAttachPCIDevices
  util: Remove NONNULL(2,3) for virHostdevReAttachUSBDevices
  util: Remove NONNULL(2,3) for virHostdevReAttachSCSIVHostDevices
  util: Remove NONNULL(1) for virHostdevPrepareDomainDevices
  util: Remove NONNULL(1) for virHostdevReAttachDomainDevices
  util: Remove NONNULL(1) for virNetDevOpenvswitchSetMigrateData
  util: Remove NONNULL(1,3,4) from virTypedParamsFilter
  util: Remove NONNULL(2) for virNetDevBandwidthPlug
  util: Remove NONNULL(1) for virNetDevOpenvswitchGetVhostuserIfname
  util: Remove NONNULL's for
    virNetDevVPortProfile[Associate|Disassociate]
  util: Remove NONNULL(1) for virNetDevMacVLanDeleteWithVPortProfile
  cpu: Remove NONNULL(1) for cpuBaseline

 src/conf/netdev_bandwidth_conf.c |  2 +-
 src/conf/netdev_bandwidth_conf.h |  5 ++---
 src/conf/numa_conf.h             |  4 ++--
 src/cpu/cpu.h                    |  3 +--
 src/network/bridge_driver.c      |  2 +-
 src/qemu/qemu_driver.c           |  3 +--
 src/qemu/qemu_monitor.c          |  3 +--
 src/qemu/qemu_monitor.h          |  8 ++++----
 src/util/virbitmap.c             | 28 +++++++++++++---------------
 src/util/virbitmap.h             |  6 ++----
 src/util/virhostdev.c            |  9 ++++++---
 src/util/virhostdev.h            | 10 +++++-----
 src/util/virnetdev.h             |  2 +-
 src/util/virnetdevbandwidth.h    |  3 +--
 src/util/virnetdevmacvlan.h      |  2 +-
 src/util/virnetdevopenvswitch.h  |  4 ++--
 src/util/virnetdevvportprofile.h | 10 ++++------
 src/util/virtypedparam.h         |  3 +--
 tests/testutils.c                |  2 +-
 tests/virbitmaptest.c            |  2 +-
 20 files changed, 51 insertions(+), 60 deletions(-)

-- 
2.9.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 00/22] Resolve Coverity and build issues
Posted by Martin Kletzander 7 years ago
On Wed, Mar 22, 2017 at 10:21:13AM -0400, John Ferlan wrote:
>Hopefully the quantity doesn't scare anyone off... These are mostly
>innocuous, but separated each out to appease the masses.
>
>The first patch fixes a recently uncovered Coverity warning regarding
>FORWARD_NULL of the 'formatStr'... According to an IRC response from
>pkrempa the format should be set up properly in qemuDomainSnapshotPrepare
>
>Patches 2-22 resolve various different build issues in the Coverity
>environment that sets "lv_cv_static_analysis=yes" during the build.
>This is 'reproducible' if one sets that as part of their autogen.sh
>processing - something that we should probably do in the CI build
>environment so we can get all those ATTRIBUTE_NONNULL checks to be
>run on a daily basis.
>

I was using that and I had some issues that were about more than just a
build issue.  Trying it now, it cleanly says it just needs some fixes
for the NUNNULL parameters.  That's nice.  With optimizations this
series might even fix things, let's see =)

ACK to this series.
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list