(sc_cast_of_alloca_return_value): New rule.
authorJim Meyering <jim@meyering.net>
Sun, 28 Sep 2003 08:39:31 +0000 (08:39 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 28 Sep 2003 08:39:31 +0000 (08:39 +0000)
(syntax-check-rules): Add it.

Makefile.maint

index a814aec..d4ca995 100644 (file)
@@ -71,6 +71,7 @@ local-check = $(filter-out $(local-checks-to-skip), $(local-checks-available))
 syntax-check-rules = \
   sc_cast_of_argument_to_free \
   sc_cast_of_x_alloc_return_value \
+  sc_cast_of_alloca_return_value \
   sc_changelog \
   sc_error_exit_success \
   sc_space_tab \
@@ -107,11 +108,17 @@ sc_cast_of_argument_to_free:
 
 sc_cast_of_x_alloc_return_value:
        @grep -E --exclude=$(srcdir)/lib/regex.c                        \
-           '\*\) *(alloca|x(m|c|re)alloc)\>'                           \
+           '\*\) *x(m|c|re)alloc\>'                            \
            $(srcdir)/{lib,src}/*.[chy] &&                              \
          { echo '$(ME): don'\''t cast x*alloc return value' 1>&2;      \
            exit 1; } || :
 
+sc_cast_of_alloca_return_value:
+       @grep -E '\*\) *alloca\>'                                       \
+           $(srcdir)/src/*.[chy] &&                                    \
+         { echo '$(ME): don'\''t cast alloca return value' 1>&2;       \
+           exit 1; } || :
+
 sc_space_tab:
        @( cvsu --list ) > /dev/null 2>&1 || : &&                       \
          grep '[ ]     '                                               \