Revision: 7214
http://winmerge.svn.sourceforge.net/winmerge/?rev=7214&view=rev
Author: kimmov
Date: 2010-07-01 10:59:36 +0000 (Thu, 01 Jul 2010)
Log Message:
-----------
Fix some 64-bit build warnings.
Modified Paths:
--------------
trunk/Src/Common/unicoder.cpp
trunk/Src/Common/unicoder.h
trunk/Src/ConfigLog.cpp
trunk/Src/FileFilterMgr.cpp
trunk/Src/FileFilterMgr.h
trunk/Src/FileFiltersDlg.cpp
trunk/Src/FilterList.cpp
trunk/Src/WaitStatusCursor.h
Modified: trunk/Src/Common/unicoder.cpp
===================================================================
--- trunk/Src/Common/unicoder.cpp 2010-07-01 09:25:10 UTC (rev 7213)
+++ trunk/Src/Common/unicoder.cpp 2010-07-01 10:59:36 UTC (rev 7214)
@@ -739,7 +739,7 @@
* FF FE 00 00 UTF-32, little endian
* 00 00 FE FF UTF-32, big-endian
*/
-UNICODESET DetermineEncoding(PBYTE pBuffer, __int64 size, bool * pBom)
+UNICODESET DetermineEncoding(PBYTE pBuffer, INT64 size, bool * pBom)
{
UNICODESET unicoding = ucr::NONE;
*pBom = false;
@@ -784,7 +784,8 @@
// If not any of the above, check if it is UTF-8 without BOM?
if (unicoding == ucr::NONE)
{
- int bufSize = min(size, 8 * 1024);
+ const INT64 maxSize = 8 * 1024;
+ int bufSize = (int) min(size, maxSize);
bool invalidUtf8 = CheckForInvalidUtf8(pBuffer, bufSize);
if (!invalidUtf8)
{
Modified: trunk/Src/Common/unicoder.h
===================================================================
--- trunk/Src/Common/unicoder.h 2010-07-01 09:25:10 UTC (rev 7213)
+++ trunk/Src/Common/unicoder.h 2010-07-01 10:59:36 UTC (rev 7214)
@@ -67,7 +67,7 @@
String CrossConvertToStringA(const char* src, unsigned int srclen, int cpin, int cpout, bool * lossy);
#endif
-UNICODESET DetermineEncoding(PBYTE pBuffer, __int64 size, bool * pBom);
+UNICODESET DetermineEncoding(PBYTE pBuffer, INT64 size, bool * pBom);
} // namespace ucr
Modified: trunk/Src/ConfigLog.cpp
===================================================================
--- trunk/Src/ConfigLog.cpp 2010-07-01 09:25:10 UTC (rev 7213)
+++ trunk/Src/ConfigLog.cpp 2010-07-01 10:59:36 UTC (rev 7214)
@@ -936,7 +936,7 @@
bool lossy;
while (file.ReadString(strline, &lossy))
{
- int colon = strline.find(_T(":"));
+ String::size_type colon = strline.find(_T(":"));
if (colon > 0)
{
String name = strline.substr(0, colon);
Modified: trunk/Src/FileFilterMgr.cpp
===================================================================
--- trunk/Src/FileFilterMgr.cpp 2010-07-01 09:25:10 UTC (rev 7213)
+++ trunk/Src/FileFilterMgr.cpp 2010-07-01 10:59:36 UTC (rev 7214)
@@ -67,7 +67,7 @@
*/
void FileFilterMgr::LoadFromDirectory(LPCTSTR dir, LPCTSTR szPattern, LPCTSTR szExt)
{
- const int extlen = szExt ? _tcslen(szExt) : 0;
+ const int extlen = szExt ? (int)_tcslen(szExt) : 0;
const String pattern = paths_ConcatPath(dir, szPattern);
WIN32_FIND_DATA ff;
HANDLE h = FindFirstFile(pattern.c_str(), &ff);
@@ -166,7 +166,7 @@
// For unicode builds, use UTF-8.
// Convert pattern to UTF-8 and set option for PCRE to specify UTF-8.
regexLen = TransformUcs2ToUtf8(str.c_str(), str.length(),
- regexString, sizeof(regexString));
+ regexString, (int)sizeof(regexString));
pcre_opts |= PCRE_UTF8;
#else
strcpy(regexString, str.c_str());
@@ -301,7 +301,6 @@
vector<FileFilterElement*>::const_iterator iter = filterList->begin();
while (iter != filterList->end())
{
- //const FileFilterElement & elem = filterList.GetNext(pos);
int ovector[30];
char compString[200] = {0};
int stringLen = 0;
Modified: trunk/Src/FileFilterMgr.h
===================================================================
--- trunk/Src/FileFilterMgr.h 2010-07-01 09:25:10 UTC (rev 7213)
+++ trunk/Src/FileFilterMgr.h 2010-07-01 10:59:36 UTC (rev 7214)
@@ -69,7 +69,7 @@
void RemoveFilter(LPCTSTR szFilterFile);
// access to array of filters
- int GetFilterCount() const { return m_filters.size(); }
+ int GetFilterCount() const { return (int) m_filters.size(); }
String GetFilterName(int i) const;
String GetFilterName(const FileFilter *pFilter) const;
String GetFilterPath(int i) const;
Modified: trunk/Src/FileFiltersDlg.cpp
===================================================================
--- trunk/Src/FileFiltersDlg.cpp 2010-07-01 09:25:10 UTC (rev 7213)
+++ trunk/Src/FileFiltersDlg.cpp 2010-07-01 10:59:36 UTC (rev 7214)
@@ -142,7 +142,7 @@
m_listFilters.SetItemText(0, 1, title.c_str());
m_listFilters.SetItemText(0, 2, title.c_str());
- const int count = m_Filters->size();
+ const int count = (int) m_Filters->size();
for (int i = 0; i < count; i++)
{
@@ -524,7 +524,7 @@
*/
void FileFiltersDlg::UpdateFiltersList()
{
- int count = m_Filters->size();
+ int count = (int) m_Filters->size();
m_listFilters.DeleteAllItems();
Modified: trunk/Src/FilterList.cpp
===================================================================
--- trunk/Src/FilterList.cpp 2010-07-01 09:25:10 UTC (rev 7213)
+++ trunk/Src/FilterList.cpp 2010-07-01 10:59:36 UTC (rev 7214)
@@ -130,7 +130,7 @@
result = pcre_exec(regexp, extra, (const char *)buf.ptr, buf.size,
0, 0, ovector, 30);
else
- result = pcre_exec(regexp, extra, string, stringlen,
+ result = pcre_exec(regexp, extra, string, (int)stringlen,
0, 0, ovector, 30);
if (result >= 0)
{
Modified: trunk/Src/WaitStatusCursor.h
===================================================================
--- trunk/Src/WaitStatusCursor.h 2010-07-01 09:25:10 UTC (rev 7213)
+++ trunk/Src/WaitStatusCursor.h 2010-07-01 10:59:36 UTC (rev 7214)
@@ -43,7 +43,7 @@
void Create(HINSTANCE hinst, LPCTSTR lpCursorName, LPCTSTR m_msg);
private:
- int posInStack;
+ INT_PTR posInStack;
bool m_ended;
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|