mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
Merged VS 2015 64 bit warnings (#40373)
This commit is contained in:
parent
0d44dd6131
commit
dd784c18ef
@ -2534,7 +2534,8 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
isc_buffer_putuint8(&b, 0);
|
||||
/* address */
|
||||
if (addrl > 0) {
|
||||
isc_buffer_putmem(&b, addr, addrl - 1);
|
||||
isc_buffer_putmem(&b, addr,
|
||||
(unsigned)addrl - 1);
|
||||
isc_buffer_putuint8(&b,
|
||||
(addr[addrl - 1] &
|
||||
mask));
|
||||
@ -2550,7 +2551,8 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
isc_buffer_putuint8(&b, 0);
|
||||
/* address */
|
||||
if (addrl > 0) {
|
||||
isc_buffer_putmem(&b, addr, addrl - 1);
|
||||
isc_buffer_putmem(&b, addr,
|
||||
(unsigned)addrl - 1);
|
||||
isc_buffer_putuint8(&b,
|
||||
(addr[addrl - 1] &
|
||||
mask));
|
||||
|
@ -1178,7 +1178,7 @@ client_send(ns_client_t *client) {
|
||||
#endif /* HAVE_DNSTAP */
|
||||
|
||||
isc_stats_increment(ns_g_server->tcpoutstats,
|
||||
ISC_MIN(respsize / 16, 256));
|
||||
ISC_MIN((int)respsize / 16, 256));
|
||||
} else {
|
||||
respsize = isc_buffer_usedlength(&buffer);
|
||||
result = client_sendpkg(client, &buffer);
|
||||
@ -1192,7 +1192,7 @@ client_send(ns_client_t *client) {
|
||||
#endif /* HAVE_DNSTAP */
|
||||
|
||||
isc_stats_increment(ns_g_server->udpoutstats,
|
||||
ISC_MIN(respsize / 16, 256));
|
||||
ISC_MIN((int)respsize / 16, 256));
|
||||
}
|
||||
|
||||
/* update statistics (XXXJT: is it okay to access message->xxxkey?) */
|
||||
@ -1736,7 +1736,7 @@ compute_cookie(ns_client_t *client, isc_uint32_t when, isc_uint32_t nonce,
|
||||
isc_netaddr_t netaddr;
|
||||
unsigned char *cp;
|
||||
isc_hmacsha1_t hmacsha1;
|
||||
size_t length;
|
||||
unsigned int length;
|
||||
|
||||
cp = isc_buffer_used(buf);
|
||||
isc_buffer_putmem(buf, client->cookie, 8);
|
||||
@ -1774,7 +1774,7 @@ compute_cookie(ns_client_t *client, isc_uint32_t when, isc_uint32_t nonce,
|
||||
isc_netaddr_t netaddr;
|
||||
unsigned char *cp;
|
||||
isc_hmacsha256_t hmacsha256;
|
||||
size_t length;
|
||||
unsigned int length;
|
||||
|
||||
cp = isc_buffer_used(buf);
|
||||
isc_buffer_putmem(buf, client->cookie, 8);
|
||||
@ -2261,10 +2261,10 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
isc_stats_increment(ns_g_server->nsstats,
|
||||
dns_nsstatscounter_requesttcp);
|
||||
isc_stats_increment(ns_g_server->tcpinstats,
|
||||
ISC_MIN(reqsize / 16, 18));
|
||||
ISC_MIN((int)reqsize / 16, 18));
|
||||
} else {
|
||||
isc_stats_increment(ns_g_server->udpinstats,
|
||||
ISC_MIN(reqsize / 16, 18));
|
||||
ISC_MIN((int)reqsize / 16, 18));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2860,7 +2860,9 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
|
||||
if (max_cache_size == SIZE_AS_PERCENT) {
|
||||
isc_uint64_t totalphys = isc_meminfo_totalphys();
|
||||
max_cache_size = totalphys * max_cache_size_percent/100;
|
||||
|
||||
max_cache_size =
|
||||
(size_t) (totalphys * max_cache_size_percent/100);
|
||||
if (totalphys == 0) {
|
||||
cfg_obj_log(obj, ns_g_lctx,
|
||||
ISC_LOG_WARNING,
|
||||
@ -2871,10 +2873,10 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
cfg_obj_log(obj, ns_g_lctx,
|
||||
ISC_LOG_INFO,
|
||||
"'max-cache-size %d%%' "
|
||||
"- setting to %zuMB (out of %luMB)",
|
||||
"- setting to %zuMB (out of %zuMB)",
|
||||
max_cache_size_percent,
|
||||
max_cache_size / (1024*1024),
|
||||
(unsigned long) totalphys / (1024*1024));
|
||||
(size_t) (totalphys / (1024*1024)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -619,7 +619,8 @@ sendquery(struct query *query, isc_task_t *task)
|
||||
isc_buffer_putuint8(&b, 0);
|
||||
/* address */
|
||||
if (addrl > 0) {
|
||||
isc_buffer_putmem(&b, addr, addrl - 1);
|
||||
isc_buffer_putmem(&b, addr,
|
||||
(unsigned)addrl - 1);
|
||||
isc_buffer_putuint8(&b,
|
||||
(addr[addrl - 1] &
|
||||
mask));
|
||||
@ -635,7 +636,8 @@ sendquery(struct query *query, isc_task_t *task)
|
||||
isc_buffer_putuint8(&b, 0);
|
||||
/* address */
|
||||
if (addrl > 0) {
|
||||
isc_buffer_putmem(&b, addr, addrl - 1);
|
||||
isc_buffer_putmem(&b, addr,
|
||||
(unsigned)addrl - 1);
|
||||
isc_buffer_putuint8(&b,
|
||||
(addr[addrl - 1] &
|
||||
mask));
|
||||
|
@ -225,7 +225,7 @@ load_library(isc_mem_t *mctx, const char *filename, const char *instname,
|
||||
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DYNDB,
|
||||
ISC_LOG_ERROR,
|
||||
"dynamic database support is not implemented")
|
||||
"dynamic database support is not implemented");
|
||||
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
@ -233,18 +233,7 @@ load_library(isc_mem_t *mctx, const char *filename, const char *instname,
|
||||
static void
|
||||
unload_library(dyndb_implementation_t **impp)
|
||||
{
|
||||
dyndb_implementation_t *imp;
|
||||
|
||||
REQUIRE(impp != NULL && *impp != NULL);
|
||||
|
||||
imp = *impp;
|
||||
|
||||
if (imp->handle != NULL)
|
||||
dlclose(imp->handle);
|
||||
|
||||
isc_mem_putanddetach(&imp->mctx, imp, sizeof(dyndb_implementation_t));
|
||||
|
||||
*impp = NULL;
|
||||
UNUSED(impp);
|
||||
}
|
||||
#endif /* HAVE_DLFCN_H */
|
||||
|
||||
|
@ -331,7 +331,7 @@ totext_ctx_init(const dns_master_style_t *style, dns_totext_ctx_t *ctx) {
|
||||
isc_buffer_add(&buf, 1);
|
||||
|
||||
if ((ctx->style.flags & DNS_STYLEFLAG_INDENT) != 0) {
|
||||
size_t ilen = strlen(dns_master_indentstr);
|
||||
unsigned int ilen = strlen(dns_master_indentstr);
|
||||
isc_buffer_availableregion(&buf, &r);
|
||||
if (r.length < ilen)
|
||||
return (DNS_R_TEXTTOOLONG);
|
||||
|
@ -186,6 +186,10 @@ SOURCE=..\include\dns\ds.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\dns\dyndb.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\dns\ecdb.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -556,6 +560,10 @@ SOURCE=..\ds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\dyndb.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\ecdb.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -144,6 +144,7 @@ CLEAN :
|
||||
-@erase "$(INTDIR)\dst_lib.obj"
|
||||
-@erase "$(INTDIR)\dst_parse.obj"
|
||||
-@erase "$(INTDIR)\dst_result.obj"
|
||||
-@erase "$(INTDIR)\dyndb.obj"
|
||||
-@erase "$(INTDIR)\ecdb.obj"
|
||||
-@erase "$(INTDIR)\forward.obj"
|
||||
@IF GEOIP
|
||||
@ -299,6 +300,7 @@ LINK32_OBJS= \
|
||||
"$(INTDIR)\dns64.obj" \
|
||||
"$(INTDIR)\dnssec.obj" \
|
||||
"$(INTDIR)\ds.obj" \
|
||||
"$(INTDIR)\dyndb.obj" \
|
||||
"$(INTDIR)\ecdb.obj" \
|
||||
"$(INTDIR)\forward.obj" \
|
||||
@IF GEOIP
|
||||
@ -464,6 +466,8 @@ CLEAN :
|
||||
-@erase "$(INTDIR)\dst_parse.sbr"
|
||||
-@erase "$(INTDIR)\dst_result.obj"
|
||||
-@erase "$(INTDIR)\dst_result.sbr"
|
||||
-@erase "$(INTDIR)\dyndb.obj"
|
||||
-@erase "$(INTDIR)\dyndb.sbr"
|
||||
-@erase "$(INTDIR)\ecdb.obj"
|
||||
-@erase "$(INTDIR)\ecdb.sbr"
|
||||
-@erase "$(INTDIR)\forward.obj"
|
||||
@ -695,6 +699,7 @@ BSC32_SBRS= \
|
||||
"$(INTDIR)\dns64.sbr" \
|
||||
"$(INTDIR)\dnssec.sbr" \
|
||||
"$(INTDIR)\ds.sbr" \
|
||||
"$(INTDIR)\dyndb.sbr" \
|
||||
"$(INTDIR)\ecdb.sbr" \
|
||||
"$(INTDIR)\forward.sbr" \
|
||||
@IF GEOIP
|
||||
@ -812,6 +817,7 @@ LINK32_OBJS= \
|
||||
"$(INTDIR)\dns64.obj" \
|
||||
"$(INTDIR)\dnssec.obj" \
|
||||
"$(INTDIR)\ds.obj" \
|
||||
"$(INTDIR)\dyndb.obj" \
|
||||
"$(INTDIR)\ecdb.obj" \
|
||||
"$(INTDIR)\forward.obj" \
|
||||
@IF GEOIP
|
||||
@ -1279,6 +1285,24 @@ SOURCE=..\ds.c
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=..\dyndb.c
|
||||
|
||||
!IF "$(CFG)" == "libdns - @PLATFORM@ Release"
|
||||
|
||||
|
||||
"$(INTDIR)\dyndb.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "libdns - @PLATFORM@ Debug"
|
||||
|
||||
|
||||
"$(INTDIR)\dyndb.obj" "$(INTDIR)\dyndb.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=..\ecdb.c
|
||||
|
@ -87,6 +87,9 @@
|
||||
<ClCompile Include="..\ds.c">
|
||||
<Filter>Library Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\dyndb.c">
|
||||
<Filter>Library Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\ecdb.c">
|
||||
<Filter>Library Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -407,6 +410,9 @@
|
||||
<ClInclude Include="..\include\dns\dsdigest.h">
|
||||
<Filter>Library Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\dns\dyndb.h">
|
||||
<Filter>Library Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\dns\ecdb.h">
|
||||
<Filter>Library Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -130,6 +130,7 @@
|
||||
<ClCompile Include="..\dst_lib.c" />
|
||||
<ClCompile Include="..\dst_parse.c" />
|
||||
<ClCompile Include="..\dst_result.c" />
|
||||
<ClCompile Include="..\dyndb.c" />
|
||||
<ClCompile Include="..\ecdb.c" />
|
||||
<ClCompile Include="..\forward.c" />
|
||||
@IF GEOIP
|
||||
@ -247,6 +248,7 @@
|
||||
<ClInclude Include="..\include\dns\dnssec.h" />
|
||||
<ClInclude Include="..\include\dns\ds.h" />
|
||||
<ClInclude Include="..\include\dns\dsdigest.h" />
|
||||
<ClInclude Include="..\include\dns\dyndb.h" />
|
||||
<ClInclude Include="..\include\dns\ecdb.h" />
|
||||
<ClInclude Include="..\include\dns\enumclass.h" />
|
||||
<ClInclude Include="..\include\dns\enumtype.h" />
|
||||
|
@ -81,7 +81,7 @@
|
||||
***/
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
LIBDNS_EXTERNAL_DATA extern isc_hash_t *isc_hashctx;
|
||||
LIBISC_EXTERNAL_DATA extern isc_hash_t *isc_hashctx;
|
||||
|
||||
isc_result_t
|
||||
isc_hash_ctxcreate(isc_mem_t *mctx, isc_entropy_t *entropy, size_t limit,
|
||||
|
@ -262,7 +262,6 @@ isc_hash_ctxdetach
|
||||
isc_hash_ctxinit
|
||||
isc_hash_destroy
|
||||
isc_hash_init
|
||||
isc_hashctx
|
||||
isc_heap_create
|
||||
isc_heap_decreased
|
||||
isc_heap_delete
|
||||
@ -779,5 +778,6 @@ isc_commandline_index DATA
|
||||
isc_commandline_option DATA
|
||||
isc_commandline_progname DATA
|
||||
isc_commandline_reset DATA
|
||||
isc_hashctx DATA
|
||||
isc_mem_debugging DATA
|
||||
@END NOLONGER
|
||||
|
@ -409,7 +409,7 @@ sock_dump(isc_socket_t *sock) {
|
||||
#endif
|
||||
|
||||
printf("\n\t\tSock Dump\n");
|
||||
printf("\t\tfd: %u\n", sock->fd);
|
||||
printf("\t\tfd: %Iu\n", sock->fd);
|
||||
printf("\t\treferences: %d\n", sock->references);
|
||||
printf("\t\tpending_accept: %d\n", sock->pending_accept);
|
||||
printf("\t\tconnecting: %d\n", sock->pending_connect);
|
||||
@ -1114,7 +1114,7 @@ static void
|
||||
dump_msg(struct msghdr *msg, isc_socket_t *sock) {
|
||||
unsigned int i;
|
||||
|
||||
printf("MSGHDR %p, Socket #: %u\n", msg, sock->fd);
|
||||
printf("MSGHDR %p, Socket #: %Iu\n", msg, sock->fd);
|
||||
printf("\tname %p, namelen %d\n", msg->msg_name, msg->msg_namelen);
|
||||
printf("\tiov %p, iovlen %d\n", msg->msg_iov, msg->msg_iovlen);
|
||||
for (i = 0; i < (unsigned int)msg->msg_iovlen; i++)
|
||||
|
@ -2170,7 +2170,7 @@ parse_sizeval_percent(cfg_parser_t *pctx, const cfg_type_t *type,
|
||||
isc_result_t result;
|
||||
cfg_obj_t *obj = NULL;
|
||||
isc_uint64_t val;
|
||||
isc_uint32_t percent;
|
||||
isc_uint64_t percent;
|
||||
|
||||
UNUSED(type);
|
||||
|
||||
@ -2184,7 +2184,7 @@ parse_sizeval_percent(cfg_parser_t *pctx, const cfg_type_t *type,
|
||||
|
||||
if (*endp == '%' && *(endp+1) == 0) {
|
||||
CHECK(cfg_create_obj(pctx, &cfg_type_percentage, &obj));
|
||||
obj->value.uint32 = percent;
|
||||
obj->value.uint32 = (isc_uint32_t)percent;
|
||||
*ret = obj;
|
||||
return (ISC_R_SUCCESS);
|
||||
} else {
|
||||
|
@ -661,7 +661,7 @@ cfg_parse_percentage(cfg_parser_t *pctx, const cfg_type_t *type,
|
||||
char *endp;
|
||||
isc_result_t result;
|
||||
cfg_obj_t *obj = NULL;
|
||||
isc_uint32_t percent;
|
||||
isc_uint64_t percent;
|
||||
|
||||
UNUSED(type);
|
||||
|
||||
@ -680,7 +680,7 @@ cfg_parse_percentage(cfg_parser_t *pctx, const cfg_type_t *type,
|
||||
}
|
||||
|
||||
CHECK(cfg_create_obj(pctx, &cfg_type_percentage, &obj));
|
||||
obj->value.uint32 = percent;
|
||||
obj->value.uint32 = (isc_uint32_t)percent;
|
||||
*ret = obj;
|
||||
|
||||
cleanup:
|
||||
|
Loading…
x
Reference in New Issue
Block a user