mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
4216. [cleanup] Silence static analysis warnings. [RT #40649]
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -1,3 +1,5 @@
|
||||
4216. [cleanup] Silence static analysis warnings. [RT #40649]
|
||||
|
||||
4215. [bug] nsupdate: skip to next request on GSSTKEY create
|
||||
failure. [RT #40685]
|
||||
|
||||
|
@@ -770,7 +770,7 @@ main(int argc, char **argv) {
|
||||
continue;
|
||||
if (hash == HASH(ttn2->typename)) {
|
||||
fprintf(stdout, "\t\t\tRDATATYPE_COMPARE"
|
||||
"(\"%s\", %u, "
|
||||
"(\"%s\", %d, "
|
||||
"_typename, _length, _typep); \\\n",
|
||||
ttn2->typename, ttn2->type);
|
||||
ttn2->sorted = 1;
|
||||
@@ -786,7 +786,7 @@ main(int argc, char **argv) {
|
||||
ttn = find_typename(i);
|
||||
if (ttn == NULL)
|
||||
continue;
|
||||
fprintf(stdout, "\tcase %u: return (%s); \\\n",
|
||||
fprintf(stdout, "\tcase %d: return (%s); \\\n",
|
||||
i, upper(ttn->attr));
|
||||
}
|
||||
fprintf(stdout, "\t}\n");
|
||||
@@ -805,7 +805,7 @@ main(int argc, char **argv) {
|
||||
*/
|
||||
if (i == 65533U)
|
||||
continue;
|
||||
fprintf(stdout, "\tcase %u: return "
|
||||
fprintf(stdout, "\tcase %d: return "
|
||||
"(str_totext(\"%s\", target)); \\\n",
|
||||
i, upper(ttn->typename));
|
||||
}
|
||||
|
@@ -818,7 +818,7 @@ generate(dns_loadctx_t *lctx, char *range, char *lhs, char *gtype, char *rhs,
|
||||
isc_textregion_t r;
|
||||
int i, n, start, stop, step = 0;
|
||||
dns_incctx_t *ictx;
|
||||
char dummy;
|
||||
char dummy[2];
|
||||
|
||||
ictx = lctx->inc;
|
||||
callbacks = lctx->callbacks;
|
||||
@@ -835,7 +835,7 @@ generate(dns_loadctx_t *lctx, char *range, char *lhs, char *gtype, char *rhs,
|
||||
}
|
||||
isc_buffer_init(&target, target_mem, target_size);
|
||||
|
||||
n = sscanf(range, "%d-%d%[/]%d", &start, &stop, &dummy, &step);
|
||||
n = sscanf(range, "%d-%d%1[/]%d", &start, &stop, dummy, &step);
|
||||
if ((n != 2 && n != 4) || (start < 0) || (stop < 0) ||
|
||||
(n == 4 && step < 1) || (stop < start))
|
||||
{
|
||||
@@ -2281,7 +2281,6 @@ load_raw(dns_loadctx_t *lctx) {
|
||||
unsigned char *target_mem = NULL;
|
||||
dns_decompress_t dctx;
|
||||
|
||||
REQUIRE(DNS_LCTX_VALID(lctx));
|
||||
callbacks = lctx->callbacks;
|
||||
dns_decompress_init(&dctx, -1, DNS_DECOMPRESS_NONE);
|
||||
|
||||
|
@@ -173,11 +173,12 @@ eatwhite(FILE *fp) {
|
||||
static int
|
||||
getword(FILE *fp, char *buffer, size_t size) {
|
||||
int ch;
|
||||
char *p = buffer;
|
||||
char *p;
|
||||
|
||||
REQUIRE(buffer != NULL);
|
||||
REQUIRE(size > 0U);
|
||||
|
||||
p = buffer;
|
||||
*p = '\0';
|
||||
|
||||
ch = eatwhite(fp);
|
||||
|
@@ -460,6 +460,8 @@ isc_buffer_allocate(isc_mem_t *mctx, isc_buffer_t **dynbuffer,
|
||||
length);
|
||||
dbuf->mctx = mctx;
|
||||
|
||||
ENSURE(ISC_BUFFER_VALID(dbuf));
|
||||
|
||||
*dynbuffer = dbuf;
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
@@ -492,8 +494,6 @@ isc_buffer_reallocate(isc_buffer_t **dynbuffer, unsigned int length) {
|
||||
dbuf->base = ((unsigned char *)dbuf) + sizeof(isc_buffer_t);
|
||||
dbuf->length = length;
|
||||
|
||||
INSIST(ISC_BUFFER_VALID(dbuf));
|
||||
|
||||
*dynbuffer = dbuf;
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
|
@@ -838,7 +838,7 @@ isc_httpd_response(isc_httpd_t *httpd) {
|
||||
return (result);
|
||||
}
|
||||
|
||||
sprintf(isc_buffer_used(&httpd->headerbuffer), "%s %03d %s\r\n",
|
||||
sprintf(isc_buffer_used(&httpd->headerbuffer), "%s %03u %s\r\n",
|
||||
httpd->protocol, httpd->retcode, httpd->retmsg);
|
||||
isc_buffer_add(&httpd->headerbuffer, needlen);
|
||||
|
||||
|
@@ -1735,13 +1735,14 @@ build_msghdr_recv(isc__socket_t *sock, isc_socketevent_t *dev,
|
||||
msg->msg_iovlen = iovcount;
|
||||
|
||||
#ifdef ISC_NET_BSD44MSGHDR
|
||||
msg->msg_control = NULL;
|
||||
msg->msg_controllen = 0;
|
||||
msg->msg_flags = 0;
|
||||
#if defined(USE_CMSG)
|
||||
msg->msg_control = sock->recvcmsgbuf;
|
||||
msg->msg_controllen = sock->recvcmsgbuflen;
|
||||
#else
|
||||
msg->msg_control = NULL;
|
||||
msg->msg_controllen = 0;
|
||||
#endif /* USE_CMSG */
|
||||
msg->msg_flags = 0;
|
||||
#else /* ISC_NET_BSD44MSGHDR */
|
||||
msg->msg_accrights = NULL;
|
||||
msg->msg_accrightslen = 0;
|
||||
@@ -2387,8 +2388,8 @@ static void
|
||||
free_socket(isc__socket_t **socketp) {
|
||||
isc__socket_t *sock = *socketp;
|
||||
|
||||
INSIST(sock->references == 0);
|
||||
INSIST(VALID_SOCKET(sock));
|
||||
INSIST(sock->references == 0);
|
||||
INSIST(!sock->connecting);
|
||||
INSIST(!sock->pending_recv);
|
||||
INSIST(!sock->pending_send);
|
||||
|
Reference in New Issue
Block a user