diff --git a/src/basic/efivars.c b/src/basic/efivars.c index 26d34bb94f..2139cf3a69 100644 --- a/src/basic/efivars.c +++ b/src/basic/efivars.c @@ -63,7 +63,7 @@ int efi_get_variable( _cleanup_free_ char *p = NULL; _cleanup_free_ void *buf = NULL; struct stat st; - usec_t begin; + usec_t begin = 0; /* Unnecessary initialization to appease gcc */ uint32_t a; ssize_t n; diff --git a/src/home/homework-luks.c b/src/home/homework-luks.c index 07d5bcfdb6..543195914f 100644 --- a/src/home/homework-luks.c +++ b/src/home/homework-luks.c @@ -1870,7 +1870,8 @@ int home_create_luks( UserRecord **ret_home) { _cleanup_free_ char *dm_name = NULL, *dm_node = NULL, *subdir = NULL, *disk_uuid_path = NULL, *temporary_image_path = NULL; - uint64_t host_size, encrypted_size, partition_offset, partition_size; + uint64_t encrypted_size, + host_size = 0, partition_offset = 0, partition_size = 0; /* Unnecessary initialization to appease gcc */ bool image_created = false, dm_activated = false, mounted = false; _cleanup_(user_record_unrefp) UserRecord *new_home = NULL; sd_id128_t partition_uuid, fs_uuid, luks_uuid, disk_uuid; diff --git a/src/libsystemd/sd-netlink/generic-netlink.c b/src/libsystemd/sd-netlink/generic-netlink.c index 6760e0d348..a939d65569 100644 --- a/src/libsystemd/sd-netlink/generic-netlink.c +++ b/src/libsystemd/sd-netlink/generic-netlink.c @@ -118,7 +118,7 @@ static int lookup_id(sd_netlink *nl, sd_genl_family_t family, uint16_t *id) { } int sd_genl_message_new(sd_netlink *nl, sd_genl_family_t family, uint8_t cmd, sd_netlink_message **ret) { - uint16_t id; + uint16_t id = 0; /* Unnecessary initialization to appease gcc */ int r; r = lookup_id(nl, family, &id); diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c index cea51482de..37f83306db 100644 --- a/src/shared/sleep-config.c +++ b/src/shared/sleep-config.c @@ -324,7 +324,7 @@ static bool location_is_resume_device(const HibernateLocation *location, dev_t s int find_hibernate_location(HibernateLocation **ret_hibernate_location) { _cleanup_fclose_ FILE *f = NULL; _cleanup_(hibernate_location_freep) HibernateLocation *hibernate_location = NULL; - dev_t sys_resume; + dev_t sys_resume = 0; /* Unnecessary initialization to appease gcc */ uint64_t sys_offset = 0; bool resume_match = false; int r;