Silence bogus warning when building with old GCC versions
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 25 Nov 2019 22:54:07 +0000 (17:54 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 25 Nov 2019 22:57:35 +0000 (17:57 -0500)
commitae63e1340448a2411875f795ff07332bb430b3cf
tree960993e68d893945ba20b926c354ada7b35371c0
parente51dc192b1b82ac4291d9d2ce56db87c3e9c65c5
Silence bogus warning when building with old GCC versions

gcc version 7.4.0 (and possibly others) warn that `new_handle`
may be used uninitialized. It is not clear what code path would
trigger this uninitialized use.

Moreover, the warning is not present when building with recent
versions of gcc and clang, nor is it flagged by Coverity. This points
to the warning being bogus.

Still, setting `new_handle` to NULL silences the warning on this
gcc version.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/unit/test_fd_tracker.c
This page took 0.025585 seconds and 4 git commands to generate.