* [Qemu-devel] [PATCH] Fix warnings : hw/fmopl.[ch] (BUILD_Y8950 is not defined)
@ 2008-11-10 14:21 Sylvain Petreolle
2008-11-10 21:08 ` malc
0 siblings, 1 reply; 2+ messages in thread
From: Sylvain Petreolle @ 2008-11-10 14:21 UTC (permalink / raw)
To: Qemu list
Signed-off by: Sylvain Petreolle<spetreolle@yahoo.fr>
Index: hw/fmopl.c
===================================================================
--- hw/fmopl.c (révision 5668)
+++ hw/fmopl.c (copie de travail)
@@ -813,7 +813,7 @@
}
}
return;
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
case 0x06: /* Key Board OUT */
if(OPL->type&OPL_TYPE_KEYBOARD)
{
@@ -1098,7 +1098,7 @@
}
#endif /* (BUILD_YM3812 || BUILD_YM3526) */
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
void Y8950UpdateOne(FM_OPL *OPL, INT16 *buffer, int length)
{
@@ -1190,7 +1190,7 @@
CH->SLOT[s].evs = 0;
}
}
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
if(OPL->type&OPL_TYPE_ADPCM)
{
YM_DELTAT *DELTAT = OPL->deltat;
@@ -1217,7 +1217,7 @@
/* allocate OPL state space */
state_size = sizeof(FM_OPL);
state_size += sizeof(OPL_CH)*max_ch;
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
if(type&OPL_TYPE_ADPCM) state_size+= sizeof(YM_DELTAT);
#endif
/* allocate memory block */
@@ -1227,7 +1227,7 @@
memset(ptr,0,state_size);
OPL = (FM_OPL *)ptr; ptr+=sizeof(FM_OPL);
OPL->P_CH = (OPL_CH *)ptr; ptr+=sizeof(OPL_CH)*max_ch;
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
if(type&OPL_TYPE_ADPCM) OPL->deltat = (YM_DELTAT *)ptr; ptr+=sizeof(YM_DELTAT);
#endif
/* set channel state pointer */
@@ -1291,7 +1291,7 @@
OPL->UpdateHandler = UpdateHandler;
OPL->UpdateParam = param;
}
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
void OPLSetPortHandler(FM_OPL *OPL,OPL_PORTHANDLER_W PortHandler_w,OPL_PORTHANDLER_R PortHandler_r,int param)
{
OPL->porthandler_w = PortHandler_w;
Index: hw/fmopl.h
===================================================================
--- hw/fmopl.h (révision 5668)
+++ hw/fmopl.h (copie de travail)
@@ -29,7 +29,7 @@
#endif
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
#include "ymdeltat.h"
#endif
@@ -112,7 +112,7 @@
int max_ch; /* maximum channel */
/* Rythm sention */
UINT8 rythm; /* Rythm mode , key flag */
-#if BUILD_Y8950
+#ifdef BUILD_Y8950
/* Delta-T ADPCM unit (Y8950) */
YM_DELTAT *deltat; /* DELTA-T ADPCM */
#endif
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix warnings : hw/fmopl.[ch] (BUILD_Y8950 is not defined)
2008-11-10 14:21 [Qemu-devel] [PATCH] Fix warnings : hw/fmopl.[ch] (BUILD_Y8950 is not defined) Sylvain Petreolle
@ 2008-11-10 21:08 ` malc
0 siblings, 0 replies; 2+ messages in thread
From: malc @ 2008-11-10 21:08 UTC (permalink / raw)
To: Qemu list
On Mon, 10 Nov 2008, Sylvain Petreolle wrote:
> Signed-off by: Sylvain Petreolle<spetreolle@yahoo.fr>
> Index: hw/fmopl.c
> ===================================================================
> --- hw/fmopl.c (r?vision 5668)
> +++ hw/fmopl.c (copie de travail)
> @@ -813,7 +813,7 @@
> }
> }
> return;
> -#if BUILD_Y8950
> +#ifdef BUILD_Y8950
[..snip..]
>
First of all fmopl.c is foreign code so touching it without clear need
would be a mistake, secondly, the same effect can be achieved by
#define BUILD_[Y8950|whatever] 0
in fmopl.h making for a much slimmer patch.
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-10 21:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-10 14:21 [Qemu-devel] [PATCH] Fix warnings : hw/fmopl.[ch] (BUILD_Y8950 is not defined) Sylvain Petreolle
2008-11-10 21:08 ` malc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).