Skip to content

Commit

Permalink
fixed compiler warning, SetFilePointer returns a DWORD, a DWORD is un…
Browse files Browse the repository at this point in the history
…signed so you cannot compare to -1, yet SetFilePointer uses lseek and that can return a -1 but it is cast to DWORD. So do the same case and pray it does the right thing.
  • Loading branch information
davilla committed Sep 8, 2012
1 parent 1fa356d commit 389f9bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xbmc/storage/IoSupport.cpp
Expand Up @@ -167,7 +167,7 @@ INT CIoSupport::ReadSector(HANDLE hDevice, DWORD dwSector, LPSTR lpczBuffer)

for (int i = 0; i < 5; i++)
{
if (SetFilePointer(hDevice, Displacement.u.LowPart, &Displacement.u.HighPart, FILE_BEGIN) != -1)
if (SetFilePointer(hDevice, Displacement.u.LowPart, &Displacement.u.HighPart, FILE_BEGIN) != (DWORD)-1)
{
if (ReadFile(hDevice, m_rawXferBuffer, dwSectorSize, &dwRead, NULL))
{
Expand Down

0 comments on commit 389f9bb

Please sign in to comment.