libctf: work around an uninitialized variable warning
authorNick Alcock <nick.alcock@oracle.com>
Mon, 13 Mar 2023 17:32:53 +0000 (17:32 +0000)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 24 Mar 2023 13:37:32 +0000 (13:37 +0000)
commitcce0bb8ff8a4922da4318a3654f68cfabb4c3ec8
tree50d669a4370fded21ddefcfb19370377890c6640
parentca96e367f057c068fb9f016dd7beba55d5d29d81
libctf: work around an uninitialized variable warning

GCC 11+ complains that sym is uninitialized in ctf_symbol_next.  It
isn't, but it's not quite smart enough to figure that out (it requires
domain-specific knowledge of the state of the ctf_next_t iterator
over multiple calls).

libctf/
* ctf-lookup.c (ctf_symbol_next): Initialize sym to a suitable
value for returning if never reset during the function.
libctf/ctf-lookup.c