From 82434be6a9ee4ef920b5e5a074c274ba0822338a Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Fri, 29 Jul 2005 14:15:31 +0000 Subject: [PATCH] gcc 4.0 warning fixes. --- dlls/msacm/winemp3/interface.c | 4 ++-- dlls/msacm/winemp3/mpegl3.c | 2 +- dlls/msacm/winemp3/mpglib.h | 4 ++-- dlls/shlwapi/istream.c | 2 +- dlls/shlwapi/regstream.c | 2 +- dlls/shlwapi/tests/shreg.c | 6 +++--- dlls/winmm/winealsa/midi.c | 2 +- dlls/winmm/wineoss/dsrender.c | 8 ++++---- dlls/winmm/wineoss/midi.c | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dlls/msacm/winemp3/interface.c b/dlls/msacm/winemp3/interface.c index 1014c004155..09cc36c298c 100644 --- a/dlls/msacm/winemp3/interface.c +++ b/dlls/msacm/winemp3/interface.c @@ -63,7 +63,7 @@ void ExitMP3(struct mpstr *mp) } } -static struct buf *addbuf(struct mpstr *mp,char *buf,int size) +static struct buf *addbuf(struct mpstr *mp,const unsigned char *buf,int size) { struct buf *nbuf; @@ -151,7 +151,7 @@ static void read_head(struct mpstr *mp) mp->header = head; } -int decodeMP3(struct mpstr *mp,char *in,int isize,char *out, +int decodeMP3(struct mpstr *mp,const unsigned char *in,int isize,unsigned char *out, int osize,int *done) { int len; diff --git a/dlls/msacm/winemp3/mpegl3.c b/dlls/msacm/winemp3/mpegl3.c index daf45dc123e..a03f063ff25 100644 --- a/dlls/msacm/winemp3/mpegl3.c +++ b/dlls/msacm/winemp3/mpegl3.c @@ -150,7 +150,7 @@ static void mp3_horse(PACMDRVSTREAMINSTANCE adsi, int size, ret; DWORD dpos = 0; - ret = decodeMP3(&amd->mp, (unsigned char*)src, *nsrc, dst, *ndst, &size); + ret = decodeMP3(&amd->mp, src, *nsrc, dst, *ndst, &size); if (ret != MP3_OK) { *ndst = *nsrc = 0; diff --git a/dlls/msacm/winemp3/mpglib.h b/dlls/msacm/winemp3/mpglib.h index 27590bc013d..6e4888d2a24 100644 --- a/dlls/msacm/winemp3/mpglib.h +++ b/dlls/msacm/winemp3/mpglib.h @@ -60,8 +60,8 @@ extern "C" { #endif BOOL InitMP3(struct mpstr *mp); -int decodeMP3(struct mpstr *mp,char *inmemory,int inmemsize, - char *outmemory,int outmemsize,int *done); +int decodeMP3(struct mpstr *mp,const unsigned char *inmemory,int inmemsize, + unsigned char *outmemory,int outmemsize,int *done); void ExitMP3(struct mpstr *mp); #ifdef __cplusplus diff --git a/dlls/shlwapi/istream.c b/dlls/shlwapi/istream.c index 7cad9807acb..43c58539370 100644 --- a/dlls/shlwapi/istream.c +++ b/dlls/shlwapi/istream.c @@ -43,7 +43,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); typedef struct { const IStreamVtbl *lpVtbl; - ULONG ref; + LONG ref; HANDLE hFile; DWORD dwMode; LPOLESTR lpszPath; diff --git a/dlls/shlwapi/regstream.c b/dlls/shlwapi/regstream.c index c09a42d6560..50b6c45d8ac 100644 --- a/dlls/shlwapi/regstream.c +++ b/dlls/shlwapi/regstream.c @@ -37,7 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); typedef struct { const IStreamVtbl *lpVtbl; - DWORD ref; + LONG ref; HKEY hKey; LPBYTE pbBuffer; DWORD dwLength; diff --git a/dlls/shlwapi/tests/shreg.c b/dlls/shlwapi/tests/shreg.c index 7146d1754da..d8d4d923200 100644 --- a/dlls/shlwapi/tests/shreg.c +++ b/dlls/shlwapi/tests/shreg.c @@ -84,9 +84,9 @@ static HKEY create_test_entries(void) if (hKey) { - ok(!RegSetValueExA(hKey,"Test1",0,REG_EXPAND_SZ, sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed\n"); - ok(!RegSetValueExA(hKey,"Test2",0,REG_SZ, sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed\n"); - ok(!RegSetValueExA(hKey,"Test3",0,REG_EXPAND_SZ, sTestpath2, strlen(sTestpath2)+1), "RegSetValueExA failed\n"); + ok(!RegSetValueExA(hKey,"Test1",0,REG_EXPAND_SZ, (LPBYTE) sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed\n"); + ok(!RegSetValueExA(hKey,"Test2",0,REG_SZ, (LPBYTE) sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed\n"); + ok(!RegSetValueExA(hKey,"Test3",0,REG_EXPAND_SZ, (LPBYTE) sTestpath2, strlen(sTestpath2)+1), "RegSetValueExA failed\n"); } sExpLen1 = ExpandEnvironmentStringsA(sTestpath1, sExpTestpath1, sizeof(sExpTestpath1)); diff --git a/dlls/winmm/winealsa/midi.c b/dlls/winmm/winealsa/midi.c index defc5c336ae..4891d32e5c8 100644 --- a/dlls/winmm/winealsa/midi.c +++ b/dlls/winmm/winealsa/midi.c @@ -928,7 +928,7 @@ static DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize) return MIDIERR_NODEVICE; } - lpData = lpMidiHdr->lpData; + lpData = (LPBYTE) lpMidiHdr->lpData; if (lpData == NULL) return MIDIERR_UNPREPARED; diff --git a/dlls/winmm/wineoss/dsrender.c b/dlls/winmm/wineoss/dsrender.c index 801d9deea7a..0cc3f50f4d1 100644 --- a/dlls/winmm/wineoss/dsrender.c +++ b/dlls/winmm/wineoss/dsrender.c @@ -77,7 +77,7 @@ struct IDsDriverPropertySetImpl { /* IUnknown fields */ const IDsDriverPropertySetVtbl *lpVtbl; - DWORD ref; + LONG ref; IDsDriverBufferImpl* buffer; }; @@ -86,7 +86,7 @@ struct IDsDriverNotifyImpl { /* IUnknown fields */ const IDsDriverNotifyVtbl *lpVtbl; - DWORD ref; + LONG ref; /* IDsDriverNotifyImpl fields */ LPDSBPOSITIONNOTIFY notifies; @@ -99,7 +99,7 @@ struct IDsDriverImpl { /* IUnknown fields */ const IDsDriverVtbl *lpVtbl; - DWORD ref; + LONG ref; /* IDsDriverImpl fields */ UINT wDevID; @@ -113,7 +113,7 @@ struct IDsDriverBufferImpl { /* IUnknown fields */ const IDsDriverBufferVtbl *lpVtbl; - DWORD ref; + LONG ref; /* IDsDriverBufferImpl fields */ IDsDriverImpl* drv; diff --git a/dlls/winmm/wineoss/midi.c b/dlls/winmm/wineoss/midi.c index 7d474f3fb84..797ee45fc21 100644 --- a/dlls/winmm/wineoss/midi.c +++ b/dlls/winmm/wineoss/midi.c @@ -527,7 +527,7 @@ static void midReceiveChar(WORD wDevID, unsigned char value, DWORD dwTime) EnterCriticalSection(&crit_sect); if ((lpMidiHdr = MidiInDev[wDevID].lpQueueHdr) != NULL) { - LPBYTE lpData = lpMidiHdr->lpData; + LPBYTE lpData = (LPBYTE) lpMidiHdr->lpData; lpData[lpMidiHdr->dwBytesRecorded++] = value; if (lpMidiHdr->dwBytesRecorded == lpMidiHdr->dwBufferLength) { @@ -1512,7 +1512,7 @@ static DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize) return MIDIERR_NODEVICE; } - lpData = lpMidiHdr->lpData; + lpData = (LPBYTE) lpMidiHdr->lpData; if (lpData == NULL) return MIDIERR_UNPREPARED;