diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c index 128bbd8b0ae..c10430c93d1 100644 --- a/dlls/dsound/tests/ds3d.c +++ b/dlls/dsound/tests/ds3d.c @@ -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); diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c index bddb3ee6321..23c5902c957 100644 --- a/dlls/dsound/tests/ds3d8.c +++ b/dlls/dsound/tests/ds3d8.c @@ -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); diff --git a/dlls/mapi32/tests/prop.c b/dlls/mapi32/tests/prop.c index 4e7e2b4fcec..c443edb7e12 100644 --- a/dlls/mapi32/tests/prop.c +++ b/dlls/mapi32/tests/prop.c @@ -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; diff --git a/dlls/msvcrt/data.c b/dlls/msvcrt/data.c index 7ce401b6a7b..67f96252b5e 100644 --- a/dlls/msvcrt/data.c +++ b/dlls/msvcrt/data.c @@ -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: */ diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 0eef05e01c1..1a041d2bba5 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -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()); diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 8d22a2166c7..6e0c8cb7a96 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -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; diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index d06b383a313..3e6249b92ec 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -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; } } diff --git a/dlls/winmm/wavemap/wavemap.c b/dlls/winmm/wavemap/wavemap.c index 9fb8a7ed925..b32e2f745ab 100644 --- a/dlls/winmm/wavemap/wavemap.c +++ b/dlls/winmm/wavemap/wavemap.c @@ -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;