Author: bz Date: Mon Sep 8 08:12:09 2014 New Revision: 271251 URL: http://svnweb.freebsd.org/changeset/base/271251
Log: Use __DECONST to avoid compiler warnings (and thus build failures) with gcc on sparc64, mips, and powerpc after r271173. Modified: head/sys/libkern/memmem.c Modified: head/sys/libkern/memmem.c ============================================================================== --- head/sys/libkern/memmem.c Mon Sep 8 07:37:03 2014 (r271250) +++ head/sys/libkern/memmem.c Mon Sep 8 08:12:09 2014 (r271251) @@ -52,9 +52,9 @@ memmem(const void *l, size_t l_len, cons return memchr(l, (int)*cs, l_len); /* the last position where its possible to find "s" in "l" */ - last = (char *)cl + l_len - s_len; + last = __DECONST(char *, cl) + l_len - s_len; - for (cur = (char *)cl; cur <= last; cur++) + for (cur = __DECONST(char *, cl); cur <= last; cur++) if (cur[0] == cs[0] && memcmp(cur, cs, s_len) == 0) return cur; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"