libvirt/src
Boris Fiuczynski ae8a83c353 storage: avoid maybe-uninitialized warning by GCC 10
GCC 10 complains about variables may be used uninitialized.
Even though it might be false positives, we can easily avoid them.

Avoiding
 ../src/storage/storage_backend_iscsi_direct.c:634:11: error: ‘nb_block’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   634 |     while (lba < nb_block) {
       |           ^
 ../src/storage/storage_backend_iscsi_direct.c:619:14: note: ‘nb_block’ was declared here
   619 |     uint64_t nb_block;
       |              ^~~~~~~~
 ../src/storage/storage_backend_iscsi_direct.c:637:16: error: ‘block_size’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   637 |         task = iscsi_write16_sync(iscsi, lun, lba, data,
       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   638 |                                   block_size * to_write,
       |                                   ~~~~~~~~~~~~~~~~~~~~~~
   639 |                                   block_size, 0, 0, 0, 0, 0);
       |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~
 ../src/storage/storage_backend_iscsi_direct.c:618:14: note: ‘block_size’ was declared here
   618 |     uint32_t block_size;
       |              ^~~~~~~~~~
 ../src/storage/storage_backend_iscsi_direct.c: In function ‘virStorageBackendISCSIDirectRefreshPool’:
 ../src/storage/storage_backend_iscsi_direct.c:320:39: error: ‘nb_block’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   320 |     vol->target.capacity = block_size * nb_block;
       |                            ~~~~~~~~~~~^~~~~~~~~~
 ../src/storage/storage_backend_iscsi_direct.c:306:14: note: ‘nb_block’ was declared here
   306 |     uint64_t nb_block;
       |              ^~~~~~~~
 ../src/storage/storage_backend_iscsi_direct.c:320:39: error: ‘block_size’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   320 |     vol->target.capacity = block_size * nb_block;
       |                            ~~~~~~~~~~~^~~~~~~~~~
 ../src/storage/storage_backend_iscsi_direct.c:305:14: note: ‘block_size’ was declared here
   305 |     uint32_t block_size;
       |              ^~~~~~~~~~

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2020-08-17 08:25:28 +02:00
..
access meson: src/access: add check-aclperms test 2020-08-03 09:27:05 +02:00
admin meson: src: add check-admin-drivername test 2020-08-03 09:27:05 +02:00
bhyve bhyve: fix NULL pointer check position 2020-08-11 21:49:54 +02:00
conf conf: fix detection of available host CPUs for vcpupin 2020-08-08 11:07:02 +02:00
cpu Use g_strfeev instead of virStringFreeList 2020-08-03 15:37:36 +02:00
cpu_map meson: src: install cpu_map data 2020-08-03 09:27:04 +02:00
esx meson: tests: add ESX specific tests 2020-08-03 09:27:05 +02:00
hyperv hyperv: include virxml.h 2020-08-03 15:30:40 +02:00
hypervisor Remove redundant conditions 2020-08-03 15:19:28 +02:00
interface meson: src: add check-aclrules test 2020-08-03 09:27:05 +02:00
keycodemapdb@27acf0ef82
libxl conf: fix detection of available host CPUs for vcpupin 2020-08-08 11:07:02 +02:00
locking meson: src: add check*protocol tests 2020-08-03 09:27:05 +02:00
logging src/logging: no need to include log_protocol.h in log_manager.h 2020-08-04 13:28:22 +02:00
lxc Use g_strfeev instead of virStringFreeList 2020-08-03 15:37:36 +02:00
network network: Use single quotes in default network configuration 2020-08-04 15:12:18 +02:00
node_device meson: src: add check-aclrules test 2020-08-03 09:27:05 +02:00
nwfilter meson: src: add check-aclrules test 2020-08-03 09:27:05 +02:00
openvz meson: src: build libvirt.so library 2020-08-03 09:27:04 +02:00
qemu qemu: avoid maybe-uninitialized warning by GCC 10 2020-08-17 08:25:28 +02:00
remote remote: remove duplicated header 2020-08-04 13:28:19 +02:00
rpc util: keep track of full GSource object not source ID number 2020-08-07 12:43:56 +01:00
secret meson: src: add check-aclrules test 2020-08-03 09:27:05 +02:00
security apparmor: fix code style error in reduced if statement 2020-08-13 15:39:26 +02:00
storage storage: avoid maybe-uninitialized warning by GCC 10 2020-08-17 08:25:28 +02:00
test test: fix emulator pin info in test driver 2020-08-08 11:07:15 +02:00
util vircgroupv2devices: fix counting entries in BPF map 2020-08-11 15:11:15 +02:00
vbox Use g_strfeev instead of virStringFreeList 2020-08-03 15:37:36 +02:00
vmware meson: src: build libvirt.so library 2020-08-03 09:27:04 +02:00
vmx meson: src: build libvirt.so library 2020-08-03 09:27:04 +02:00
vz Use g_strfeev instead of virStringFreeList 2020-08-03 15:37:36 +02:00
admin_protocol-structs
datatypes.c
datatypes.h define g_autoptr cleanup function for virNetworkDHCPLease 2020-07-20 19:08:07 -04:00
driver-hypervisor.h
driver-interface.h
driver-network.h
driver-nodedev.h
driver-nwfilter.h
driver-secret.h
driver-state.h
driver-storage.h
driver-stream.h
driver.c meson: remove '.libs' from all relevant paths 2020-08-03 09:27:00 +02:00
driver.h
internal.h
libvirt_driver_modules.syms
libvirt_esx.syms
libvirt_internal.h
libvirt_libssh2.syms
libvirt_libssh.syms
libvirt_linux.syms
libvirt_lxc.syms
libvirt_openvz.syms
libvirt_private.syms util: delete virStringListFree 2020-08-03 15:37:36 +02:00
libvirt_probes.d
libvirt_public.syms
libvirt_qemu.syms
libvirt_remote.syms
libvirt_sasl.syms
libvirt_vmware.syms
libvirt_vmx.syms
libvirt-domain-checkpoint.c
libvirt-domain-snapshot.c
libvirt-domain.c src: add missing balloon stats docs 2020-07-28 17:31:53 +02:00
libvirt-host.c
libvirt-interface.c
libvirt-lxc.c Substitute security_context_t with char * 2020-07-15 14:31:07 +02:00
libvirt-lxc.pc.in meson: remove '.libs' from all relevant paths 2020-08-03 09:27:00 +02:00
libvirt-network.c
libvirt-nodedev.c
libvirt-nwfilter.c
libvirt-qemu.c
libvirt-qemu.pc.in meson: remove '.libs' from all relevant paths 2020-08-03 09:27:00 +02:00
libvirt-secret.c
libvirt-storage.c
libvirt-stream.c
libvirt.c
libvirt.conf
libvirt.pc.in meson: remove '.libs' from all relevant paths 2020-08-03 09:27:00 +02:00
lock_protocol-structs
lxc_monitor_protocol-structs
lxc_protocol-structs
meson.build meson: docs: build hvsupport.html 2020-08-03 09:27:06 +02:00
qemu_protocol-structs
README
remote_protocol-structs
virkeepaliveprotocol-structs
virnetprotocol-structs

       libvirt library code README
       ===========================

The directory provides the bulk of the libvirt codebase. Everything
except for the libvirtd daemon and client tools. The build uses a
large number of libtool convenience libraries - one for each child
directory, and then links them together for the final libvirt.so,
although some bits get linked directly to libvirtd daemon instead.

The files directly in this directory are supporting the public API
entry points & data structures.

There are two core shared modules to be aware of:

 * util/  - a collection of shared APIs that can be used by any
            code. This directory is always in the include path
            for all things built

 * conf/  - APIs for parsing / manipulating all the official XML
            files used by the public API. This directory is only
            in the include path for driver implementation modules

 * vmx/   - VMware VMX config handling (used by esx/ and vmware/)


Then there are the hypervisor implementations:

 * bhyve         - bhyve - The BSD Hypervisor
 * esx/          - VMware ESX and GSX support using vSphere API over SOAP
 * hyperv/       - Microsoft Hyper-V support using WinRM
 * lxc/          - Linux Native Containers
 * openvz/       - OpenVZ containers using cli tools
 * qemu/         - QEMU / KVM using qemu CLI/monitor
 * remote/       - Generic libvirt native RPC client
 * test/         - A "mock" driver for testing
 * vbox/         - Virtual Box using native API
 * vmware/       - VMware Workstation and Player using the vmrun tool
 * xen/          - Xen using hypercalls, XenD SEXPR & XenStore


Finally some secondary drivers that are shared for several HVs.
Currently these are used by LXC, OpenVZ, QEMU and Xen drivers.
The ESX, Hyper-V, Remote, Test & VirtualBox drivers all
implement the secondary drivers directly

 * cpu/          - CPU feature management
 * interface/    - Host network interface management
 * network/      - Virtual NAT networking
 * nwfilter/     - Network traffic filtering rules
 * node_device/  - Host device enumeration
 * secret/       - Secret management
 * security/     - Mandatory access control drivers
 * storage/      - Storage management drivers


Since both the hypervisor and secondary drivers can be built as
dlopen()able modules, it is *FORBIDDEN* to have build dependencies
between these directories. Drivers are only allowed to depend on
the public API, and the internal APIs in the util/ and conf/
directories