diff options
author | Jim Meyering <meyering@fb.com> | 2014-09-30 17:54:18 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2014-11-30 18:59:34 -0800 |
commit | 10a322910c76f604c7d7467132871b771e0874d9 (patch) | |
tree | 5535fd8c76ec221c639bb3ef406b20981e51cc3f | |
parent | c0babfb931c5106585271035e06a908106c8238f (diff) | |
download | sed-10a322910c76f604c7d7467132871b771e0874d9.tar.gz |
maint: enable sc_cast_of_alloca_return_value syntax check
* cfg.mk (local-checks-to-skip): Remove its exemption.
* sed/regexp.c (match_regex): Do not cast return value of alloca.
-rw-r--r-- | cfg.mk | 1 | ||||
-rw-r--r-- | sed/regexp.c | 2 |
2 files changed, 1 insertions, 2 deletions
@@ -25,7 +25,6 @@ url_dir_list = http://ftp.gnu.org/gnu/$(PACKAGE) local-checks-to-skip = \ sc_GPL_version \ sc_bindtextdomain \ - sc_cast_of_alloca_return_value \ sc_cast_of_argument_to_free \ sc_error_message_uppercase \ sc_file_system \ diff --git a/sed/regexp.c b/sed/regexp.c index e63d30a..827c699 100644 --- a/sed/regexp.c +++ b/sed/regexp.c @@ -217,7 +217,7 @@ match_regex(regex, buf, buflen, buf_start_offset, regarray, regsize) #ifdef REG_PERL regmatch_t rm[10], *regmatch = rm; if (regsize > 10) - regmatch = (regmatch_t *) alloca (sizeof (regmatch_t) * regsize); + regmatch = alloca (sizeof (regmatch_t) * regsize); #endif /* printf ("Matching from %d/%d\n", buf_start_offset, buflen); */ |