From: ShadowFlare Date: Wed, 15 Aug 2012 07:35:47 +0000 (-0600) Subject: Fixed some warnings X-Git-Url: https://sfsrealm.hopto.org/projects/?a=commitdiff_plain;h=41207b3631795f5b382518a8b575ef13c42058a1;p=SFmpqapi.git Fixed some warnings --- diff --git a/SFUtil.cpp b/SFUtil.cpp index 76d2228..8df5505 100644 --- a/SFUtil.cpp +++ b/SFUtil.cpp @@ -60,7 +60,7 @@ Int64 SFSetFilePointer(HANDLE hFile, Int64 nDistance, UInt32 dwMoveMethod) FilePos.i32[0] = ::SetFilePointer(hFile, FilePos.i32[0], &FilePos.i32[1], dwMoveMethod); - if (FilePos.i32[0] == INVALID_SET_FILE_POINTER) { + if (FilePos.ui32[0] == INVALID_SET_FILE_POINTER) { if (::GetLastError() != NO_ERROR) return -1; } @@ -85,7 +85,7 @@ char *nextline(const char *strline) const char *strcr = strchr(strline,'\r'); const char *strlf = strchr(strline,'\n'); if (strcr==0 && strlf==0) return 0; - const char *streol; + const char *streol = strlf; if (strcr!=0 && (strcrlpFileName,i); + sprintf(lpFileName,"%s.compact.%04d",mpqOpenArc->lpFileName,i); hFile = CreateFile(lpFileName,GENERIC_READ|GENERIC_WRITE,0,0,CREATE_NEW,0,0); if (hFile!=INVALID_HANDLE_VALUE) break; @@ -3404,7 +3404,7 @@ DWORD DetectFileSeedEx(MPQARCHIVE * mpqOpenArc, HASHTABLEENTRY * lpHashEntry, LP else { HANDLE hlFile,hMPQ=(HANDLE)mpqOpenArc; DWORD fsz; - char *listbuffer; + char *listbuffer = 0; LCID lcOldLocale = LocaleID; for (DWORD lcn=0;lcn