From b173dd440ba33f0de7e33667e49042f3d1c48ef1 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Fri, 14 Oct 2011 07:25:20 +0000 Subject: Build tr(1) with WARNS=6. --- usr.bin/tr/Makefile | 2 -- usr.bin/tr/cset.c | 4 ++-- usr.bin/tr/str.c | 15 +++++---------- 3 files changed, 7 insertions(+), 14 deletions(-) (limited to 'usr.bin/tr') diff --git a/usr.bin/tr/Makefile b/usr.bin/tr/Makefile index c5c5297ef64b..00bdd8d5bb7a 100644 --- a/usr.bin/tr/Makefile +++ b/usr.bin/tr/Makefile @@ -4,6 +4,4 @@ PROG= tr SRCS= cmap.c cset.c str.c tr.c -WARNS?= 1 - .include diff --git a/usr.bin/tr/cset.c b/usr.bin/tr/cset.c index 1b4212949b6c..8c95a90918c9 100644 --- a/usr.bin/tr/cset.c +++ b/usr.bin/tr/cset.c @@ -153,11 +153,11 @@ cset_in_hard(struct cset *cs, wchar_t ch) struct csclass *csc; for (csc = cs->cs_classes; csc != NULL; csc = csc->csc_next) - if (csc->csc_invert ^ iswctype(ch, csc->csc_type) != 0) + if ((csc->csc_invert ^ iswctype(ch, csc->csc_type)) != 0) return (cs->cs_invert ^ true); if (cs->cs_root != NULL) { cs->cs_root = cset_splay(cs->cs_root, ch); - return (cs->cs_invert ^ cset_rangecmp(cs->cs_root, ch) == 0); + return ((cs->cs_invert ^ cset_rangecmp(cs->cs_root, ch)) == 0); } return (cs->cs_invert ^ false); } diff --git a/usr.bin/tr/str.c b/usr.bin/tr/str.c index 70a74eaa21e5..abfd0d6a657c 100644 --- a/usr.bin/tr/str.c +++ b/usr.bin/tr/str.c @@ -57,8 +57,7 @@ static int genrange(STR *, int); static void genseq(STR *); wint_t -next(s) - STR *s; +next(STR *s) { int is_octal; wint_t ch; @@ -135,8 +134,7 @@ next(s) } static int -bracket(s) - STR *s; +bracket(STR *s) { char *p; @@ -173,8 +171,7 @@ bracket(s) } static void -genclass(s) - STR *s; +genclass(STR *s) { if ((s->cclass = wctype(s->str)) == 0) @@ -190,8 +187,7 @@ genclass(s) } static void -genequiv(s) - STR *s; +genequiv(STR *s) { int i, p, pri; char src[2], dst[3]; @@ -295,8 +291,7 @@ genrange(STR *s, int was_octal) } static void -genseq(s) - STR *s; +genseq(STR *s) { char *ep; wchar_t wc; -- cgit v1.2.3