From: Mark Andrews Date: Thu, 6 Feb 2020 00:02:55 +0000 (+1100) Subject: Silence unchecked return of dns_db_find() X-Git-Tag: v9.14.11~16^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76df419b2714a7f42fdc3be5812b089faf4d4e8a;p=thirdparty%2Fbind9.git Silence unchecked return of dns_db_find() 190 dns_rdataset_init(&rdataset); 3. Condition r == 0, taking true branch. 4. Condition result, taking false branch. CID 1452691 (#1 of 1): Unchecked return value (CHECKED_RETURN) 5. check_return: Calling dns_db_find without checking return value (as is done elsewhere 39 out of 45 times). 191 check_assertion(dns_db_find(db1, dns_rootname, v2, 192 dns_rdatatype_soa, 0, 0, NULL, 193 name, &rdataset, NULL)); (cherry picked from commit e8bf82efc6dfffa7f17117617c6dfe32ce7ac96d) --- diff --git a/lib/dns/tests/dbversion_test.c b/lib/dns/tests/dbversion_test.c index ca10d09e636..5a429bcd48d 100644 --- a/lib/dns/tests/dbversion_test.c +++ b/lib/dns/tests/dbversion_test.c @@ -188,9 +188,9 @@ find(void **state) { } dns_rdataset_init(&rdataset); - check_assertion(dns_db_find(db1, dns_rootname, v2, - dns_rdatatype_soa, 0, 0, NULL, - name, &rdataset, NULL)); + check_assertion((void)dns_db_find(db1, dns_rootname, v2, + dns_rdatatype_soa, 0, 0, NULL, + name, &rdataset, NULL)); } /*