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

@ -39,8 +39,7 @@ static int dladdr_dont_reload(void *addr, Dl_info *info) {
memset((void *)info, 0, sizeof(Dl_info));
for (;;) {
if (addr >= p->ldinfo_textorg &&
addr < (((char*)p->ldinfo_textorg) + p->ldinfo_textsize))
{
addr < p->ldinfo_textorg + p->ldinfo_textsize) {
info->dli_fname = p->ldinfo_filename;
return 1;
}

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;