Merge branch '3932-gcc-12-static-analyzer-warning-use-of-null-_frm-where-non-null-expected-in-cc-c' into 'main'

Resolve "GCC 12 static analyzer: warning: use of NULL '_frm' where non-null expected in cc.c"

Closes #3932

See merge request isc-projects/bind9!7658
This commit is contained in:
Mark Andrews 2023-03-08 22:36:19 +00:00
commit 700d5f6b0b

View file

@ -1003,12 +1003,14 @@ isccc_cc_checkdup(isccc_symtab_t *symtab, isccc_sexpr_t *message,
_frm = "";
} else {
_frm = tmp;
INSIST(_frm != NULL);
}
tmp = NULL;
if (isccc_cc_lookupstring(_ctrl, "_to", &tmp) != ISC_R_SUCCESS) {
_to = "";
} else {
_to = tmp;
INSIST(_to != NULL);
}
/*
* Ensure there is no newline in any of the strings. This is so