From e23e6a56368641a2223eb2d2d38711566f6affc6 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Tue, 7 Aug 2018 13:13:17 +0300 Subject: [PATCH] loader: libstand warning: pointer targets differ in signedness illumos bug# 9708 --- usr/src/boot/lib/libstand/bootp.c | 2 +- usr/src/boot/lib/libstand/bootp.h | 2 +- usr/src/boot/lib/libstand/dosfs.c | 2 +- usr/src/boot/lib/libstand/gzipfs.c | 2 +- usr/src/boot/lib/libstand/net.c | 4 ++-- usr/src/boot/lib/libstand/nfs.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/usr/src/boot/lib/libstand/bootp.c b/usr/src/boot/lib/libstand/bootp.c index 328a45f9b5..2e8773ca46 100644 --- a/usr/src/boot/lib/libstand/bootp.c +++ b/usr/src/boot/lib/libstand/bootp.c @@ -729,7 +729,7 @@ setenv_(u_char *cp, u_char *ep, struct dhcp_opt *opts) bcopy(cp, buf, size); /* cannot overflow */ buf[size] = '\0'; for (endv = buf; endv; endv = vp) { - u_char *s = NULL; /* semicolon ? */ + char *s = NULL; /* semicolon ? */ /* skip leading whitespace */ while (*endv && strchr(" \t\n\r", *endv)) diff --git a/usr/src/boot/lib/libstand/bootp.h b/usr/src/boot/lib/libstand/bootp.h index 3118c8c653..4fbb712e7d 100644 --- a/usr/src/boot/lib/libstand/bootp.h +++ b/usr/src/boot/lib/libstand/bootp.h @@ -37,7 +37,7 @@ struct bootp { struct in_addr bp_giaddr; /* gateway IP address */ unsigned char bp_chaddr[16]; /* client hardware address */ unsigned char bp_sname[64]; /* server host name */ - unsigned char bp_file[128]; /* boot file name */ + char bp_file[128]; /* boot file name */ #ifdef SUPPORT_DHCP #define BOOTP_VENDSIZE 312 #else diff --git a/usr/src/boot/lib/libstand/dosfs.c b/usr/src/boot/lib/libstand/dosfs.c index 617041566e..8d5adb4cc9 100644 --- a/usr/src/boot/lib/libstand/dosfs.c +++ b/usr/src/boot/lib/libstand/dosfs.c @@ -403,7 +403,7 @@ dos_stat(struct open_file *fd, struct stat *sb) } static int -dos_checksum(char *name, char *ext) +dos_checksum(unsigned char *name, unsigned char *ext) { int x, i; char buf[11]; diff --git a/usr/src/boot/lib/libstand/gzipfs.c b/usr/src/boot/lib/libstand/gzipfs.c index 6cc752bf0e..3d7692e597 100644 --- a/usr/src/boot/lib/libstand/gzipfs.c +++ b/usr/src/boot/lib/libstand/gzipfs.c @@ -39,7 +39,7 @@ struct z_file int zf_rawfd; off_t zf_dataoffset; z_stream zf_zstream; - char zf_buf[Z_BUFSIZE]; + unsigned char zf_buf[Z_BUFSIZE]; int zf_endseen; }; diff --git a/usr/src/boot/lib/libstand/net.c b/usr/src/boot/lib/libstand/net.c index 7d775faf17..ae2590a327 100644 --- a/usr/src/boot/lib/libstand/net.c +++ b/usr/src/boot/lib/libstand/net.c @@ -266,7 +266,7 @@ intoa(n_long addr) } static char * -number(char *s, int *n) +number(char *s, uint32_t *n) { for (*n = 0; isdigit(*s); s++) *n = (*n * 10) + *s - '0'; @@ -277,7 +277,7 @@ n_long ip_convertaddr(char *p) { #define IP_ANYADDR 0 - n_long addr = 0, n; + uint32_t addr = 0, n; if (p == NULL || *p == '\0') return (IP_ANYADDR); diff --git a/usr/src/boot/lib/libstand/nfs.c b/usr/src/boot/lib/libstand/nfs.c index d1a941656f..1ca0547c9d 100644 --- a/usr/src/boot/lib/libstand/nfs.c +++ b/usr/src/boot/lib/libstand/nfs.c @@ -826,7 +826,7 @@ nfs_readdir(struct open_file *f, struct dirent *d) fp->off = cookie = ((uint64_t)ntohl(rent->nameplus[pos]) << 32) | ntohl(rent->nameplus[pos + 1]); pos += 2; - buf = (u_char *)&rent->nameplus[pos]; + buf = (char *)&rent->nameplus[pos]; return (0); err: -- 2.11.4.GIT