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.
This commit is contained in:
Luca Boccassi
2021-04-14 12:25:06 +01:00
parent be084c0dd1
commit c2b2df604b
61 changed files with 106 additions and 106 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ int dhcp6_network_bind_udp_socket(int index, struct in6_addr *local_address) {
}
static void fuzz_client(const uint8_t *data, size_t size, bool is_information_request_enabled) {
_cleanup_(sd_event_unrefp) sd_event *e;
_cleanup_(sd_event_unrefp) sd_event *e = NULL;
_cleanup_(sd_dhcp6_client_unrefp) sd_dhcp6_client *client = NULL;
struct in6_addr address = { { { 0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01 } } };