This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch/libiberty]: Silence -Wc++-compat warnings on mingw32


Danny Smith <dannysmith@clear.net.nz> writes:

> 	2006-10-25  Danny Smith  <dannysmith@users.sourceforge.net>
> 
> 	pex-win32.c (argv_to_cmdline): Replace xmalloc with XNEWVEC.
> 	(find_executable): Likewise.
> 	(win32_spawn): Cast alloca return to (char**).
> 	Replace malloc with XNEWVEC.
> 	bcopy.c (bcopy}: Add explict casts in assignments.


> -          env_copy = alloca (sizeof (char *) * env_size);
> +          env_copy = (char **) alloca (sizeof (char **) * env_size);

You still want sizeof (char *) in the argument to alloca, not sizeof
(char **).

This patch is OK for mainline with that change.

Thanks.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]