bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnulib] Re: gnulib/lib error.c


From: Jim Meyering
Subject: [Bug-gnulib] Re: gnulib/lib error.c
Date: Sun, 28 Sep 2003 10:41:48 +0200

>       (error_tail): Don't cast alloca to (void *); it's already (void *).

Thanks for doing that.
I've just removed a bunch of similar casts in coreutils/src/*.[ch]
and added another syntax-check rule to detect them.

I was tempted to remove all such casts from gnulib/lib, too,
but wonder if it's worth the hassle for files that come from glibc.
What do you think?

  pi$ grep -E '\) *alloca\>' *.[ch]
  fnmatch.c:      wpattern = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
  fnmatch.c:      wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
  makepath.c:      dirpath = (char *) alloca (strlen (argpath) + 1);
  regex.c:  (destination = (char *) alloca (nsize),                             
\
  setenv.c:       new_value = (char *) alloca (namelen + 1 + vallen);
  strftime.c:    ws = (wchar_t *) alloca ((l + 1) * sizeof (wchar_t));          
      \
  userspec.c:      (dest) = (char *) alloca (_len + 1);                         
\
  vasnprintf.c:      (char *) alloca (7 + d.max_width_length + 
d.max_precision_length + 6);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]