PATCH: win32/device.c -- addresses two warnings

Marcus Meissner marcus at jet.franken.de
Thu May 30 16:14:05 CDT 2002


On Thu, May 30, 2002 at 09:26:56AM +0200, Gerald Pfeifer wrote:
> This addresses two compiler warnings seen on FreeBSD 4.5-RELEASE.
> The first should appear on any non GNU/Linux-system, the second on
> all systems.
> 
> Gerald
> 
> ChangeLog:
>   Move floppy_params into #ifdef linux.
>   Fix printf format in OpenVxDHandle().
> 
> Index: device.c
> ===================================================================
> RCS file: /home/wine/wine/win32/device.c,v
> retrieving revision 1.63
> diff -u -3 -p -r1.63 device.c
> --- device.c	25 May 2002 22:04:43 -0000	1.63
> +++ device.c	30 May 2002 07:24:18 -0000
> @@ -1187,12 +1187,6 @@ static const DWORD VWIN32_DriveTypeInfo[
>      0x4f24  /* 2.88 M */
>  };
> 
> -static BYTE floppy_params[2][13] =
> -{
> -    { 0xaf, 0x02, 0x25, 0x02, 0x12, 0x1b, 0xff, 0x6c, 0xf6, 0x0f, 0x08 },
> -    { 0xaf, 0x02, 0x25, 0x02, 0x12, 0x1b, 0xff, 0x6c, 0xf6, 0x0f, 0x08 }
> -};
> -
>  /**********************************************************************
>   *	    VWIN32_ReadFloppyParams
>   *
> @@ -1201,6 +1195,12 @@ static BYTE floppy_params[2][13] =
>  static VOID VWIN32_ReadFloppyParams(DIOC_REGISTERS *regs)
>  {
>  #ifdef linux
> +    static BYTE floppy_params[2][13] =
> +    {
> +        { 0xaf, 0x02, 0x25, 0x02, 0x12, 0x1b, 0xff, 0x6c, 0xf6, 0x0f, 0x08 },
> +        { 0xaf, 0x02, 0x25, 0x02, 0x12, 0x1b, 0xff, 0x6c, 0xf6, 0x0f, 0x08 }
> +    };
> +

I think this is not recommended C (and might fail on other compilers). Not
that linux would have any other but gcc.

Ciao, Marcus



More information about the wine-devel mailing list