statements.
- Post-load of named.conf check verifies a slave zone has non-empty list
of masters defined.
- New per-zone boolean:
enable-zone yes | no ;
- intended to let a zone be disabled without having to comment out the
entire zone statement.
- New global and per-view option:
max-cache-ttl number
- New global and per-view option:
addition-data internal | minimal | maximal;
line 356: remark(1174): parameter "dev" was declared but never referenced
This is true when ISC_NET_BSD44MSGHDR is not defined. UNUSED()s were added.
line 1580: remark(1552): variable "task" was set but never used
line 1670: remark(1552): variable "task" was set but never used
I removed the stack variable and its assignment in each case.
line 2915: remark(1552): variable "ret" was set but never used
It was apparent that the variable was meant to be the return value
of isc_socket_getsockname, so the return statement was changed to use it.
Also ...
Changed function declarations to ISC coding style.
Wrapped two lines that were wider than column 79.
Removed two UNUSED() macros for variables that were no longer unused.
line 383: remark(1498): no prototype for the call to setup
line 405: remark(1498): no prototype for the call to cleanup
The missing prototypes were added.
line 684: remark(1692): prototyped function redeclared without prototype
line 700: remark(1692): prototyped function redeclared without prototype
Prototypes fixed.
line 331: remark(1552): variable "n" was set but never used.
Variable removed.
It was removed and the function call that set it (getword) was cast to void.
In the context in which it was being used, the return value was not needed.
line 84: remark(1692): prototyped function redeclared without prototype
line 137: remark(1692): prototyped function redeclared without prototype
The missing prototypes were added.
to "long": rounding, sign extension, or loss of accuracy may result
Fixed by ensuring unsigned long ctx->timeout does not overflow the signed
long timeout.tv_sec.
"tkey.c", line 220: remark(1552): variable "tsigkey" was set but never used
"tkey.c", line 846: remark(1552): variable "tsigkey" was set but never used
by removing the unused variables.
"resolver.c", line 750: remark(1552): variable "trdataset" was set but never
used
"resolver.c", line 3043: remark(1552): variable "have_sig" was set but never
used
True and true.
"resolver.c", line 2194: warning(1551): variable "now" is used before its
value is set
Moved setting of "now" to earlier in the function.
"rdata.c", line 164: remark(1174): variable "octdigits" was declared but never
referenced
This was true; octdigits was used in no lib/dns/**/* files.
"rdata.c", line 1485: remark(1506): implicit conversion from "unsigned long"
to "int": rounding, sign extension, or loss of accuracy may result
"rdata.c", line 1493: remark(1506): implicit conversion from "unsigned long"
to "int": rounding, sign extension, or loss of accuracy may result
"rdata.c", line 1501: remark(1506): implicit conversion from "unsigned long"
to "int": rounding, sign extension, or loss of accuracy may result
These three were all in atob_tobuffer, where the value of stroul was being
assigned to an isc_int32_t, which is typedef'd from int and possibly smaller
than long (definitely on the IRIX machine). The variables in question were
changed from isc_int32_t to long.
"./rdata/any_255/tsig_250.c", line 74: remark(1506): implicit conversion from
"unsigned long" to "int": rounding, sign extension, or loss of
accuracy may result
"./rdata/any_255/tsig_250.c", line 95: remark(1506): implicit conversion from
"unsigned long" to "int": rounding, sign extension, or loss of
accuracy may result
The values in question were already being checked to be within the range of
a short, so where the warnings were occuring they were just cast to int.
"./rdata/generic/tkey_249.c", line 89: remark(1506): implicit conversion from
"unsigned long" to "int": rounding, sign extension, or loss of
accuracy may result
"./rdata/generic/tkey_249.c", line 98: remark(1506): implicit conversion from
"unsigned long" to "int": rounding, sign extension, or loss of
accuracy may result
The values in question were already being checked to be within the range of
a short, so where the warnings were occuring they were just cast to int.
"./rdata/generic/unspec_103.c", line 138: warning(1184): possible use of "="
where "==" was intended
by changing to ==, which is clearly what was intended.
"./rdata/generic/opt_41.c", line 73: remark(1552): variable "option" was set
but never used
by removing option, because there was nothing to do with its value.
"./rdata/in_1/a6_38.c", line 259: remark(1552): variable "octets" was set but
never used
by using UNUSED() on this stack variable. I didn't take it out altogether
because this function is not yet finished, but someone was starting to
do some work on it and I didn't want to undo that.
"./rdata/generic/nxt_30.c", line 66: warning(1042): operand types are
incompatible ("char *" and "void *")
by casting to char *, as already being done with several other uses of
token.value.as_pointer.
"./rdata/generic/loc_29.c", line ??: remark(1506): implicit conversion from
"unsigned long" to "int": rounding, sign extension, or loss of
accuracy may result
by making sure that the range was suitable for an int and casting to
int in each case. (This appeared to be more desirable than changing
all of the variables in question to longs.)
"./rdata/generic/mx_15.c", line 202: warning(1184): possible use of "=" where
"==" was intended
by changing to == since it was clear that test was desired, not assignment.
"./rdata/in_1/a_1.c", line 178: warning(1184): possible use of "=" where "=="
was intended
"./rdata/in_1/a_1.c", line 179: warning(1184): possible use of "=" where "=="
was intended
By chaning them to ==, because (a) we don't allow side-effects in REQUIRE()
and (b) it is clear from the rest of the code that it really was a test that
was desired and not an assignment.
"rbtdb.c", line 1579: remark(1552): parameter "now" was set but never used
"rbtdb.c", line 2888: remark(1552): parameter "version" was set but never used
by using UNUSED() rather than setting variables to unused values.
"journal.c", line 169: remark(1552): variable "zoneclass" was set but never
used
by removing zoneclass declaration and zoneclass = dns_db_class(db) from
dns_db_createsoatuple.
"adb.c", line 2042: remark(1552): variable "result" was set but never used
isc_result_t result;
^
"adb.c", line 3082: warning(1185): enumerated type mixed with another type
NAME_GLUEOK(adbname), NAME_HINTOK(adbname),
^
"adb.c", line 3187: warning(1185): enumerated type mixed with another type
now, NAME_GLUEOK(adbname), NAME_HINTOK(adbname),
Note that the first is in timer_cleanup, a function returning void in a context
that can't do anything with something other than void (as an isc_taskaction_t).
It calls isc_timer_reset, which could conceivably return ISC_R_NOMEMORY or
ISC_R_UNEXPECTED. For now the call has been cast to void, but someone
who knows the code better should have a look and see whether something more
intelligent could be done with an error (and, if not, remove my XXX and
make sure the comment is clear as to why ignoring the return is the
best that can be done).
"confzone.c", line 445: remark(1552): variable "res" was set but never used
Made *_zone_init functions return void since they all always returned
ISC_R_SUCCESS.