Commit 6dc69f5f authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Fix gcc 4.0 warnings.

parent c75127c5
......@@ -762,8 +762,7 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
getDSBCAPS(bufdesc.dwFlags),DXGetErrorString8(rc));
if (rc==DS_OK && secondary!=NULL) {
if (!has_3d) {
DWORD refpan,pan;
LONG refvol,vol;
LONG refvol,vol,refpan,pan;
/* Check the initial secondary buffer's volume and pan */
rc=IDirectSoundBuffer_GetVolume(secondary,&vol);
......
......@@ -656,8 +656,7 @@ static HRESULT test_secondary8(LPGUID lpGuid, int play,
getDSBCAPS(bufdesc.dwFlags),DXGetErrorString8(rc));
if (rc==DS_OK && secondary!=NULL) {
if (!has_3d) {
DWORD refpan,pan;
LONG refvol,vol;
LONG refvol,vol,refpan,pan;
/* Check the initial secondary buffer's volume and pan */
rc=IDirectSoundBuffer_GetVolume(secondary,&vol);
......
......@@ -480,8 +480,8 @@ static void test_FPropCompareProp(void)
case PT_BINARY:
pvLeft.Value.bin.cb = 1;
pvRight.Value.bin.cb = 1;
pvLeft.Value.bin.lpb = lbuffa;
pvRight.Value.bin.lpb = rbuffa;
pvLeft.Value.bin.lpb = (LPBYTE)lbuffa;
pvRight.Value.bin.lpb = (LPBYTE)rbuffa;
lbuffa[0] = lVal;
rbuffa[0] = rVal;
break;
......@@ -603,8 +603,8 @@ static void test_LPropCompareProp(void)
case PT_BINARY:
pvLeft.Value.bin.cb = 1;
pvRight.Value.bin.cb = 1;
pvLeft.Value.bin.lpb = lbuffa;
pvRight.Value.bin.lpb = rbuffa;
pvLeft.Value.bin.lpb = (LPBYTE)lbuffa;
pvRight.Value.bin.lpb = (LPBYTE)rbuffa;
lbuffa[0] = lVal;
rbuffa[0] = rVal;
break;
......
......@@ -29,7 +29,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
unsigned int MSVCRT___argc;
int MSVCRT___argc;
unsigned int MSVCRT_basemajor;/* FIXME: */
unsigned int MSVCRT_baseminor;/* FIXME: */
unsigned int MSVCRT_baseversion; /* FIXME: */
......
......@@ -403,7 +403,7 @@ static void msvcrt_alloc_buffer(MSVCRT_FILE* file)
file->_bufsiz = MSVCRT_BUFSIZ;
file->_flag |= MSVCRT__IOMYBUF;
} else {
file->_base = (unsigned char *)(&file->_charbuf);
file->_base = (char*)(&file->_charbuf);
/* put here 2 ??? */
file->_bufsiz = sizeof(file->_charbuf);
}
......@@ -726,7 +726,8 @@ int _dup(int od)
*/
int _eof(int fd)
{
DWORD curpos,endpos,hcurpos,hendpos;
DWORD curpos,endpos;
LONG hcurpos,hendpos;
HANDLE hand = msvcrt_fdtoh(fd);
TRACE(":fd (%d) handle (%p)\n",fd,hand);
......@@ -738,7 +739,7 @@ int _eof(int fd)
/* Otherwise we do it the hard way */
hcurpos = hendpos = 0;
curpos = SetFilePointer(hand, 0, &hcurpos, SEEK_CUR);
curpos = SetFilePointer(hand, 0, &hcurpos, FILE_CURRENT);
endpos = SetFilePointer(hand, 0, &hendpos, FILE_END);
if (curpos == endpos && hcurpos == hendpos)
......@@ -788,8 +789,8 @@ void msvcrt_free_io(void)
*/
__int64 _lseeki64(int fd, __int64 offset, int whence)
{
DWORD ret, hoffset = (DWORD) (offset >> 32);
HANDLE hand = msvcrt_fdtoh(fd);
LARGE_INTEGER ofs, ret;
TRACE(":fd (%d) handle (%p)\n",fd,hand);
if (hand == INVALID_HANDLE_VALUE)
......@@ -801,19 +802,19 @@ __int64 _lseeki64(int fd, __int64 offset, int whence)
return -1;
}
TRACE(":fd (%d) to 0x%08lx%08lx pos %s\n",
fd,hoffset,(long)offset,
TRACE(":fd (%d) to %s pos %s\n",
fd,wine_dbgstr_longlong(ofs.QuadPart),
(whence==SEEK_SET)?"SEEK_SET":
(whence==SEEK_CUR)?"SEEK_CUR":
(whence==SEEK_END)?"SEEK_END":"UNKNOWN");
ret = SetFilePointer(hand, (long)offset, &hoffset, whence);
if (ret != INVALID_SET_FILE_POINTER || !GetLastError())
ofs.QuadPart = offset;
if (SetFilePointerEx(hand, ofs, &ret, whence))
{
MSVCRT_fdesc[fd].wxflag &= ~WX_ATEOF;
/* FIXME: What if we seek _to_ EOF - is EOF set? */
return ((__int64)hoffset << 32) | ret;
return ret.QuadPart;
}
TRACE(":error-last error (%ld)\n",GetLastError());
msvcrt_set_errno(GetLastError());
......
......@@ -73,7 +73,7 @@ extern DWORD msvcrt_tls_index;
struct __thread_data {
int thread_errno;
unsigned long thread_doserrno;
char *mbstok_next; /* next ptr for mbstok() */
unsigned char *mbstok_next; /* next ptr for mbstok() */
char *efcvt_buffer; /* buffer for ecvt/fcvt */
int fpecode;
MSVCRT_terminate_function terminate_handler;
......
......@@ -549,7 +549,7 @@ static void V4l_GetFrame(Capture * capBox, unsigned char ** pInput)
if (errno != EAGAIN) break;
if (retval == -1)
WARN("Error occurred while reading from device: %s\n", strerror(errno));
*pInput = capBox->grab_data;
*pInput = (unsigned char*) capBox->grab_data;
}
}
......
......@@ -358,11 +358,11 @@ static DWORD wodPrepare(WAVEMAPDATA* wom, LPWAVEHDR lpWaveHdrSrc, DWORD dwParam2
ash->cbStruct = sizeof(*ash);
ash->fdwStatus = 0L;
ash->dwUser = (DWORD)lpWaveHdrSrc;
ash->pbSrc = lpWaveHdrSrc->lpData;
ash->pbSrc = (LPBYTE)lpWaveHdrSrc->lpData;
ash->cbSrcLength = lpWaveHdrSrc->dwBufferLength;
/* ash->cbSrcLengthUsed */
ash->dwSrcUser = lpWaveHdrSrc->dwUser; /* FIXME ? */
ash->pbDst = (LPSTR)ash + sizeof(ACMSTREAMHEADER) + sizeof(WAVEHDR);
ash->pbDst = (LPBYTE)ash + sizeof(ACMSTREAMHEADER) + sizeof(WAVEHDR);
ash->cbDstLength = size;
/* ash->cbDstLengthUsed */
ash->dwDstUser = 0; /* FIXME ? */
......@@ -373,7 +373,7 @@ static DWORD wodPrepare(WAVEMAPDATA* wom, LPWAVEHDR lpWaveHdrSrc, DWORD dwParam2
}
lpWaveHdrDst = (LPWAVEHDR)((LPSTR)ash + sizeof(ACMSTREAMHEADER));
lpWaveHdrDst->lpData = ash->pbDst;
lpWaveHdrDst->lpData = (LPSTR)ash->pbDst;
lpWaveHdrDst->dwBufferLength = size; /* conversion is not done yet */
lpWaveHdrDst->dwFlags = 0;
lpWaveHdrDst->dwLoops = 0;
......@@ -912,11 +912,11 @@ static DWORD widPrepare(WAVEMAPDATA* wim, LPWAVEHDR lpWaveHdrDst, DWORD dwParam2
ash->cbStruct = sizeof(*ash);
ash->fdwStatus = 0L;
ash->dwUser = (DWORD)lpWaveHdrDst;
ash->pbSrc = (LPSTR)ash + sizeof(ACMSTREAMHEADER) + sizeof(WAVEHDR);
ash->pbSrc = (LPBYTE)ash + sizeof(ACMSTREAMHEADER) + sizeof(WAVEHDR);
ash->cbSrcLength = size;
/* ash->cbSrcLengthUsed */
ash->dwSrcUser = 0L; /* FIXME ? */
ash->pbDst = lpWaveHdrDst->lpData;
ash->pbDst = (LPBYTE)lpWaveHdrDst->lpData;
ash->cbDstLength = lpWaveHdrDst->dwBufferLength;
/* ash->cbDstLengthUsed */
ash->dwDstUser = lpWaveHdrDst->dwUser; /* FIXME ? */
......@@ -927,7 +927,7 @@ static DWORD widPrepare(WAVEMAPDATA* wim, LPWAVEHDR lpWaveHdrDst, DWORD dwParam2
}
lpWaveHdrSrc = (LPWAVEHDR)((LPSTR)ash + sizeof(ACMSTREAMHEADER));
lpWaveHdrSrc->lpData = ash->pbSrc;
lpWaveHdrSrc->lpData = (LPSTR)ash->pbSrc;
lpWaveHdrSrc->dwBufferLength = size; /* conversion is not done yet */
lpWaveHdrSrc->dwFlags = 0;
lpWaveHdrSrc->dwLoops = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment