diff options
author | Jim Meyering <meyering@redhat.com> | 2010-01-05 15:12:15 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-01-05 15:12:15 +0100 |
commit | 0c2fded89d2ebb3395d176001182ef710d68d430 (patch) | |
tree | 670a76c230c68f6f279efe9086aa31cc3ef5a491 /top/maint.mk | |
parent | 28e6fc0a9042637a27233dca31962afd53bbb8cd (diff) | |
download | gnulib-0c2fded89d2ebb3395d176001182ef710d68d430.tar.gz |
maint.mk: include 4 more function names in alloca.h-checking regexp
* top/maint.mk (sc_prohibit_xalloc_without_use): Use more complete
regexp. Before, we would give a false-positive (saying alloca.h
is included unnecessarily) when the only uses involved omitted symbols.
Diffstat (limited to 'top/maint.mk')
-rw-r--r-- | top/maint.mk | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/top/maint.mk b/top/maint.mk index 2bdf1eb848..e4a6359880 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -324,9 +324,15 @@ sc_prohibit_error_without_use: # | sort | perl -MRegexp::Assemble -le \ # 'print Regexp::Assemble->new(file => "/dev/stdin")->as_string'|sed 's/\?://g' # Note this was produced by the above: -# _xa1 = x(alloc_(oversized|die)|([cz]|2?re)alloc|m(alloc|emdup)|strdup) -# But we can do better: -_xa1 = x(alloc_(oversized|die)|([cmz]|2?re)alloc|(mem|str)dup) +# _xa1 = \ +#x(((2n?)?re|c(har)?|n(re|m)|z)alloc|alloc_(oversized|die)|m(alloc|emdup)|strdup) +# But we can do better, in at least two ways: +# 1) take advantage of two "dup"-suffixed strings: +# x(((2n?)?re|c(har)?|n(re|m)|[mz])alloc|alloc_(oversized|die)|(mem|str)dup) +# 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(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup) _xa2 = X([CZ]|N?M)ALLOC sc_prohibit_xalloc_without_use: @h='"xalloc.h"' \ |