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) { _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"