I'm pretty sure I got all of the "no effect" casts to off_t and size_t.  
I picked up the void* and char* casts with a less comprehensize search, so 
there may be some that slipped through.

This diff was checked by comparing the .o files before and after, building 
on both an LP64 arch (amd64) and an ILP32 arch (i386).  For a handful of 
files, the joining of lines meant the debug info was altered; for those, 
they still compared as unchanged when the 'before' and 'after' files were 
stripped before comparing them.

ok?

Philip

Index: db/hash/hash.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/db/hash/hash.c,v
retrieving revision 1.28
diff -u -p -r1.28 hash.c
--- db/hash/hash.c      28 Dec 2015 22:08:18 -0000      1.28
+++ db/hash/hash.c      19 Sep 2016 11:48:15 -0000
@@ -477,7 +477,7 @@ flush_meta(HTAB *hashp)
        whdrp = &whdr;
        swap_header_copy(&hashp->hdr, whdrp);
 #endif
-       if ((wsize = pwrite(fp, whdrp, sizeof(HASHHDR), (off_t)0)) == -1)
+       if ((wsize = pwrite(fp, whdrp, sizeof(HASHHDR), 0)) == -1)
                return (-1);
        else
                if (wsize != sizeof(HASHHDR)) {
Index: db/recno/rec_close.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/db/recno/rec_close.c,v
retrieving revision 1.12
diff -u -p -r1.12 rec_close.c
--- db/recno/rec_close.c        16 Jul 2015 04:27:33 -0000      1.12
+++ db/recno/rec_close.c        19 Sep 2016 11:48:34 -0000
@@ -124,7 +124,7 @@ __rec_sync(const DB *dbp, u_int flags)
                return (RET_ERROR);
 
        /* Rewind the file descriptor. */
-       if (lseek(t->bt_rfd, (off_t)0, SEEK_SET) != 0)
+       if (lseek(t->bt_rfd, 0, SEEK_SET) != 0)
                return (RET_ERROR);
 
        /* Save the cursor. */
@@ -164,7 +164,7 @@ __rec_sync(const DB *dbp, u_int flags)
 
        if (status == RET_ERROR)
                return (RET_ERROR);
-       if ((off = lseek(t->bt_rfd, (off_t)0, SEEK_CUR)) == -1)
+       if ((off = lseek(t->bt_rfd, 0, SEEK_CUR)) == -1)
                return (RET_ERROR);
        if (ftruncate(t->bt_rfd, off))
                return (RET_ERROR);
Index: db/recno/rec_open.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/db/recno/rec_open.c,v
retrieving revision 1.12
diff -u -p -r1.12 rec_open.c
--- db/recno/rec_open.c 16 Jul 2015 04:27:33 -0000      1.12
+++ db/recno/rec_open.c 19 Sep 2016 11:48:40 -0000
@@ -112,7 +112,7 @@ __rec_open(const char *fname, int flags,
                 * and check the errno values.
                 */
                errno = 0;
-               if (lseek(rfd, (off_t)0, SEEK_CUR) == -1 && errno == ESPIPE) {
+               if (lseek(rfd, 0, SEEK_CUR) == -1 && errno == ESPIPE) {
                        switch (flags & O_ACCMODE) {
                        case O_RDONLY:
                                F_SET(t, R_RDONLY);
Index: gdtoa/misc.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/gdtoa/misc.c,v
retrieving revision 1.6
diff -u -p -r1.6 misc.c
--- gdtoa/misc.c        10 Sep 2015 11:11:04 -0000      1.6
+++ gdtoa/misc.c        19 Sep 2016 12:15:53 -0000
@@ -102,9 +102,9 @@ Bfree
        if (v) {
                if (v->k > Kmax)
 #ifdef FREE
-                       FREE((void*)v);
+                       FREE(v);
 #else
-                       free((void*)v);
+                       free(v);
 #endif
                else {
                        ACQUIRE_DTOA_LOCK(0);
Index: gen/fts.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/gen/fts.c,v
retrieving revision 1.55
diff -u -p -r1.55 fts.c
--- gen/fts.c   28 Jun 2016 17:21:48 -0000      1.55
+++ gen/fts.c   19 Sep 2016 12:16:51 -0000
@@ -654,7 +654,7 @@ fts_build(FTS *sp, int type)
                if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
                        continue;
 
-               if (!(p = fts_alloc(sp, dp->d_name, (size_t)dp->d_namlen)))
+               if (!(p = fts_alloc(sp, dp->d_name, dp->d_namlen)))
                        goto mem1;
                if (dp->d_namlen >= maxlen) {   /* include space for NUL */
                        oldaddr = sp->fts_path;
@@ -894,7 +894,7 @@ fts_sort(FTS *sp, FTSENT *head, int nite
        }
        for (ap = sp->fts_array, p = head; p; p = p->fts_link)
                *ap++ = p;
-       qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
+       qsort(sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
        for (head = *(ap = sp->fts_array); --nitems; ++ap)
                ap[0]->fts_link = ap[1];
        ap[0]->fts_link = NULL;
Index: gen/getcap.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/gen/getcap.c,v
retrieving revision 1.33
diff -u -p -r1.33 getcap.c
--- gen/getcap.c        14 Sep 2015 16:09:13 -0000      1.33
+++ gen/getcap.c        19 Sep 2016 12:01:34 -0000
@@ -537,8 +537,7 @@ tc_exp:     {
        if (r_end > rp) {
                char *nrecord;
 
-               if ((nrecord =
-                    realloc(record, (size_t)(rp - record))) == NULL) {
+               if ((nrecord = realloc(record, rp - record)) == NULL) {
                        free(record);
                        errno = ENOMEM;
                        return (-2);
@@ -772,7 +771,7 @@ cgetnext(char **cap, char **db_array)
                 */
                if (*record != '\0' && *record != '#') {
                        /* Rewind to end of record */
-                       fseeko(pfp, (off_t)(bp - b_end), SEEK_CUR);
+                       fseeko(pfp, bp - b_end, SEEK_CUR);
                        toprec = record;
                        topreclen = rp - record;
                        break;
@@ -924,7 +923,7 @@ cgetstr(char *buf, const char *cap, char
        if (m_room != 0) {
                char *nmem;
 
-               if ((nmem = realloc(mem, (size_t)(mp - mem))) == NULL) {
+               if ((nmem = realloc(mem, mp - mem)) == NULL) {
                        free(mem);
                        return (-2);
                }
Index: gen/nlist.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/gen/nlist.c,v
retrieving revision 1.66
diff -u -p -r1.66 nlist.c
--- gen/nlist.c 29 Dec 2015 22:31:21 -0000      1.66
+++ gen/nlist.c 19 Sep 2016 11:51:22 -0000
@@ -101,7 +101,7 @@ __fdnlist(int fd, struct nlist *list)
        size_t left, len;
 
        /* Make sure obj is OK */
-       if (pread(fd, &ehdr, sizeof(Elf_Ehdr), (off_t)0) != sizeof(Elf_Ehdr) ||
+       if (pread(fd, &ehdr, sizeof(Elf_Ehdr), 0) != sizeof(Elf_Ehdr) ||
            !__elf_is_okay__(&ehdr) || fstat(fd, &st) < 0)
                return (-1);
 
@@ -116,15 +116,14 @@ __fdnlist(int fd, struct nlist *list)
        }
 
        /* mmap section header table */
-       shdr = (Elf_Shdr *)mmap(NULL, (size_t)shdr_size, PROT_READ,
-           MAP_SHARED|MAP_FILE, fd, (off_t) ehdr.e_shoff);
+       shdr = mmap(NULL, shdr_size, PROT_READ, MAP_SHARED|MAP_FILE, fd,
+           ehdr.e_shoff);
        if (shdr == MAP_FAILED) {
                usemalloc = 1;
                if ((shdr = malloc(shdr_size)) == NULL)
                        return (-1);
 
-               if (pread(fd, shdr, shdr_size, (off_t)ehdr.e_shoff) !=
-                   shdr_size) {
+               if (pread(fd, shdr, shdr_size, ehdr.e_shoff) != shdr_size) {
                        free(shdr);
                        return (-1);
                }
@@ -194,21 +193,20 @@ __fdnlist(int fd, struct nlist *list)
        if (usemalloc) {
                if ((strtab = malloc(symstrsize)) == NULL)
                        return (-1);
-               if (pread(fd, strtab, symstrsize, (off_t)symstroff) !=
-                   symstrsize) {
+               if (pread(fd, strtab, symstrsize, symstroff) != symstrsize) {
                        free(strtab);
                        return (-1);
                }
        } else {
-               strtab = mmap(NULL, (size_t)symstrsize, PROT_READ,
-                   MAP_SHARED|MAP_FILE, fd, (off_t) symstroff);
+               strtab = mmap(NULL, symstrsize, PROT_READ, MAP_SHARED|MAP_FILE,
+                   fd, symstroff);
                if (strtab == MAP_FAILED)
                        return (-1);
        }
 
        while (symsize >= sizeof(Elf_Sym)) {
                cc = MINIMUM(symsize, sizeof(sbuf));
-               if (pread(fd, sbuf, cc, (off_t)symoff) != cc)
+               if (pread(fd, sbuf, cc, symoff) != cc)
                        break;
                symsize -= cc;
                symoff += cc;
Index: gen/opendir.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/gen/opendir.c,v
retrieving revision 1.29
diff -u -p -r1.29 opendir.c
--- gen/opendir.c       12 Sep 2015 13:34:22 -0000      1.29
+++ gen/opendir.c       19 Sep 2016 12:01:54 -0000
@@ -107,7 +107,7 @@ __fdopendir(int fd)
 
        pageoffset = getpagesize() - 1;
        dirp->dd_len = ((int)sb.st_blksize * 4 + pageoffset) & ~pageoffset;
-       dirp->dd_buf = malloc((size_t)dirp->dd_len);
+       dirp->dd_buf = malloc(dirp->dd_len);
        if (dirp->dd_buf == NULL) {
                free(dirp);
                return (NULL);
Index: gmon/gmon.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/gmon/gmon.c,v
retrieving revision 1.29
diff -u -p -r1.29 gmon.c
--- gmon/gmon.c 7 May 2016 19:30:52 -0000       1.29
+++ gmon/gmon.c 19 Sep 2016 11:52:09 -0000
@@ -77,19 +77,19 @@ monstartup(u_long lowpc, u_long highpc)
        p->tossize = p->tolimit * sizeof(struct tostruct);
 
        addr = mmap(NULL, p->kcountsize,  PROT_READ|PROT_WRITE,
-           MAP_ANON|MAP_PRIVATE, -1, (off_t)0);
+           MAP_ANON|MAP_PRIVATE, -1, 0);
        if (addr == MAP_FAILED)
                goto mapfailed;
        p->kcount = addr;
 
        addr = mmap(NULL, p->fromssize,  PROT_READ|PROT_WRITE,
-           MAP_ANON|MAP_PRIVATE, -1, (off_t)0);
+           MAP_ANON|MAP_PRIVATE, -1, 0);
        if (addr == MAP_FAILED)
                goto mapfailed;
        p->froms = addr;
 
        addr = mmap(NULL, p->tossize,  PROT_READ|PROT_WRITE,
-           MAP_ANON|MAP_PRIVATE, -1, (off_t)0);
+           MAP_ANON|MAP_PRIVATE, -1, 0);
        if (addr == MAP_FAILED)
                goto mapfailed;
        p->tos = addr;
Index: net/ethers.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/net/ethers.c,v
retrieving revision 1.24
diff -u -p -r1.24 ethers.c
--- net/ethers.c        14 Sep 2015 11:01:47 -0000      1.24
+++ net/ethers.c        19 Sep 2016 12:17:33 -0000
@@ -144,7 +144,7 @@ ether_ntohost(char *hostname, struct eth
                }
 #endif
                if (ether_line(buf, &try, hostname) == 0 &&
-                   memcmp((void *)&try, (void *)e, sizeof(try)) == 0) {
+                   memcmp(&try, e, sizeof(try)) == 0) {
                        (void)fclose(f);
                        return (0);
                }     
Index: net/freeaddrinfo.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/net/freeaddrinfo.c,v
retrieving revision 1.8
diff -u -p -r1.8 freeaddrinfo.c
--- net/freeaddrinfo.c  28 Dec 2015 22:08:18 -0000      1.8
+++ net/freeaddrinfo.c  19 Sep 2016 12:17:41 -0000
@@ -44,7 +44,7 @@ freeaddrinfo(struct addrinfo *ai)
                p = ai;
                ai = ai->ai_next;
                free(p->ai_canonname);
-               free((void *)p);
+               free(p);
        } while (ai);
 }
 DEF_WEAK(freeaddrinfo);
Index: net/inet_ntop.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/net/inet_ntop.c,v
retrieving revision 1.12
diff -u -p -r1.12 inet_ntop.c
--- net/inet_ntop.c     13 Sep 2015 21:36:08 -0000      1.12
+++ net/inet_ntop.c     19 Sep 2016 12:04:36 -0000
@@ -46,9 +46,9 @@ inet_ntop(int af, const void *src, char 
 {
        switch (af) {
        case AF_INET:
-               return (inet_ntop4(src, dst, (size_t)size));
+               return (inet_ntop4(src, dst, size));
        case AF_INET6:
-               return (inet_ntop6(src, dst, (size_t)size));
+               return (inet_ntop6(src, dst, size));
        default:
                errno = EAFNOSUPPORT;
                return (NULL);
@@ -167,7 +167,7 @@ inet_ntop6(const u_char *src, char *dst,
                /* Is this address an encapsulated IPv4? */
                if (i == 6 && best.base == 0 &&
                    (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
-                       if (!inet_ntop4(src+12, tp, (size_t)(ep - tp)))
+                       if (!inet_ntop4(src+12, tp, ep - tp))
                                return (NULL);
                        tp += strlen(tp);
                        break;
Index: net/rthdr.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/net/rthdr.c,v
retrieving revision 1.11
diff -u -p -r1.11 rthdr.c
--- net/rthdr.c 14 Sep 2015 11:01:47 -0000      1.11
+++ net/rthdr.c 19 Sep 2016 12:18:03 -0000
@@ -120,8 +120,7 @@ inet6_rth_reverse(const void *in, void *
                segments = rth0_in->ip6r0_len / 2;
 
                /* we can't use memcpy here, since in and out may overlap */
-               memmove((void *)rth0_out, (void *)rth0_in,
-                       ((rth0_in->ip6r0_len) + 1) << 3);
+               memmove(rth0_out, rth0_in, ((rth0_in->ip6r0_len) + 1) << 3);
                rth0_out->ip6r0_segleft = segments;
 
                /* reverse the addresses */
Index: nls/catopen.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/nls/catopen.c,v
retrieving revision 1.19
diff -u -p -r1.19 catopen.c
--- nls/catopen.c       5 Nov 2015 23:38:07 -0000       1.19
+++ nls/catopen.c       19 Sep 2016 12:04:47 -0000
@@ -184,7 +184,7 @@ load_msgcat(const char *path)
                return (nl_catd) -1;
        }
 
-       data = mmap(0, (size_t)st.st_size, PROT_READ, MAP_SHARED, fd, (off_t)0);
+       data = mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
        close (fd);
 
        if (data == MAP_FAILED)
@@ -206,7 +206,7 @@ load_msgcat(const char *path)
 
 invalid:
        free(catd);
-       munmap(data, (size_t) st.st_size);
+       munmap(data, st.st_size);
        errno = EINVAL;
        return (nl_catd) -1;
 }
Index: regex/engine.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/regex/engine.c,v
retrieving revision 1.23
diff -u -p -r1.23 engine.c
--- regex/engine.c      26 May 2016 05:46:44 -0000      1.23
+++ regex/engine.c      19 Sep 2016 12:05:07 -0000
@@ -156,7 +156,7 @@ matcher(struct re_guts *g, char *string,
        if (g->must != NULL) {
                for (dp = start; dp < stop; dp++)
                        if (*dp == g->must[0] && stop - dp >= g->mlen &&
-                           memcmp(dp, g->must, (size_t)g->mlen) == 0)
+                           memcmp(dp, g->must, g->mlen) == 0)
                                break;
                if (dp == stop)         /* we didn't find g->must */
                        return(REG_NOMATCH);
Index: rpc/xdr_rec.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/rpc/xdr_rec.c,v
retrieving revision 1.21
diff -u -p -r1.21 xdr_rec.c
--- rpc/xdr_rec.c       4 Oct 2015 06:37:21 -0000       1.21
+++ rpc/xdr_rec.c       19 Sep 2016 12:06:55 -0000
@@ -321,8 +321,8 @@ xdrrec_getpos(XDR *xdrs)
        RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
        off_t pos;
 
-       pos = lseek((int)(long)rstrm->tcp_handle, (off_t)0, SEEK_CUR);
-       if (pos != (off_t)-1)
+       pos = lseek((int)(long)rstrm->tcp_handle, 0, SEEK_CUR);
+       if (pos != -1)
                switch (xdrs->x_op) {
 
                case XDR_ENCODE:
@@ -646,7 +646,7 @@ get_input_bytes(RECSTREAM *rstrm, caddr_
        if (rstrm->nonblock) {
                if (len > (int)(rstrm->in_boundry - rstrm->in_finger))
                        return FALSE;
-               memcpy(addr, rstrm->in_finger, (size_t)len);
+               memcpy(addr, rstrm->in_finger, len);
                rstrm->in_finger += len;
                return (TRUE);
        }
@@ -730,7 +730,7 @@ realloc_stream(RECSTREAM *rstrm, int siz
        char *buf;
 
        if (size > rstrm->recvsize) {
-               buf = realloc(rstrm->in_base, (size_t)size);
+               buf = realloc(rstrm->in_base, size);
                if (buf == NULL)
                        return (FALSE);
                diff = buf - rstrm->in_base;
Index: stdio/fgetln.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdio/fgetln.c,v
retrieving revision 1.15
diff -u -p -r1.15 fgetln.c
--- stdio/fgetln.c      25 Aug 2016 19:21:33 -0000      1.15
+++ stdio/fgetln.c      19 Sep 2016 12:12:44 -0000
@@ -76,7 +76,7 @@ fgetln(FILE *fp, size_t *lenp)
                goto error;
 
        /* look for a newline in the input */
-       if ((p = memchr((void *)fp->_p, '\n', fp->_r)) != NULL) {
+       if ((p = memchr(fp->_p, '\n', fp->_r)) != NULL) {
                /*
                 * Found one.  Flag buffer as modified to keep fseek from
                 * `optimising' a backward seek, in case the user stomps on
@@ -112,15 +112,14 @@ fgetln(FILE *fp, size_t *lenp)
                 */
                if (__slbexpand(fp, len + OPTIMISTIC))
                        goto error;
-               (void)memcpy((void *)(fp->_lb._base + off), (void *)fp->_p,
-                   len - off);
+               (void)memcpy(fp->_lb._base + off, fp->_p, len - off);
                off = len;
                if (__srefill(fp)) {
                        if (fp->_flags & __SEOF)
                                break;
                        goto error;
                }
-               if ((p = memchr((void *)fp->_p, '\n', fp->_r)) == NULL)
+               if ((p = memchr(fp->_p, '\n', fp->_r)) == NULL)
                        continue;
 
                /* got it: finish up the line (like code above) */
@@ -129,8 +128,7 @@ fgetln(FILE *fp, size_t *lenp)
                len += diff;
                if (__slbexpand(fp, len))
                        goto error;
-               (void)memcpy((void *)(fp->_lb._base + off), (void *)fp->_p,
-                   diff);
+               (void)memcpy(fp->_lb._base + off, fp->_p, diff);
                fp->_r -= diff;
                fp->_p = p;
                break;
Index: stdio/fgets.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdio/fgets.c,v
retrieving revision 1.15
diff -u -p -r1.15 fgets.c
--- stdio/fgets.c       31 Aug 2015 02:53:57 -0000      1.15
+++ stdio/fgets.c       19 Sep 2016 12:13:06 -0000
@@ -83,19 +83,19 @@ fgets(char *buf, int n, FILE *fp)
                 */
                if (len > n)
                        len = n;
-               t = memchr((void *)p, '\n', len);
+               t = memchr(p, '\n', len);
                if (t != NULL) {
                        len = ++t - p;
                        fp->_r -= len;
                        fp->_p = t;
-                       (void)memcpy((void *)s, (void *)p, len);
+                       (void)memcpy(s, p, len);
                        s[len] = '\0';
                        FUNLOCKFILE(fp);
                        return (buf);
                }
                fp->_r -= len;
                fp->_p += len;
-               (void)memcpy((void *)s, (void *)p, len);
+               (void)memcpy(s, p, len);
                s += len;
                n -= len;
        }
Index: stdio/fopen.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdio/fopen.c,v
retrieving revision 1.8
diff -u -p -r1.8 fopen.c
--- stdio/fopen.c       31 Aug 2015 02:53:57 -0000      1.8
+++ stdio/fopen.c       19 Sep 2016 12:14:29 -0000
@@ -81,7 +81,7 @@ fopen(const char *file, const char *mode
         * fseek and ftell.)
         */
        if (oflags & O_APPEND)
-               (void) __sseek((void *)fp, (fpos_t)0, SEEK_END);
+               (void) __sseek(fp, 0, SEEK_END);
        return (fp);
 }
 DEF_STRONG(fopen);
Index: stdio/fread.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdio/fread.c,v
retrieving revision 1.14
diff -u -p -r1.14 fread.c
--- stdio/fread.c       31 Aug 2015 02:53:57 -0000      1.14
+++ stdio/fread.c       19 Sep 2016 12:07:47 -0000
@@ -84,7 +84,7 @@ fread(void *buf, size_t size, size_t cou
        }
 
        while (resid > (r = fp->_r)) {
-               (void)memcpy((void *)p, (void *)fp->_p, (size_t)r);
+               (void)memcpy(p, fp->_p, r);
                fp->_p += r;
                /* fp->_r = 0 ... done in __srefill */
                p += r;
@@ -95,7 +95,7 @@ fread(void *buf, size_t size, size_t cou
                        return ((total - resid) / size);
                }
        }
-       (void)memcpy((void *)p, (void *)fp->_p, resid);
+       (void)memcpy(p, fp->_p, resid);
        fp->_r -= resid;
        fp->_p += resid;
        FUNLOCKFILE(fp);
Index: stdio/freopen.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdio/freopen.c,v
retrieving revision 1.15
diff -u -p -r1.15 freopen.c
--- stdio/freopen.c     31 Aug 2015 02:53:57 -0000      1.15
+++ stdio/freopen.c     19 Sep 2016 12:13:28 -0000
@@ -165,7 +165,7 @@ freopen(const char *file, const char *mo
         * fseek and ftell.)
         */
        if (oflags & O_APPEND)
-               (void) __sseek((void *)fp, (fpos_t)0, SEEK_END);
+               (void) __sseek(fp, 0, SEEK_END);
        FUNLOCKFILE(fp);
        return (fp);
 }
Index: stdio/fsetpos.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdio/fsetpos.c,v
retrieving revision 1.7
diff -u -p -r1.7 fsetpos.c
--- stdio/fsetpos.c     31 Aug 2015 02:53:57 -0000      1.7
+++ stdio/fsetpos.c     19 Sep 2016 11:54:07 -0000
@@ -39,6 +39,6 @@
 int
 fsetpos(FILE *iop, const fpos_t *pos)
 {
-       return (fseeko(iop, (off_t)*pos, SEEK_SET));
+       return (fseeko(iop, *pos, SEEK_SET));
 }
 DEF_STRONG(fsetpos);
Index: stdio/fvwrite.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdio/fvwrite.c,v
retrieving revision 1.17
diff -u -p -r1.17 fvwrite.c
--- stdio/fvwrite.c     9 Nov 2009 00:18:27 -0000       1.17
+++ stdio/fvwrite.c     19 Sep 2016 12:08:21 -0000
@@ -63,7 +63,7 @@ __sfvwrite(FILE *fp, struct __suio *uio)
        }
 
 #define        MIN(a, b) ((a) < (b) ? (a) : (b))
-#define        COPY(n)   (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n))
+#define        COPY(n)   (void)memcpy(fp->_p, p, n)
 
        iov = uio->uio_iov;
        p = iov->iov_base;
@@ -164,7 +164,7 @@ __sfvwrite(FILE *fp, struct __suio *uio)
                do {
                        GETIOV(nlknown = 0);
                        if (!nlknown) {
-                               nl = memchr((void *)p, '\n', len);
+                               nl = memchr(p, '\n', len);
                                nldist = nl ? nl + 1 - p : len + 1;
                                nlknown = 1;
                        }
Index: stdio/getdelim.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdio/getdelim.c,v
retrieving revision 1.4
diff -u -p -r1.4 getdelim.c
--- stdio/getdelim.c    31 Aug 2015 02:53:57 -0000      1.4
+++ stdio/getdelim.c    19 Sep 2016 12:09:09 -0000
@@ -73,7 +73,7 @@ getdelim(char **__restrict buf, size_t *
                }
 
                /* Scan through looking for the separator */
-               p = memchr(fp->_p, sep, (size_t)fp->_r);
+               p = memchr(fp->_p, sep, fp->_r);
                if (p == NULL)
                        len = fp->_r;
                else
Index: stdio/getw.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdio/getw.c,v
retrieving revision 1.6
diff -u -p -r1.6 getw.c
--- stdio/getw.c        31 Aug 2015 02:53:57 -0000      1.6
+++ stdio/getw.c        19 Sep 2016 12:13:39 -0000
@@ -38,6 +38,6 @@ getw(FILE *fp)
 {
        int x;
 
-       return (fread((void *)&x, sizeof(x), 1, fp) == 1 ? x : EOF);
+       return (fread(&x, sizeof(x), 1, fp) == 1 ? x : EOF);
 }
 DEF_WEAK(getw);
Index: stdio/setbuffer.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdio/setbuffer.c,v
retrieving revision 1.6
diff -u -p -r1.6 setbuffer.c
--- stdio/setbuffer.c   31 Aug 2015 02:53:57 -0000      1.6
+++ stdio/setbuffer.c   19 Sep 2016 12:08:38 -0000
@@ -48,6 +48,6 @@ int
 setlinebuf(FILE *fp)
 {
 
-       return (setvbuf(fp, (char *)NULL, _IOLBF, (size_t)0));
+       return (setvbuf(fp, NULL, _IOLBF, 0));
 }
 DEF_WEAK(setlinebuf);
Index: stdio/setvbuf.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdio/setvbuf.c,v
retrieving revision 1.13
diff -u -p -r1.13 setvbuf.c
--- stdio/setvbuf.c     31 Aug 2015 02:53:57 -0000      1.13
+++ stdio/setvbuf.c     19 Sep 2016 12:13:56 -0000
@@ -70,7 +70,7 @@ setvbuf(FILE *fp, char *buf, int mode, s
        fp->_r = fp->_lbfsize = 0;
        flags = fp->_flags;
        if (flags & __SMBF)
-               free((void *)fp->_bf._base);
+               free(fp->_bf._base);
        flags &= ~(__SLBF | __SNBF | __SMBF | __SOPT | __SNPT | __SEOF);
 
        /* If setting unbuffered mode, skip all the hard work. */
Index: stdio/stdio.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdio/stdio.c,v
retrieving revision 1.9
diff -u -p -r1.9 stdio.c
--- stdio/stdio.c       8 Aug 2005 08:05:36 -0000       1.9
+++ stdio/stdio.c       19 Sep 2016 06:51:20 -0000
@@ -31,9 +31,8 @@
  * SUCH DAMAGE.
  */
 
-#include <fcntl.h>
-#include <unistd.h>
 #include <stdio.h>
+#include <unistd.h>
 #include "local.h"
 
 /*
@@ -61,7 +60,7 @@ __swrite(void *cookie, const char *buf, 
        FILE *fp = cookie;
 
        if (fp->_flags & __SAPP)
-               (void) lseek(fp->_file, (off_t)0, SEEK_END);
+               (void) lseek(fp->_file, 0, SEEK_END);
        fp->_flags &= ~__SOFF;  /* in case FAPPEND mode is set */
        return (write(fp->_file, buf, n));
 }
@@ -72,8 +71,8 @@ __sseek(void *cookie, fpos_t offset, int
        FILE *fp = cookie;
        off_t ret;
        
-       ret = lseek(fp->_file, (off_t)offset, whence);
-       if (ret == (off_t)-1)
+       ret = lseek(fp->_file, offset, whence);
+       if (ret == -1)
                fp->_flags &= ~__SOFF;
        else {
                fp->_flags |= __SOFF;
Index: stdio/ungetc.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdio/ungetc.c,v
retrieving revision 1.14
diff -u -p -r1.14 ungetc.c
--- stdio/ungetc.c      31 Aug 2015 02:53:57 -0000      1.14
+++ stdio/ungetc.c      19 Sep 2016 12:09:01 -0000
@@ -53,7 +53,7 @@ __submore(FILE *fp)
                /*
                 * Get a new buffer (rather than expanding the old one).
                 */
-               if ((p = malloc((size_t)BUFSIZ)) == NULL)
+               if ((p = malloc(BUFSIZ)) == NULL)
                        return (EOF);
                _UB(fp)._base = p;
                _UB(fp)._size = BUFSIZ;
@@ -68,7 +68,7 @@ __submore(FILE *fp)
        if (p == NULL)
                return (EOF);
        /* no overlap (hence can use memcpy) because we doubled the size */
-       (void)memcpy((void *)(p + i), (void *)p, (size_t)i);
+       (void)memcpy(p + i, p, i);
        fp->_p = p + i;
        _UB(fp)._base = p;
        _UB(fp)._size = i * 2;
Index: stdio/vfscanf.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdio/vfscanf.c,v
retrieving revision 1.32
diff -u -p -r1.32 vfscanf.c
--- stdio/vfscanf.c     31 Aug 2015 02:53:57 -0000      1.32
+++ stdio/vfscanf.c     19 Sep 2016 12:14:20 -0000
@@ -401,7 +401,7 @@ literal:
                                }
                                nread += sum;
                        } else {
-                               size_t r = fread((void *)va_arg(ap, char *), 1,
+                               size_t r = fread(va_arg(ap, char *), 1,
                                    width, fp);
 
                                if (r == 0)
Index: stdlib/malloc.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdlib/malloc.c,v
retrieving revision 1.196
diff -u -p -r1.196 malloc.c
--- stdlib/malloc.c     18 Sep 2016 13:46:28 -0000      1.196
+++ stdlib/malloc.c     19 Sep 2016 11:55:20 -0000
@@ -83,14 +83,14 @@
 #define SOME_JUNK              0xd0    /* as in "Duh" :-) */
 #define SOME_FREEJUNK          0xdf
 
-#define MMAP(sz)       mmap(NULL, (size_t)(sz), PROT_READ | PROT_WRITE, \
-    MAP_ANON | MAP_PRIVATE, -1, (off_t) 0)
+#define MMAP(sz)       mmap(NULL, (sz), PROT_READ | PROT_WRITE, \
+    MAP_ANON | MAP_PRIVATE, -1, 0)
 
-#define MMAPA(a,sz)    mmap((a), (size_t)(sz), PROT_READ | PROT_WRITE, \
-    MAP_ANON | MAP_PRIVATE, -1, (off_t) 0)
+#define MMAPA(a,sz)    mmap((a), (sz), PROT_READ | PROT_WRITE, \
+    MAP_ANON | MAP_PRIVATE, -1, 0)
 
-#define MQUERY(a, sz)  mquery((a), (size_t)(sz), PROT_READ | PROT_WRITE, \
-    MAP_ANON | MAP_PRIVATE | MAP_FIXED, -1, (off_t)0)
+#define MQUERY(a, sz)  mquery((a), (sz), PROT_READ | PROT_WRITE, \
+    MAP_ANON | MAP_PRIVATE | MAP_FIXED, -1, 0)
 
 struct region_info {
        void *p;                /* page; low bits used to mark chunks */
@@ -1231,6 +1231,7 @@ _malloc_init(int from_rthreads)
                mprotect(&malloc_readonly, sizeof(malloc_readonly), PROT_READ);
        _MALLOC_UNLOCK(0);
 }
+DEF_STRONG(_malloc_init);
 
 void *
 malloc(size_t size)
Index: stdlib/setenv.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/stdlib/setenv.c,v
retrieving revision 1.18
diff -u -p -r1.18 setenv.c
--- stdlib/setenv.c     25 Apr 2016 21:36:04 -0000      1.18
+++ stdlib/setenv.c     19 Sep 2016 12:09:46 -0000
@@ -141,7 +141,7 @@ setenv(const char *name, const char *val
                environ[cnt + 1] = NULL;
        }
        if (!(environ[offset] =                 /* name + `=' + value */
-           malloc((size_t)((int)(np - name) + l_value + 2))))
+           malloc((int)(np - name) + l_value + 2)))
                return (-1);
        for (C = environ[offset]; (*C = *name++) && *C != '='; ++C)
                ;
Index: time/strftime.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/time/strftime.c,v
retrieving revision 1.29
diff -u -p -r1.29 strftime.c
--- time/strftime.c     25 Dec 2015 19:10:29 -0000      1.29
+++ time/strftime.c     19 Sep 2016 12:10:06 -0000
@@ -680,7 +680,7 @@ _loc(void)
        (void) strlcpy(lbuf, name, bufsize);
        p = lbuf + namesize;
        plim = p + st.st_size;
-       if (read(fd, p, (size_t) st.st_size) != st.st_size)
+       if (read(fd, p, st.st_size) != st.st_size)
                goto bad_lbuf;
        if (close(fd) != 0)
                goto bad_lbuf;
Index: hash/helper.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/hash/helper.c,v
retrieving revision 1.15
diff -u -p -r1.15 helper.c
--- hash/helper.c       1 Nov 2015 03:45:29 -0000       1.15
+++ hash/helper.c       19 Sep 2016 12:02:29 -0000
@@ -82,7 +82,7 @@ HASHFileChunk(const char *filename, char
        }
 
        while ((nr = read(fd, buffer, MINIMUM(sizeof(buffer), len))) > 0) {
-               HASHUpdate(&ctx, buffer, (size_t)nr);
+               HASHUpdate(&ctx, buffer, nr);
                if (len > 0 && (len -= nr) == 0)
                        break;
        }
@@ -97,7 +97,7 @@ DEF_WEAK(HASHFileChunk);
 char *
 HASHFile(const char *filename, char *buf)
 {
-       return (HASHFileChunk(filename, buf, (off_t)0, (off_t)0));
+       return (HASHFileChunk(filename, buf, 0, 0));
 }
 DEF_WEAK(HASHFile);
 
Index: regex/regcomp.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/regex/regcomp.c,v
retrieving revision 1.28
diff -u -p -r1.28 regcomp.c
--- regex/regcomp.c     28 Dec 2015 22:08:18 -0000      1.28
+++ regex/regcomp.c     20 Sep 2016 02:26:08 -0000
@@ -1294,8 +1294,7 @@ dupl(struct parse *p,
                return(ret);
        if (!enlarge(p, p->ssize + len)) /* this many unexpected additions */
                return(ret);
-       (void) memcpy((char *)(p->strip + p->slen),
-               (char *)(p->strip + start), (size_t)len*sizeof(sop));
+       (void) memcpy(p->strip + p->slen, p->strip + start, len * sizeof(sop));
        p->slen += len;
        return(ret);
 }

Reply via email to