From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 16:33:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A88BFB9; Thu, 8 Jan 2015 16:33:17 +0000 (UTC) Received: from svn.freebsd.org (svn.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 5CB74782; Thu, 8 Jan 2015 16:33:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t08GXHoO066216; Thu, 8 Jan 2015 16:33:17 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08GXGRb066212; Thu, 8 Jan 2015 16:33:16 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501081633.t08GXGRb066212@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 8 Jan 2015 16:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276832 - head/usr.bin/sed 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.18-1 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: Thu, 08 Jan 2015 16:33:17 -0000 Author: pfg Date: Thu Jan 8 16:33:15 2015 New Revision: 276832 URL: https://svnweb.freebsd.org/changeset/base/276832 Log: sed: Address warnings with clang and gcc48. MFC after: 2 weeks Modified: head/usr.bin/sed/Makefile head/usr.bin/sed/main.c head/usr.bin/sed/process.c Modified: head/usr.bin/sed/Makefile ============================================================================== --- head/usr.bin/sed/Makefile Thu Jan 8 16:27:56 2015 (r276831) +++ head/usr.bin/sed/Makefile Thu Jan 8 16:33:15 2015 (r276832) @@ -6,8 +6,6 @@ PROG= sed SRCS= compile.c main.c misc.c process.c -WARNS?= 2 - .if ${MK_TESTS} != "no" SUBDIR+= tests .endif Modified: head/usr.bin/sed/main.c ============================================================================== --- head/usr.bin/sed/main.c Thu Jan 8 16:27:56 2015 (r276831) +++ head/usr.bin/sed/main.c Thu Jan 8 16:33:15 2015 (r276832) @@ -400,13 +400,13 @@ mf_fgets(SPACE *sp, enum e_spflag spflag sizeof(oldfname)); len = strlcat(oldfname, inplace, sizeof(oldfname)); - if (len > sizeof(oldfname)) + if (len > (ssize_t)sizeof(oldfname)) errx(1, "%s: name too long", fname); } len = snprintf(tmpfname, sizeof(tmpfname), "%s/.!%ld!%s", dirname(fname), (long)getpid(), basename(fname)); - if (len >= sizeof(tmpfname)) + if (len >= (ssize_t)sizeof(tmpfname)) errx(1, "%s: name too long", fname); unlink(tmpfname); if ((outfile = fopen(tmpfname, "w")) == NULL) @@ -488,7 +488,7 @@ add_file(char *s) } static int -next_files_have_lines() +next_files_have_lines(void) { struct s_flist *file; FILE *file_fd; Modified: head/usr.bin/sed/process.c ============================================================================== --- head/usr.bin/sed/process.c Thu Jan 8 16:27:56 2015 (r276831) +++ head/usr.bin/sed/process.c Thu Jan 8 16:33:15 2015 (r276832) @@ -71,7 +71,7 @@ static __inline int applies(struct s_co static void do_tr(struct s_tr *); static void flush_appends(void); static void lputs(char *, size_t); -static __inline int regexec_e(regex_t *, const char *, int, int, size_t); +static int regexec_e(regex_t *, const char *, int, int, size_t); static void regsub(SPACE *, char *, char *); static int substitute(struct s_command *); @@ -656,7 +656,7 @@ lputs(char *s, size_t len) errx(1, "%s: %s", outfname, strerror(errno ? errno : EIO)); } -static __inline int +static int regexec_e(regex_t *preg, const char *string, int eflags, int nomatch, size_t slen) {