Re: Add casts to tools/makedep.c

2007-03-13 Thread Joris Huizer

--- Dmitry Timoshkov <[EMAIL PROTECTED]> wrote:

> "Gerald Pfeifer" <[EMAIL PROTECTED]> wrote:
> 
> > I accidently ended up building Wine using a C++
> compiler the other day,
> > and came across the following.
> 
> > -char *p = xmalloc (size);
> > +char *p = (char*) xmalloc (size);
> 
> That's a problem of C++ not Wine if it can't cope
> with casting void * to
> another pointer type. Polluting the whole source
> with useless casts buys
> us nothing.
> 

That's one of the few incompatibilities between C and
C++ actually. C++ doesn't really like void pointers.

Regards,

Joris


 

8:00? 8:25? 8:40? Find a flick in no time 
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news




Re: Add casts to tools/makedep.c

2007-03-12 Thread Dmitry Timoshkov

"Gerald Pfeifer" <[EMAIL PROTECTED]> wrote:


I accidently ended up building Wine using a C++ compiler the other day,
and came across the following.



-char *p = xmalloc (size);
+char *p = (char*) xmalloc (size);


That's a problem of C++ not Wine if it can't cope with casting void * to
another pointer type. Polluting the whole source with useless casts buys
us nothing.

--
Dmitry.