[Libvir] [PATCH] Support Sun's Compiler
Daniel P. Berrange
berrange at redhat.com
Fri Sep 7 21:07:36 UTC 2007
On Fri, Sep 07, 2007 at 05:05:15PM -0400, Mark Johnson wrote:
> On 9/7/07, Daniel P. Berrange <berrange at redhat.com> wrote:
> > So, the bulk of this patch is just getting rid of the anonymous members
> > in the union. Looks huge, but its an obvious safe fix - I explored doing
> > this myself before to make us compile in c89 mode, but decided it wasn't
> > worth it at the time, since we've a tonne of other stuff which breaks in
> > c89 mode already.
> >
> > I'm rather puzzelled about this:
> >
> > - free(names[i]);
> > + free((void *)names[i]);
> >
> > There should never be any need to cast to (void*) as far as I understand
> > things. There's a couple more examples of this. What error does the Sun
> > compiler give without this explicit cast ?
>
> Hmm, strange... Yeah a cast is not needed here. Was this something other
> than a char ** sometime in the past? I will yank those out.
A while back in the 0.1.x series somewhere these params had the wrong 'const'
annotations, so it could be that the compiler was complaining about free'ing
a const pointer. So sounds like these are redundant now.
Regards,
Dam.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
More information about the libvir-list
mailing list