mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 11:19:59 -04:00
Workaround for clang static analyzer bug.
This commit is contained in:
parent
47e5f5564c
commit
6c8f309745
1 changed files with 8 additions and 0 deletions
|
|
@ -150,6 +150,14 @@ badcache_resize(dns_badcache_t *bc, isc_time_t *now) {
|
|||
newsize = bc->size * 2 + 1;
|
||||
} else {
|
||||
newsize = (bc->size - 1) / 2;
|
||||
#ifdef __clang_analyzer__
|
||||
/*
|
||||
* XXXWPK there's a bug in clang static analyzer -
|
||||
* `value % newsize` is considered undefined even though
|
||||
* we check if newsize is larger than 0. This helps.
|
||||
*/
|
||||
newsize += 1;
|
||||
#endif
|
||||
}
|
||||
RUNTIME_CHECK(newsize > 0);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue