mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 00:33:57 +00:00
Build tr(1) with WARNS=6.
This commit is contained in:
parent
583458543c
commit
b173dd440b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226360
|
@ -4,6 +4,4 @@
|
|||
PROG= tr
|
||||
SRCS= cmap.c cset.c str.c tr.c
|
||||
|
||||
WARNS?= 1
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue