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:
@@ -179,7 +179,7 @@ static int clock_state_update(
|
||||
}
|
||||
|
||||
static int run(int argc, char * argv[]) {
|
||||
_cleanup_(sd_event_unrefp) sd_event *event;
|
||||
_cleanup_(sd_event_unrefp) sd_event *event = NULL;
|
||||
_cleanup_(clock_state_release) ClockState state = {
|
||||
.timerfd_fd = -1,
|
||||
.inotify_fd = -1,
|
||||
|
||||
Reference in New Issue
Block a user