8228482: fix xlc16/xlclang comparison of distinct pointer types and string literal conversion warnings

Reviewed-by: clanger, mdoerr
This commit is contained in:
Matthias Baesken 2019-07-23 16:52:38 +02:00
parent f8a875bfce
commit b9e177677c
6 changed files with 21 additions and 17 deletions

View file

@ -1394,6 +1394,10 @@ static int getFlags(int sock, const char *ifname, int *flags) {
/** AIX **/
#if defined(_AIX)
/* seems getkerninfo is guarded by _KERNEL in the system headers */
/* see net/proto_uipc.h */
int getkerninfo(int, char *, int *, int32long64_t);
/*
* Opens a socket for further ioctl calls. Tries AF_INET socket first and
* if it fails return AF_INET6 socket.
@ -1613,7 +1617,7 @@ static int getMacAddress
return -1;
}
if (getkerninfo(KINFO_NDD, nddp, &size, 0) < 0) {
if (getkerninfo(KINFO_NDD, (char*) nddp, &size, 0) < 0) {
perror("getkerninfo 2");
free(nddp);
return -1;