Fixed mingw32 warnings.

This commit is contained in:
Marcus Sundberg 2000-05-21 00:08:27 +00:00
parent 5410b16ec8
commit 84ff3a3c1b
4 changed files with 30 additions and 19 deletions

View file

@ -45,7 +45,6 @@ static qboolean enabled = false;
static qboolean playLooping = false;
static float cdvolume;
static byte remap[100];
static byte cdrom;
static byte playTrack;
static byte maxTrack;
@ -56,8 +55,11 @@ static void CDAudio_Eject(void)
{
DWORD dwReturn;
if (dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, (DWORD)NULL))
dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN,
(DWORD)NULL);
if (dwReturn) {
Con_DPrintf("MCI_SET_DOOR_OPEN failed (%i)\n", dwReturn);
}
}
@ -65,8 +67,10 @@ static void CDAudio_CloseDoor(void)
{
DWORD dwReturn;
if (dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, (DWORD)NULL))
dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, (DWORD)NULL);
if (dwReturn) {
Con_DPrintf("MCI_SET_DOOR_CLOSED failed (%i)\n", dwReturn);
}
}
@ -196,8 +200,10 @@ void CDAudio_Stop(void)
if (!playing)
return;
if (dwReturn = mciSendCommand(wDeviceID, MCI_STOP, 0, (DWORD)NULL))
dwReturn = mciSendCommand(wDeviceID, MCI_STOP, 0, (DWORD)NULL);
if (dwReturn) {
Con_DPrintf("MCI_STOP failed (%i)", dwReturn);
}
wasPlaying = false;
playing = false;
@ -216,8 +222,10 @@ void CDAudio_Pause(void)
return;
mciGenericParms.dwCallback = (DWORD)mainwindow;
if (dwReturn = mciSendCommand(wDeviceID, MCI_PAUSE, 0, (DWORD)(LPVOID) &mciGenericParms))
dwReturn = mciSendCommand(wDeviceID, MCI_PAUSE, 0, (DWORD)(LPVOID) &mciGenericParms);
if (dwReturn) {
Con_DPrintf("MCI_PAUSE failed (%i)", dwReturn);
}
wasPlaying = playing;
playing = false;
@ -450,8 +458,8 @@ int CDAudio_Init(void)
return -1;
mciOpenParms.lpstrDeviceType = "cdaudio";
if (dwReturn = mciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE | MCI_OPEN_SHAREABLE, (DWORD) (LPVOID) &mciOpenParms))
{
dwReturn = mciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE | MCI_OPEN_SHAREABLE, (DWORD) (LPVOID) &mciOpenParms);
if (dwReturn) {
Con_Printf("CDAudio_Init: MCI_OPEN failed (%i)\n", dwReturn);
return -1;
}
@ -459,8 +467,8 @@ int CDAudio_Init(void)
// Set the time format to track/minute/second/frame (TMSF).
mciSetParms.dwTimeFormat = MCI_FORMAT_TMSF;
if (dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT, (DWORD)(LPVOID) &mciSetParms))
{
dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT, (DWORD)(LPVOID) &mciSetParms);
if (dwReturn) {
Con_Printf("MCI_SET_TIME_FORMAT failed (%i)\n", dwReturn);
mciSendCommand(wDeviceID, MCI_CLOSE, 0, (DWORD)NULL);
return -1;

View file

@ -626,7 +626,9 @@ void S_ClearBuffer (void)
reps = 0;
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &pData, &dwSize, NULL, NULL, 0)) != DS_OK)
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize,
(LPVOID *)&pData, &dwSize,
NULL, NULL, 0)) != DS_OK)
{
if (hresult != DSERR_BUFFERLOST)
{

View file

@ -97,9 +97,9 @@ void S_TransferStereo16 (int endtime)
{
reps = 0;
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &pbuf, &dwSize,
&pbuf2, &dwSize2, 0)) != DS_OK)
{
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize,
(LPVOID *)&pbuf, &dwSize,
(LPVOID *)&pbuf2, &dwSize2, 0)) != DS_OK) {
if (hresult != DSERR_BUFFERLOST)
{
Con_Printf ("S_TransferStereo16: DS::Lock Sound Buffer Failed\n");
@ -186,9 +186,9 @@ void S_TransferPaintBuffer(int endtime)
{
reps = 0;
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &pbuf, &dwSize,
&pbuf2,&dwSize2, 0)) != DS_OK)
{
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize,
(LPVOID *)&pbuf, &dwSize,
(LPVOID *)&pbuf2, &dwSize2, 0)) != DS_OK) {
if (hresult != DSERR_BUFFERLOST)
{
Con_Printf ("S_TransferPaintBuffer: DS::Lock Sound Buffer Failed\n");

View file

@ -378,8 +378,9 @@ sndinitstat SNDDMA_InitDirect (void)
// initialize the buffer
reps = 0;
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &lpData, &dwSize, NULL, NULL, 0)) != DS_OK)
{
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize,
(LPVOID *)&lpData, &dwSize, NULL,
NULL, 0)) != DS_OK) {
if (hresult != DSERR_BUFFERLOST)
{
Con_SafePrintf ("SNDDMA_InitDirect: DS::Lock Sound Buffer Failed\n");
@ -645,7 +646,7 @@ how many sample are required to fill it up.
int SNDDMA_GetDMAPos(void)
{
MMTIME mmtime;
int s;
int s = 0;
DWORD dwWrite;
if (dsound_init)