summaryrefslogtreecommitdiff
path: root/usr.bin/tr
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2011-10-14 07:25:20 +0000
committerEd Schouten <ed@FreeBSD.org>2011-10-14 07:25:20 +0000
commitb173dd440ba33f0de7e33667e49042f3d1c48ef1 (patch)
treecf78d1ad1aed3a67bdf4ed56214224b6faf337c5 /usr.bin/tr
parent583458543c9e56f06245ab0cc993cdaff80a6a8f (diff)
downloadsrc-test2-b173dd440ba33f0de7e33667e49042f3d1c48ef1.tar.gz
src-test2-b173dd440ba33f0de7e33667e49042f3d1c48ef1.zip
Notes
Diffstat (limited to 'usr.bin/tr')
-rw-r--r--usr.bin/tr/Makefile2
-rw-r--r--usr.bin/tr/cset.c4
-rw-r--r--usr.bin/tr/str.c15
3 files changed, 7 insertions, 14 deletions
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 <bsd.prog.mk>
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;