[janitor] dlls/winmm/wine* -Wwrite-strings cleanup

Jerry Jenkins Jerry_J_Jenkins at hotmail.com
Sun Oct 12 06:04:32 CDT 2003


Dimitrie O. Paun wrote:
> Why do we need the static?
> 
Had I pasted more source code, you would have known why.
LONG ALSA_WaveInit(void)
{
     snd_pcm_t*                  h = NULL;
     snd_pcm_info_t *            info;
     snd_pcm_hw_params_t *       hw_params;
     WINE_WAVEOUT*	        wwo;
     char			device[] = "hw";

     wwo = &WOutDev[0];

     /* FIXME: use better values */
     wwo->device = device;
We have to keep the memory used by device[] or wwo->device even when we 
exit the function, because we'll access it later. Local variables’ 
memory are supposed to be freed after the function exits.





More information about the wine-devel mailing list