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
|
PROG= tr
|
||||||
SRCS= cmap.c cset.c str.c tr.c
|
SRCS= cmap.c cset.c str.c tr.c
|
||||||
|
|
||||||
WARNS?= 1
|
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
|
|
@ -153,11 +153,11 @@ cset_in_hard(struct cset *cs, wchar_t ch)
|
||||||
struct csclass *csc;
|
struct csclass *csc;
|
||||||
|
|
||||||
for (csc = cs->cs_classes; csc != NULL; csc = csc->csc_next)
|
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);
|
return (cs->cs_invert ^ true);
|
||||||
if (cs->cs_root != NULL) {
|
if (cs->cs_root != NULL) {
|
||||||
cs->cs_root = cset_splay(cs->cs_root, ch);
|
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);
|
return (cs->cs_invert ^ false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,8 +57,7 @@ static int genrange(STR *, int);
|
||||||
static void genseq(STR *);
|
static void genseq(STR *);
|
||||||
|
|
||||||
wint_t
|
wint_t
|
||||||
next(s)
|
next(STR *s)
|
||||||
STR *s;
|
|
||||||
{
|
{
|
||||||
int is_octal;
|
int is_octal;
|
||||||
wint_t ch;
|
wint_t ch;
|
||||||
|
@ -135,8 +134,7 @@ next(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
bracket(s)
|
bracket(STR *s)
|
||||||
STR *s;
|
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
|
@ -173,8 +171,7 @@ bracket(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
genclass(s)
|
genclass(STR *s)
|
||||||
STR *s;
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if ((s->cclass = wctype(s->str)) == 0)
|
if ((s->cclass = wctype(s->str)) == 0)
|
||||||
|
@ -190,8 +187,7 @@ genclass(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
genequiv(s)
|
genequiv(STR *s)
|
||||||
STR *s;
|
|
||||||
{
|
{
|
||||||
int i, p, pri;
|
int i, p, pri;
|
||||||
char src[2], dst[3];
|
char src[2], dst[3];
|
||||||
|
@ -295,8 +291,7 @@ genrange(STR *s, int was_octal)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
genseq(s)
|
genseq(STR *s)
|
||||||
STR *s;
|
|
||||||
{
|
{
|
||||||
char *ep;
|
char *ep;
|
||||||
wchar_t wc;
|
wchar_t wc;
|
||||||
|
|
Loading…
Reference in a new issue