8198302: VS2017 (C4477) java.base/windows/native/libnet/NetworkInterface_winXP.c incorrect printf format strings

Cast to expected data type

Reviewed-by: chegar, clanger, rriggs
This commit is contained in:
Brian Burkhalter 2018-03-06 10:51:26 -08:00
parent 1780fdeae7
commit 1deb2a7bd5

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -39,14 +39,15 @@ int getAddrsFromAdapter(IP_ADAPTER_ADDRESSES *ptr, netaddr **netaddrPP);
#ifdef DEBUG
void printnif (netif *nif) {
#ifdef _WIN64
printf ("nif:0x%I64x name:%s\n", nif,nif->name);
printf ("nif:0x%I64x name:%s\n", (UINT_PTR)nif, nif->name);
#else
printf ("nif:0x%x name:%s\n", nif,nif->name);
printf ("nif:0x%x name:%s\n", nif, nif->name);
#endif
if (nif->dNameIsUnicode) {
printf ("dName:%S index:%d ", nif->displayName,nif->index);
printf ("dName:%S index:%d ", (unsigned short *)nif->displayName,
nif->index);
} else {
printf ("dName:%s index:%d ", nif->displayName,nif->index);
printf ("dName:%s index:%d ", nif->displayName, nif->index);
}
printf ("naddrs:%d\n", nif->naddrs);
}