Date: Sun, 23 Jun 2019 10:47:07 +0000 (UTC) From: Alex Richardson <arichardson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349298 - head/lib/libc/gen Message-ID: <201906231047.x5NAl7OC088291@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arichardson Date: Sun Jun 23 10:47:07 2019 New Revision: 349298 URL: https://svnweb.freebsd.org/changeset/base/349298 Log: Fix two WARNS=6 warnings in opendir.c and telldir.c This is in preparation for compiling these files as part of rtld (which is built with WARNS=6). See https://reviews.freebsd.org/D20663 for more details. Modified: head/lib/libc/gen/opendir.c head/lib/libc/gen/telldir.c Modified: head/lib/libc/gen/opendir.c ============================================================================== --- head/lib/libc/gen/opendir.c Sun Jun 23 10:45:50 2019 (r349297) +++ head/lib/libc/gen/opendir.c Sun Jun 23 10:47:07 2019 (r349298) @@ -99,8 +99,8 @@ static int opendir_compar(const void *p1, const void *p2) { - return (strcmp((*(const struct dirent **)p1)->d_name, - (*(const struct dirent **)p2)->d_name)); + return (strcmp((*(const struct dirent * const *)p1)->d_name, + (*(const struct dirent * const *)p2)->d_name)); } /* Modified: head/lib/libc/gen/telldir.c ============================================================================== --- head/lib/libc/gen/telldir.c Sun Jun 23 10:45:50 2019 (r349297) +++ head/lib/libc/gen/telldir.c Sun Jun 23 10:47:07 2019 (r349298) @@ -63,8 +63,8 @@ telldir(DIR *dirp) * 2) Otherwise, see if it's already been recorded in the linked list * 3) Otherwise, malloc a new one */ - if (dirp->dd_seek < (1ul << DD_SEEK_BITS) && - dirp->dd_loc < (1ul << DD_LOC_BITS)) { + if (dirp->dd_seek < (off_t)(1l << DD_SEEK_BITS) && + dirp->dd_loc < (1l << DD_LOC_BITS)) { ddloc.s.is_packed = 1; ddloc.s.loc = dirp->dd_loc; ddloc.s.seek = dirp->dd_seek;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906231047.x5NAl7OC088291>