mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Add small tweaks to the code to fix compilation when ISC assertions are disabled
While implementing the new unit testing framework cmocka, it was found that the BIND 9 code doesn't compile when assertions are disabled or replaced with any function (such as mock_assert() from cmocka unit testing framework) that's not directly recognized as assertion by the compiler. This made the compiler to complain about blocks of code that was recognized as unreachable before, but now it isn't. The changes in this commit include: * assigns default values to couple of local variables, * moves some return statements around INSIST assertions, * adds __builtin_unreachable(); annotations after some INSIST assertions, * fixes one broken assertion (= instead of ==)
This commit is contained in:
@@ -1686,7 +1686,7 @@ ns_client_addopt(ns_client_t *client, dns_message_t *message,
|
||||
isc_buffer_t buf;
|
||||
uint8_t addr[16];
|
||||
uint32_t plen, addrl;
|
||||
uint16_t family;
|
||||
uint16_t family = 0;
|
||||
|
||||
/* Add CLIENT-SUBNET option. */
|
||||
|
||||
|
Reference in New Issue
Block a user