aboutsummaryrefslogtreecommitdiffstats
path: root/src/expr.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-01-31 08:42:07 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2022-01-31 12:07:38 -0800
commitafa93e88044ef8d384b9b8b65b646add0fce905a (patch)
tree79ba0419024fc8944f2ec7774e1aab66b081b445 /src/expr.c
parentcksum: use more exact selection of digest algorithms (diff)
downloadcoreutils-afa93e88044ef8d384b9b8b65b646add0fce905a.tar.gz
coreutils-afa93e88044ef8d384b9b8b65b646add0fce905a.zip
expr: lint cleanup, and introducing main_exit
This introduces a new macro main_exit, which is useful for pacifying gcc -fsanitizer=lint and in some cases means we can remove some ‘IF_LINT’ and ‘ifdef lint’ code. * src/expr.c (main): Use main_exit, not return. (docolon): Omit an IF_LINT that GCC no longer needs. * src/system.h (main_exit): New macro.
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/expr.c b/src/expr.c
index b8f216243..d0cffe3f7 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -357,7 +357,7 @@ main (int argc, char **argv)
printv (v);
- return null (v);
+ main_exit (null (v));
}
/* Return a VALUE for I. */
@@ -585,7 +585,7 @@ trace (fxn)
static VALUE *
docolon (VALUE *sv, VALUE *pv)
{
- VALUE *v IF_LINT ( = NULL);
+ VALUE *v;
char const *errmsg;
struct re_pattern_buffer re_buffer;
char fastmap[UCHAR_MAX + 1];