libtool-patches
[Top][All Lists]
Advanced

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

Re: FYI: Cast non-void pointer conversions


From: Ralf Wildenhues
Subject: Re: FYI: Cast non-void pointer conversions
Date: Mon, 1 Nov 2004 15:04:32 +0100
User-agent: Mutt/1.4.1i

* Ralf Wildenhues wrote on Mon, Nov 01, 2004 at 12:26:30PM CET:
> Applied to branch-2-0 and HEAD, since some older compilers choke on
> these otherwise.
> 
> In hindsight, I hope this checkin was ok without approval?
> At least I cannot imagine a compiler failing because the conversion is
> explicit now.

Oh well.  Never say never.  gcc breaks with the first cast :-)

Backed out the first hunk of this patch (only the second can be fatal
for older compilers).

Sorry for the inconvenience.

Ralf

> 2004-10-30  Ralf Wildenhues <address@hidden>
> 
>       * libltdl/ltdl.c (loader_init_callback, lt_dlexit): Add casts to
>       target type.
> 
> Index: libltdl/ltdl.c
> ===================================================================
> RCS file: /cvsroot/libtool/libtool/libltdl/ltdl.c,v
> retrieving revision 1.217.2.1
> diff -u -r1.217.2.1 ltdl.c
> --- libltdl/ltdl.c    8 Oct 2004 14:16:45 -0000       1.217.2.1
> +++ libltdl/ltdl.c    1 Nov 2004 11:03:47 -0000
> @@ -153,7 +153,7 @@
>  static int
>  loader_init_callback (lt_dlhandle handle)
>  {
> -  return loader_init (lt_dlsym (handle, "get_vtable"), 0);
> +  return loader_init ((lt_get_vtable *) lt_dlsym (handle, "get_vtable"), 0);
>  }
>  
>  static int
> @@ -283,7 +283,7 @@
>         lt_dlloader *next   = lt_dlloader_next (loader);
>         lt_dlvtable *vtable = (lt_dlvtable *) lt_dlloader_get (loader);
>  
> -       if ((vtable = lt_dlloader_remove (vtable->name)))
> +       if ((vtable = lt_dlloader_remove ((char *) vtable->name)))
>           {
>             FREE (vtable);
>           }
> 
> 




reply via email to

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