]> granicus.if.org Git - libevent/commit
test/regress_dns: fix -Wmaybe-uninitialized
authorAzat Khuzhin <azat@libevent.org>
Fri, 28 Aug 2020 22:15:20 +0000 (01:15 +0300)
committerAzat Khuzhin <azat@libevent.org>
Fri, 28 Aug 2020 22:15:20 +0000 (01:15 +0300)
commit2338f27e694f74931022e3310f629504f7ebbe8e
tree19c81db46c49d1a5c14eaec12b9bbe17f463e201
parent972289f356102d22a23aac4a93fe42de845dd917
test/regress_dns: fix -Wmaybe-uninitialized

Was not noticed since it is reported only with optimization enabled, as
stated in gcc(1):

   The effectiveness of some warnings depends on optimizations also
   being enabled. For example -Wsuggest-final-types is more effective with
   link-time optimization and -Wmaybe-uninitialized does not warn at all
   unless optimization is enabled.

And interesting thing is that it is reported only for -O2, not for -O3,
that's why I did not catched it in both cmake env that I had:
- debug (it has -O0)
- release (it has -O3)

While autoconf has -O2.
test/regress_dns.c