diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/FileStream.cpp | 4 | ||||
-rw-r--r-- | src/SFileFindFile.cpp | 2 | ||||
-rw-r--r-- | src/StormPort.h | 6 | ||||
-rw-r--r-- | src/adpcm/adpcm.cpp | 4 | ||||
-rw-r--r-- | src/sparse/sparse.cpp | 2 |
5 files changed, 11 insertions, 7 deletions
diff --git a/src/FileStream.cpp b/src/FileStream.cpp index 9cea184..62de5b4 100644 --- a/src/FileStream.cpp +++ b/src/FileStream.cpp @@ -734,7 +734,7 @@ static bool BaseHttp_Read( { // Add range request to the HTTP headers // http://www.clevercomponents.com/articles/article015/resuming.asp - _stprintf(szRangeRequest, _T("Range: bytes=%d-%d"), dwStartOffset, dwEndOffset); + _stprintf(szRangeRequest, _T("Range: bytes=%u-%u"), (unsigned int)dwStartOffset, (unsigned int)dwEndOffset); HttpAddRequestHeaders(hRequest, szRangeRequest, 0xFFFFFFFF, HTTP_ADDREQ_FLAG_ADD_IF_NEW); // Send the request to the server @@ -1669,7 +1669,7 @@ static void PartStream_Close(TBlockStream * pStream) // Make sure that the header is properly BSWAPed BSWAP_ARRAY32_UNSIGNED(&PartHeader, sizeof(PART_FILE_HEADER)); - sprintf(PartHeader.GameBuildNumber, "%u", pStream->BuildNumber); + sprintf(PartHeader.GameBuildNumber, "%u", (unsigned int)pStream->BuildNumber); // Write the part header pStream->BaseWrite(pStream, &ByteOffset, &PartHeader, sizeof(PART_FILE_HEADER)); diff --git a/src/SFileFindFile.cpp b/src/SFileFindFile.cpp index 21c9499..42f5380 100644 --- a/src/SFileFindFile.cpp +++ b/src/SFileFindFile.cpp @@ -289,7 +289,7 @@ static int DoMPQSearch(TMPQSearch * hs, SFILE_FIND_DATA * lpFindFileData) { // Open the file by its pseudo-name. // This also generates the file name with a proper extension - sprintf(szPseudoName, "File%08u.xxx", dwBlockIndex); + sprintf(szPseudoName, "File%08u.xxx", (unsigned int)dwBlockIndex); if(SFileOpenFileEx((HANDLE)hs->ha, szPseudoName, SFILE_OPEN_BASE_FILE, &hFile)) { szFileName = (pFileEntry->szFileName != NULL) ? pFileEntry->szFileName : szPseudoName; diff --git a/src/StormPort.h b/src/StormPort.h index 218d5cf..902b785 100644 --- a/src/StormPort.h +++ b/src/StormPort.h @@ -270,7 +270,11 @@ #define STORMLIB_DEPRECATED(_Text) __declspec(deprecated) #endif #else - #define STORMLIB_DEPRECATED(_Text) __attribute__((deprecated(_Text))) + #ifdef __GNUC__ + #define STORMLIB_DEPRECATED(_Text) __attribute__((deprecated)) + #else + #define STORMLIB_DEPRECATED(_Text) __attribute__((deprecated(_Text))) + #endif #endif // When a flag is deprecated, use this macro diff --git a/src/adpcm/adpcm.cpp b/src/adpcm/adpcm.cpp index d05fca6..7805dc5 100644 --- a/src/adpcm/adpcm.cpp +++ b/src/adpcm/adpcm.cpp @@ -79,7 +79,7 @@ class TADPCMStream bool ReadWordSample(short & OneSample) { // Check if we have enough space in the output buffer - if((pbBufferEnd - pbBuffer) < sizeof(short)) + if((size_t)(pbBufferEnd - pbBuffer) < sizeof(short)) return false; // Write the sample @@ -91,7 +91,7 @@ class TADPCMStream bool WriteWordSample(short OneSample) { // Check if we have enough space in the output buffer - if((pbBufferEnd - pbBuffer) < sizeof(short)) + if((size_t)(pbBufferEnd - pbBuffer) < sizeof(short)) return false; // Write the sample diff --git a/src/sparse/sparse.cpp b/src/sparse/sparse.cpp index dd65c82..dc988ba 100644 --- a/src/sparse/sparse.cpp +++ b/src/sparse/sparse.cpp @@ -260,7 +260,7 @@ int DecompressSparse(void * pvOutBuffer, int * pcbOutBuffer, void * pvInBuffer, cbOutBuffer |= (OneByte << 0x00); // Verify the size of the stream against the output buffer size - if(cbOutBuffer > *pcbOutBuffer) + if(cbOutBuffer > (unsigned int)*pcbOutBuffer) return 0; // Put the output size to the buffer |