summaryrefslogtreecommitdiff
path: root/src/modules/utils
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-11-30 22:12:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-11-30 22:12:34 +0000
commit6be364a555dce699d093f9d49cd14a9b0c174893 (patch)
treeac10770856206fb50d2e83acde528413f5f22009 /src/modules/utils
parentd9c98bcdfca6da51a1a82dc6c0dc5996b3b6cd6d (diff)
warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11181 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/utils')
-rw-r--r--src/modules/utils/bmpfilter.cpp78
-rw-r--r--src/modules/utils/hyperlink.cpp2
2 files changed, 40 insertions, 40 deletions
diff --git a/src/modules/utils/bmpfilter.cpp b/src/modules/utils/bmpfilter.cpp
index f26a708049..9e7c28caba 100644
--- a/src/modules/utils/bmpfilter.cpp
+++ b/src/modules/utils/bmpfilter.cpp
@@ -41,7 +41,7 @@ static INT_PTR sttBitmapLoader(const TCHAR* ptszFileName)
if (!PathToAbsoluteT(ptszFileName, szFilename))
mir_sntprintf(szFilename, SIZEOF(szFilename), _T("%s"), ptszFileName);
- int filenameLen = mir_tstrlen(szFilename);
+ size_t filenameLen = mir_tstrlen(szFilename);
if (filenameLen > 4) {
TCHAR* pszExt = szFilename + filenameLen - 4;
@@ -140,44 +140,44 @@ static INT_PTR BmpFilterLoadBitmapW(WPARAM, LPARAM lParam)
static INT_PTR BmpFilterGetStrings(WPARAM wParam, LPARAM lParam)
{
- int bytesLeft = wParam;
+ size_t bytesLeft = wParam;
char *filter = (char*)lParam, *pfilter;
- mir_strncpy(filter, Translate("All bitmaps"), bytesLeft); bytesLeft-=mir_strlen(filter);
+ mir_strncpy(filter, Translate("All bitmaps"), bytesLeft); bytesLeft -= mir_strlen(filter);
strncat(filter, " (*.bmp;*.jpg;*.gif;*.png)", bytesLeft);
- pfilter = filter+mir_strlen(filter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter = filter + mir_strlen(filter) + 1; bytesLeft = wParam - (pfilter - filter);
mir_strncpy(pfilter, "*.BMP;*.RLE;*.JPG;*.JPEG;*.GIF;*.PNG", bytesLeft);
- pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
- mir_strncpy(pfilter, Translate("Windows bitmaps"), bytesLeft); bytesLeft-=mir_strlen(pfilter);
+ mir_strncpy(pfilter, Translate("Windows bitmaps"), bytesLeft); bytesLeft -= mir_strlen(pfilter);
strncat(pfilter, " (*.bmp;*.rle)", bytesLeft);
- pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
mir_strncpy(pfilter, "*.BMP;*.RLE", bytesLeft);
- pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
- mir_strncpy(pfilter, Translate("JPEG bitmaps"), bytesLeft); bytesLeft-=mir_strlen(pfilter);
+ mir_strncpy(pfilter, Translate("JPEG bitmaps"), bytesLeft); bytesLeft -= mir_strlen(pfilter);
strncat(pfilter, " (*.jpg;*.jpeg)", bytesLeft);
- pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
mir_strncpy(pfilter, "*.JPG;*.JPEG", bytesLeft);
- pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
- mir_strncpy(pfilter, Translate("GIF bitmaps"), bytesLeft); bytesLeft-=mir_strlen(pfilter);
+ mir_strncpy(pfilter, Translate("GIF bitmaps"), bytesLeft); bytesLeft -= mir_strlen(pfilter);
strncat(pfilter, " (*.gif)", bytesLeft);
- pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
mir_strncpy(pfilter, "*.GIF", bytesLeft);
- pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
- mir_strncpy(pfilter, Translate("PNG bitmaps"), bytesLeft); bytesLeft-=mir_strlen(pfilter);
+ mir_strncpy(pfilter, Translate("PNG bitmaps"), bytesLeft); bytesLeft -= mir_strlen(pfilter);
strncat(pfilter, " (*.png)", bytesLeft);
- pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
mir_strncpy(pfilter, "*.PNG", bytesLeft);
- pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
- mir_strncpy(pfilter, Translate("All files"), bytesLeft); bytesLeft-=mir_strlen(pfilter);
+ mir_strncpy(pfilter, Translate("All files"), bytesLeft); bytesLeft -= mir_strlen(pfilter);
strncat(pfilter, " (*)", bytesLeft);
- pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
mir_strncpy(pfilter, "*", bytesLeft);
- pfilter+=mir_strlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_strlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
if (bytesLeft) *pfilter = '\0';
return 0;
@@ -185,44 +185,44 @@ static INT_PTR BmpFilterGetStrings(WPARAM wParam, LPARAM lParam)
static INT_PTR BmpFilterGetStringsW(WPARAM wParam, LPARAM lParam)
{
- int bytesLeft = wParam;
+ size_t bytesLeft = wParam;
TCHAR *filter = (TCHAR*)lParam, *pfilter;
- mir_tstrncpy(filter, TranslateT("All bitmaps"), bytesLeft); bytesLeft-=mir_tstrlen(filter);
+ mir_tstrncpy(filter, TranslateT("All bitmaps"), bytesLeft); bytesLeft -= mir_tstrlen(filter);
_tcsncat(filter, _T(" (*.bmp;*.jpg;*.gif;*.png)"), bytesLeft);
- pfilter = filter+mir_tstrlen(filter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter = filter + mir_tstrlen(filter) + 1; bytesLeft = wParam - (pfilter - filter);
mir_tstrncpy(pfilter, _T("*.BMP;*.RLE;*.JPG;*.JPEG;*.GIF;*.PNG"), bytesLeft);
- pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
- mir_tstrncpy(pfilter, TranslateT("Windows bitmaps"), bytesLeft); bytesLeft-=mir_tstrlen(pfilter);
+ mir_tstrncpy(pfilter, TranslateT("Windows bitmaps"), bytesLeft); bytesLeft -= mir_tstrlen(pfilter);
_tcsncat(pfilter, _T(" (*.bmp;*.rle)"), bytesLeft);
- pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
mir_tstrncpy(pfilter, _T("*.BMP;*.RLE"), bytesLeft);
- pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
- mir_tstrncpy(pfilter, TranslateT("JPEG bitmaps"), bytesLeft); bytesLeft-=mir_tstrlen(pfilter);
+ mir_tstrncpy(pfilter, TranslateT("JPEG bitmaps"), bytesLeft); bytesLeft -= mir_tstrlen(pfilter);
_tcsncat(pfilter, _T(" (*.jpg;*.jpeg)"), bytesLeft);
- pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
mir_tstrncpy(pfilter, _T("*.JPG;*.JPEG"), bytesLeft);
- pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
- mir_tstrncpy(pfilter, TranslateT("GIF bitmaps"), bytesLeft); bytesLeft-=mir_tstrlen(pfilter);
+ mir_tstrncpy(pfilter, TranslateT("GIF bitmaps"), bytesLeft); bytesLeft -= mir_tstrlen(pfilter);
_tcsncat(pfilter, _T(" (*.gif)"), bytesLeft);
- pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
mir_tstrncpy(pfilter, _T("*.GIF"), bytesLeft);
- pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
- mir_tstrncpy(pfilter, TranslateT("PNG bitmaps"), bytesLeft); bytesLeft-=mir_tstrlen(pfilter);
+ mir_tstrncpy(pfilter, TranslateT("PNG bitmaps"), bytesLeft); bytesLeft -= mir_tstrlen(pfilter);
_tcsncat(pfilter, _T(" (*.png)"), bytesLeft);
- pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
mir_tstrncpy(pfilter, _T("*.PNG"), bytesLeft);
- pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
- mir_tstrncpy(pfilter, TranslateT("All files"), bytesLeft); bytesLeft-=mir_tstrlen(pfilter);
+ mir_tstrncpy(pfilter, TranslateT("All files"), bytesLeft); bytesLeft -= mir_tstrlen(pfilter);
_tcsncat(pfilter, _T(" (*)"), bytesLeft);
- pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
mir_tstrncpy(pfilter, _T("*"), bytesLeft);
- pfilter+=mir_tstrlen(pfilter)+1; bytesLeft = wParam-(pfilter-filter);
+ pfilter += mir_tstrlen(pfilter) + 1; bytesLeft = wParam - (pfilter - filter);
if (bytesLeft) *pfilter = '\0';
return 0;
diff --git a/src/modules/utils/hyperlink.cpp b/src/modules/utils/hyperlink.cpp
index 9f075a7514..0ca712f79d 100644
--- a/src/modules/utils/hyperlink.cpp
+++ b/src/modules/utils/hyperlink.cpp
@@ -165,7 +165,7 @@ static LRESULT CALLBACK HyperlinkWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA
if (hdc == NULL) return 0; /* text change failed */
if (dat->hEnableFont != NULL) hPrevFont = (HFONT)SelectObject(hdc, dat->hEnableFont);
if (dat->hEnableFont == NULL || hPrevFont != NULL) /* select failed? */
- if (GetTextExtentPoint32(hdc, (TCHAR*)lParam, mir_tstrlen((TCHAR*)lParam), &textSize))
+ if (GetTextExtentPoint32(hdc, (TCHAR*)lParam, (int)mir_tstrlen((TCHAR*)lParam), &textSize))
if (GetClientRect(hwnd, &rc)) {
dat->rcText.top = 0;
dat->rcText.bottom = dat->rcText.top+textSize.cy;