From owner-svn-src-all@freebsd.org Mon Sep 14 18:59:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0E0EA04A30; Mon, 14 Sep 2015 18:59:02 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C794A1C4B; Mon, 14 Sep 2015 18:59:02 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8EIx2A2017784; Mon, 14 Sep 2015 18:59:02 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8EIx2Hn017780; Mon, 14 Sep 2015 18:59:02 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201509141859.t8EIx2Hn017780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Mon, 14 Sep 2015 18:59:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287797 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Sep 2015 18:59:03 -0000 Author: rodrigc Date: Mon Sep 14 18:59:01 2015 New Revision: 287797 URL: https://svnweb.freebsd.org/changeset/base/287797 Log: Use unsigned variables in a few places. Eliminates gcc 4.9 warnings. Modified: head/lib/libc/gen/getgrent.c head/lib/libc/gen/getpwent.c head/lib/libc/gen/strtofflags.c Modified: head/lib/libc/gen/getgrent.c ============================================================================== --- head/lib/libc/gen/getgrent.c Mon Sep 14 18:58:30 2015 (r287796) +++ head/lib/libc/gen/getgrent.c Mon Sep 14 18:59:01 2015 (r287797) @@ -1238,7 +1238,7 @@ compat_setgrent(void *retval, void *mdat int rv, stayopen; #define set_setent(x, y) do { \ - int i; \ + unsigned int i; \ \ for (i = 0; i < (sizeof(x)/sizeof(x[0])) - 1; i++) \ x[i].mdata = (void *)y; \ @@ -1308,7 +1308,7 @@ compat_group(void *retval, void *mdata, int rv, stayopen, *errnop; #define set_lookup_type(x, y) do { \ - int i; \ + unsigned int i; \ \ for (i = 0; i < (sizeof(x)/sizeof(x[0])) - 1; i++) \ x[i].mdata = (void *)y; \ Modified: head/lib/libc/gen/getpwent.c ============================================================================== --- head/lib/libc/gen/getpwent.c Mon Sep 14 18:58:30 2015 (r287796) +++ head/lib/libc/gen/getpwent.c Mon Sep 14 18:59:01 2015 (r287797) @@ -1607,7 +1607,8 @@ compat_redispatch(struct compat_state *s { NULL, NULL, NULL } }; void *discard; - int rv, e, i; + int rv, e; + unsigned int i; for (i = 0; i < sizeof(dtab)/sizeof(dtab[0]) - 1; i++) dtab[i].mdata = (void *)lookup_how; @@ -1702,7 +1703,7 @@ compat_setpwent(void *retval, void *mdat int rv, stayopen; #define set_setent(x, y) do { \ - int i; \ + unsigned int i; \ \ for (i = 0; i < (sizeof(x)/sizeof(x[0])) - 1; i++) \ x[i].mdata = (void *)y; \ Modified: head/lib/libc/gen/strtofflags.c ============================================================================== --- head/lib/libc/gen/strtofflags.c Mon Sep 14 18:58:30 2015 (r287796) +++ head/lib/libc/gen/strtofflags.c Mon Sep 14 18:59:01 2015 (r287797) @@ -100,7 +100,7 @@ fflagstostr(u_long flags) const char *sp; char *dp; u_long setflags; - int i; + u_int i; if ((string = (char *)malloc(nmappings * (longestflaglen + 1))) == NULL) return (NULL);