tree-wide: avoid uninitialized warning on _cleanup_ variables
authorLuca Boccassi <luca.boccassi@microsoft.com>
Mon, 12 Apr 2021 22:10:21 +0000 (23:10 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 6 May 2021 12:51:07 +0000 (14:51 +0200)
commit1b3c650270a3d3ab099483deef31b8e08cbdd211
tree9ea677e8154591ac432949b9db2f7da91c6e41e9
parent074475abc1d6187de88b77dcc4fe0c4d2ab804f5
tree-wide: avoid uninitialized warning on _cleanup_ variables

With some versions of the compiler, the _cleanup_ attr makes it think
the variable might be freed/closed when uninitialized, even though it
cannot happen. The added cost is small enough to be worth the benefit,
and optimized builds will help reduce it even further.

(cherry picked from commit c2b2df604b845b4e1697d0911935e6644323c5a6)
60 files changed:
src/activate/activate.c
src/basic/efivars.c
src/basic/path-lookup.c
src/basic/terminal-util.c
src/basic/time-util.c
src/boot/bless-boot.c
src/boot/bootctl.c
src/boot/efi/boot.c
src/boot/efi/stub.c
src/boot/efi/util.c
src/busctl/busctl.c
src/core/dbus-execute.c
src/core/dbus-path.c
src/core/execute.c
src/core/job.c
src/core/main.c
src/core/manager.c
src/core/namespace.c
src/core/service.c
src/core/unit.c
src/coredump/coredump.c
src/coredump/coredumpctl.c
src/cryptsetup/cryptsetup-keyfile.c
src/environment-d-generator/environment-d-generator.c
src/fstab-generator/fstab-generator.c
src/journal-remote/journal-gatewayd.c
src/journal-remote/journal-remote.c
src/journal/journalctl.c
src/journal/journald-stream.c
src/libsystemd-network/fuzz-dhcp6-client.c
src/libsystemd/sd-journal/journal-vacuum.c
src/libsystemd/sd-journal/sd-journal.c
src/libsystemd/sd-login/sd-login.c
src/locale/keymap-util.c
src/locale/localed.c
src/login/logind-core.c
src/login/logind-dbus.c
src/login/logind-session.c
src/machine/machine.c
src/network/netdev/tuntap.c
src/network/wait-online/wait-online.c
src/portable/portable.c
src/portable/portablectl.c
src/resolve/resolved-dns-scope.c
src/shared/acl-util.c
src/shared/bus-wait-for-jobs.c
src/shared/clean-ipc.c
src/shared/clock-util.c
src/shared/format-table.c
src/shared/install.c
src/shared/logs-show.c
src/shared/net-condition.c
src/shared/sleep-config.c
src/systemctl/systemctl-edit.c
src/systemctl/systemctl-list-units.c
src/systemctl/systemctl-show.c
src/sysv-generator/sysv-generator.c
src/timesync/wait-sync.c
src/tty-ask-password-agent/tty-ask-password-agent.c
src/vconsole/vconsole-setup.c