sd-event: silence gcc's maybe-unitialized warning
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 31 Mar 2021 12:06:39 +0000 (14:06 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 31 Mar 2021 16:24:53 +0000 (18:24 +0200)
commitbfd9bfccceed07da65b3546ca47e7a53b7bf680a
tree8dc71d1bc415bcb3f701d12e6fc7ae03b179838b
parent4990d4b8ffc4fc866d558b7dba727e7fa4e36844
sd-event: silence gcc's maybe-unitialized warning

[91/180] Compiling C object libsystemd.a.p/src_libsystemd_sd-event_sd-event.c.o
In file included from ../src/basic/macro.h:12,
                 from ../src/basic/alloc-util.h:9,
                 from ../src/libsystemd/sd-event/sd-event.c:11:
../src/libsystemd/sd-event/sd-event.c: In function ‘sd_event_wait’:
../src/fundamental/macro-fundamental.h:86:63: warning: ‘child_min_priority’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   86 |                 UNIQ_T(A, aq) < UNIQ_T(B, bq) ? UNIQ_T(A, aq) : UNIQ_T(B, bq); \
      |                                                               ^
../src/libsystemd/sd-event/sd-event.c:3983:45: note: ‘child_min_priority’ was declared here
 3983 |                 int64_t epoll_min_priority, child_min_priority;
      |                                             ^~~~~~~~~~~~~~~~~~

Alternative to #19159.
src/libsystemd/sd-event/sd-event.c