Fixed these warnings:
"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.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rdata.c,v 1.88 2000/05/09 22:22:12 tale Exp $ */
|
||||
/* $Id: rdata.c,v 1.89 2000/05/14 02:02:24 tale Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -161,7 +161,6 @@ mem_maybedup(isc_mem_t *mctx, void *source, size_t length) {
|
||||
|
||||
static const char hexdigits[] = "0123456789abcdef";
|
||||
static const char decdigits[] = "0123456789";
|
||||
static const char octdigits[] = "01234567";
|
||||
|
||||
#include "code.h"
|
||||
|
||||
@@ -1454,7 +1453,7 @@ putbyte(int c, isc_buffer_t *target, struct state *state) {
|
||||
|
||||
static isc_result_t
|
||||
atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) {
|
||||
isc_int32_t oeor, osum, orot;
|
||||
long oeor, osum, orot;
|
||||
struct state statebuf, *state= &statebuf;
|
||||
isc_token_t token;
|
||||
char c;
|
||||
@@ -1482,7 +1481,7 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) {
|
||||
* Checksum.
|
||||
*/
|
||||
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
|
||||
oeor = strtoul(token.value.as_pointer, &e, 16);
|
||||
oeor = strtol(token.value.as_pointer, &e, 16);
|
||||
if (*e != 0)
|
||||
return (DNS_R_SYNTAX);
|
||||
|
||||
@@ -1490,7 +1489,7 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) {
|
||||
* Checksum.
|
||||
*/
|
||||
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
|
||||
osum = strtoul(token.value.as_pointer, &e, 16);
|
||||
osum = strtol(token.value.as_pointer, &e, 16);
|
||||
if (*e != 0)
|
||||
return (DNS_R_SYNTAX);
|
||||
|
||||
@@ -1498,7 +1497,7 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) {
|
||||
* Checksum.
|
||||
*/
|
||||
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
|
||||
orot = strtoul(token.value.as_pointer, &e, 16);
|
||||
orot = strtol(token.value.as_pointer, &e, 16);
|
||||
if (*e != 0)
|
||||
return (DNS_R_SYNTAX);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user