svn commit: samba r22897 - in
branches/SAMBA_3_0_26/source/utils: .
Andrew Bartlett
abartlet at samba.org
Tue May 15 22:14:29 GMT 2007
On Tue, 2007-05-15 at 15:43 +0200, Michael Adam wrote:
> On Tue, May 15, 2007 at 10:28:32PM +1000, Andrew Bartlett wrote:
> > On Tue, 2007-05-15 at 11:12 +0000, obnox at samba.org wrote:
> > >
> > > Log:
> > > Fix c++ warnings (add explicit casts).
> >
> > These calls would be much safer down without the casts, and with
> > talloc() and a structure assignment. This would also tag the structure
> > with the correct name.
> >
> > I'm particularly worried by the cast being to (struct devicemode *), but
> > the sizeof() being for DEVICEMODE. This is exactly the type of bug that
> > the new talloc() was written to avoid.
>
> Firstly, we have "typedef struct devicemode DEVICEMODE;"
> and secondly, i only pulled this to sync with 3_0.
>
> Of course you are right, and conceptional enhancements should follow!
As I think you know, the point is that of course they are the same now,
but now that all the compiler's options for warning about danger have
been overridden, will they always be the same?
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Red Hat Inc. http://redhat.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20070516/c4735a97/attachment.bin
More information about the samba-technical
mailing list