I ran 'make syntax-check' (from gnulib's maint.mk) and it detected some problems in code in gnulib itself, see:
./gl/error.c:152: wmessage = (wchar_t *) alloca (len * sizeof (wchar_t)); ./gl/vasnprintf.c:1482: buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T)); maint.mk: don't cast alloca return value make: *** [sc_cast_of_alloca_return_value] Error 1 Any objections to this patch? /Simon diff --git a/lib/error.c b/lib/error.c index 3177bd5..d0ded79 100644 --- a/lib/error.c +++ b/lib/error.c @@ -1,5 +1,5 @@ /* Error handler for noninteractive utilities - Copyright (C) 1990-1998, 2000-2007 Free Software Foundation, Inc. + Copyright (C) 1990-1998, 2000-2008 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify @@ -149,7 +149,7 @@ error_tail (int status, int errnum, const char *message, va_list args) while (1) { if (__libc_use_alloca (len * sizeof (wchar_t))) - wmessage = (wchar_t *) alloca (len * sizeof (wchar_t)); + wmessage = alloca (len * sizeof (wchar_t)); else { if (!use_malloc) diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c index 4ddf45f..f7e104a 100644 --- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -1479,7 +1479,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, #if HAVE_ALLOCA if (buf_neededlength < 4000 / sizeof (TCHAR_T)) { - buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T)); + buf = alloca (buf_neededlength * sizeof (TCHAR_T)); buf_malloced = NULL; } else