mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-24 08:39:10 -04:00
libdns: add missing checks for return values in dnstap unit test
Related scan-build report:
dnstap_test.c:169:2: warning: Value stored to 'result' is never read
result = dns_test_makeview("test", &view);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dnstap_test.c:193:2: warning: Value stored to 'result' is never read
result = dns_compress_init(&cctx, -1, dt_mctx);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
(cherry picked from commit e9acad638e)
This commit is contained in:
parent
2d52a05f4f
commit
027f2c1518
1 changed files with 2 additions and 0 deletions
|
|
@ -169,6 +169,7 @@ send_test(void **state) {
|
|||
cleanup();
|
||||
|
||||
result = dns_test_makeview("test", &view);
|
||||
assert_int_equal(result, ISC_R_SUCCESS);
|
||||
|
||||
fopt = fstrm_iothr_options_init();
|
||||
assert_non_null(fopt);
|
||||
|
|
@ -193,6 +194,7 @@ send_test(void **state) {
|
|||
memset(&zr, 0, sizeof(zr));
|
||||
isc_buffer_init(&zb, zone, sizeof(zone));
|
||||
result = dns_compress_init(&cctx, -1, mctx);
|
||||
assert_int_equal(result, ISC_R_SUCCESS);
|
||||
dns_compress_setmethods(&cctx, DNS_COMPRESS_NONE);
|
||||
result = dns_name_towire(zname, &cctx, &zb);
|
||||
assert_int_equal(result, ISC_R_SUCCESS);
|
||||
|
|
|
|||
Loading…
Reference in a new issue