mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Ever since commit eefb881, ATTRIBUTE_NONNULL has normally been a no-op under gcc (since it tends to cause more bugs than it cures given gcc's current lame implementation of the attribute). However, the macro is still useful to Coverity and other static-analysis tools, but only if we use it correctly. Coverity follows gcc's lead in accepting function declarations with attributes at the end, but function bodies must attach attributes to the return type. That is, these are valid: void foo(void *arg) ATTRIBUTE_NONNULL(1); void ATTRIBUTE_NONNULL(1) foo(void *arg); void ATTRIBUTE_NONNULL(1) foo(void *arg) {} but this is not: void foo(void *arg) ATTRIBUTE_NONNULL(1) {} even though you don't get a compile failure until you do static analysis. Bug introduced in commit 80533ca, with these symptoms: nodeinfo.c:206: error: expected ',' or ';' before '{' token cc1: warning: unrecognized command line option "-Wno-suggest-attribute=const" cc1: warning: unrecognized command line option "-Wno-suggest-attribute=pure" make[3]: *** [libvirt_driver_la-nodeinfo.lo] Error 1 * src/nodeinfo.c (virNodeParseNode): Fix syntax error when non-null attribute is in use.
LibVirt : simple API for virtualization Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). It is free software available under the GNU Lesser General Public License. Virtualization of the Linux Operating System means the ability to run multiple instances of Operating Systems concurrently on a single hardware system where the basic resources are driven by a Linux instance. The library aim at providing long term stable C API initially for the Xen paravirtualization but should be able to integrate other virtualization mechanisms if needed. Daniel Veillard <veillard@redhat.com>
Description
Libvirt provides a portable, long term stable C API for managing the
virtualization technologies provided by many operating systems. It
includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware
vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER
Hypervisor.
Languages
C
95.1%
Python
2%
Meson
0.9%
Shell
0.6%
Perl
0.5%
Other
0.8%