fixes for -Wmissing-declarations and -Wwrite-strings warnings

Pouech Eric DMI AEI CAEN pouech-eric at wanadoo.fr
Thu Jun 2 09:35:12 CDT 2005


returning a pointer to something on the stack is something I call an error
(how do you ensure that the buffer will not get overwritten by another function call ?)
A+


> Message du 02/06/05 15:25
> De : "Dimi Paun" 
> A : pouech-eric at wanadoo.fr, wine-devel at winehq.org
> Copie à : 
> Objet : Re: fixes for -Wmissing-declarations and -Wwrite-strings warnings
> 
> From: "Pouech Eric DMI AEI CAEN" 
> > looking at the patch, I saw something in the code that made me sick:
> > char *audioAutoDetect(void)
> > {
> > [snip]
> > char *driversFound[10];
> > [snip]
> > return driversFound[0];
> > [snip]
> > }
> > 
> > can someone fix that broken code ?
> 
> Yeah, it's not pretty, but just by looking at this snippet there is no
> obvious error in the above AFAICT.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20050602/04685d4b/attachment.html


More information about the wine-devel mailing list