git: 35505aacb979 - stable/12 - lib/libc/regex: fix build with REDEBUG defined

Kyle Evans kevans at FreeBSD.org
Mon Dec 28 03:22:34 UTC 2020


The branch stable/12 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=35505aacb97901be1347a6bffbfeabafd6b3b1b7

commit 35505aacb97901be1347a6bffbfeabafd6b3b1b7
Author:     Yuri Pankov <yuripv at FreeBSD.org>
AuthorDate: 2019-09-24 12:21:01 +0000
Commit:     Kyle Evans <kevans at FreeBSD.org>
CommitDate: 2020-12-28 03:22:18 +0000

    lib/libc/regex: fix build with REDEBUG defined
    
    (cherry picked from commit 3c78771400e74f5bc54ee8e9a28fbf70190fd250)
---
 lib/libc/regex/engine.c  | 2 +-
 lib/libc/regex/regcomp.c | 6 ------
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c
index a25bfa08ede7..e7da4cbc2a5d 100644
--- a/lib/libc/regex/engine.c
+++ b/lib/libc/regex/engine.c
@@ -1068,7 +1068,7 @@ print(struct match *m,
 		fprintf(d, " %s", pchar(ch));
 	for (i = 0; i < g->nstates; i++)
 		if (ISSET(st, i)) {
-			fprintf(d, "%s%d", (first) ? "\t" : ", ", i);
+			fprintf(d, "%s%lu", (first) ? "\t" : ", ", i);
 			first = 0;
 		}
 	fprintf(d, "\n");
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index 586621c5a745..b76e58a26082 100644
--- a/lib/libc/regex/regcomp.c
+++ b/lib/libc/regex/regcomp.c
@@ -196,12 +196,6 @@ static char nuls[10];		/* place to point scanner in event of error */
 #define	THERETHERE()	(p->slen - 2)
 #define	DROP(n)	(p->slen -= (n))
 
-#ifndef NDEBUG
-static int never = 0;		/* for use in asserts; shuts lint up */
-#else
-#define	never	0		/* some <assert.h>s have bugs too */
-#endif
-
 /* Macro used by computejump()/computematchjump() */
 #define MIN(a,b)	((a)<(b)?(a):(b))
 


More information about the dev-commits-src-all mailing list