[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: uses of xinmalloc and xpmalloc triggered make syntax-check failure
From: |
Bruno Haible |
Subject: |
Re: uses of xinmalloc and xpmalloc triggered make syntax-check failure |
Date: |
Fri, 09 Jun 2023 21:00:43 +0200 |
Paul Eggert wrote:
> It's simpler to omit the /*extern*/ as it's just noise
> in that context. I installed the attached.
top/maint.mk line 604 still does not catch 'xalloc_die'.
With this patch, it should do so.
2023-06-09 Bruno Haible <bruno@clisp.org>
maint.mk: Regenerate regex to include xalloc_die.
Reported by Pádraig Brady <P@draigBrady.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-06/msg00062.html>.
* top/maint.mk (sc_prohibit_xalloc_without_use) [_xa1]: Match
xalloc_die too.
diff --git a/top/maint.mk b/top/maint.mk
index 598c4939a6..d38d34e53a 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -601,7 +601,7 @@ sc_prohibit_error_without_use:
# Don't include xalloc.h unless you use one of its functions.
# Consider these symbols:
# perl -lne '/^# *define (\w+)\(/ and print $1' lib/xalloc.h|grep -v '^__';
-# perl -lne '/^(?:extern )?(?:void|char) \*?(\w+) *\(/ and print $1'
lib/xalloc.h
+# perl -lne '/^(?:extern )?(?:_Noreturn )?(?:void|char) \*?(\w+) *\(/ and
print $1' lib/xalloc.h
# Divide into two sets on case, and filter each through this:
# | sort | perl -MRegexp::Assemble -le \
# 'print Regexp::Assemble->new(file => "/dev/stdin")->as_string'|sed
's/\?://g'
@@ -614,7 +614,7 @@ sc_prohibit_error_without_use:
# 2) notice that "c(har)?|[mz]" is equivalent to the shorter and more readable
# "char|[cmz]"
# x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup)
-_xa1 =
x(i(m(emdup0?|alloc)|realloc(array)?|([cz]|nm)alloc)|([pz]|c(har)?|2n?re|nm)alloc|realloc(array)?|m(alloc|emdup)|strdup)
+_xa1 =
x(i(m(emdup0?|alloc)|realloc(array)?|([cz]|nm)alloc)|([pz]|c(har)?|2n?re|nm)alloc|realloc(array)?|m(alloc|emdup)|alloc_die|strdup)
_xa2 = X([CZ]|N?M)ALLOC
sc_prohibit_xalloc_without_use:
@h='xalloc.h' \