mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-12 07:13:35 -05:00
These are mostly false positives, the clang-analyzer FAQ[1] specifies
why and how to fix it:
> The reason the analyzer often thinks that a pointer can be null is
> because the preceding code checked compared it against null. So if you
> are absolutely sure that it cannot be null, remove the preceding check
> and, preferably, add an assertion as well.
The 2 warnings reported are:
byname_test.c:308:34: warning: Access to field 'fwdtable' results in a dereference of a null pointer (loaded from variable 'view')
RUNTIME_CHECK(dns_fwdtable_add(view->fwdtable, dns_rootname,
^~~~~~~~~~~~~~
/builds/isc-projects/bind9/lib/isc/include/isc/util.h:318:52: note: expanded from macro 'RUNTIME_CHECK'
^~~~
/builds/isc-projects/bind9/lib/isc/include/isc/error.h:50:21: note: expanded from macro 'ISC_ERROR_RUNTIMECHECK'
((void)(ISC_LIKELY(cond) || \
^~~~
/builds/isc-projects/bind9/lib/isc/include/isc/likely.h:23:43: note: expanded from macro 'ISC_LIKELY'
^
1 warning generated.
--
./rndc.c:255:6: warning: Dereference of null pointer (loaded from variable 'host')
if (*host == '/') {
^~~~~
1 warning generated.
References:
1. https://clang-analyzer.llvm.org/faq.html#null_pointer
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| adb_test.c | ||
| backtrace_test.c | ||
| byaddr_test.c | ||
| byname_test.c | ||
| db_test.c | ||
| fsaccess_test.c | ||
| gsstest.c | ||
| inter_test.c | ||
| Kchild.example.+005+33180.key | ||
| Kchild.example.+005+33180.private | ||
| lex_test.c | ||
| lfsr_test.c | ||
| log_test.c | ||
| Makefile.in | ||
| master_test.c | ||
| mempool_test.c | ||
| name_test.c | ||
| nsecify.c | ||
| ratelimiter_test.c | ||
| rbt_test.c | ||
| rbt_test.out | ||
| rbt_test.txt | ||
| rwlock_test.c | ||
| serial_test.c | ||
| shutdown_test.c | ||
| sig0_test.c | ||
| sock_test.c | ||
| sym_test.c | ||
| task_test.c | ||
| timer_test.c | ||
| zone_test.c | ||