Re: [PATCH] Support Sun's Compiler

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

 



On Fri, Sep 07, 2007 at 05:05:15PM -0400, Mark Johnson wrote:
> On 9/7/07, Daniel P. Berrange <berrange@xxxxxxxxxx> 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  -=| 

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]