Commit affc6e02 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

riched20: Sign-compare warnings fix.

parent 609a3998
...@@ -3203,7 +3203,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, ...@@ -3203,7 +3203,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
if (unicode) if (unicode)
{ {
memcpy((LPWSTR)lParam, bufferW, wParam * sizeof(WCHAR)); memcpy((LPWSTR)lParam, bufferW, wParam * sizeof(WCHAR));
if (lstrlenW(bufferW) >= wParam) rc = 0; if (strlenW(bufferW) >= wParam) rc = 0;
} }
else else
{ {
...@@ -3338,7 +3338,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, ...@@ -3338,7 +3338,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
{ {
if (run && (run->member.run.nFlags & MERF_ENDPARA)) if (run && (run->member.run.nFlags & MERF_ENDPARA))
{ {
unsigned int i; int i;
/* Write as many \r as encoded in end-of-paragraph, space allowing */ /* Write as many \r as encoded in end-of-paragraph, space allowing */
for (i = 0; i < run->member.run.nCR && nCharsLeft > 0; i++, nCharsLeft--) for (i = 0; i < run->member.run.nCR && nCharsLeft > 0; i++, nCharsLeft--)
{ {
...@@ -4650,7 +4650,7 @@ BOOL ME_IsCandidateAnURL(ME_TextEditor *editor, int sel_min, int sel_max) ...@@ -4650,7 +4650,7 @@ BOOL ME_IsCandidateAnURL(ME_TextEditor *editor, int sel_min, int sel_max)
}; };
LPWSTR bufferW = NULL; LPWSTR bufferW = NULL;
WCHAR bufW[32]; WCHAR bufW[32];
int i; unsigned int i;
if (sel_max == -1) sel_max = ME_GetTextLength(editor); if (sel_max == -1) sel_max = ME_GetTextLength(editor);
assert(sel_min <= sel_max); assert(sel_min <= sel_max);
...@@ -4660,7 +4660,7 @@ BOOL ME_IsCandidateAnURL(ME_TextEditor *editor, int sel_min, int sel_max) ...@@ -4660,7 +4660,7 @@ BOOL ME_IsCandidateAnURL(ME_TextEditor *editor, int sel_min, int sel_max)
if (bufferW == NULL) { if (bufferW == NULL) {
bufferW = heap_alloc((sel_max - sel_min + 1) * sizeof(WCHAR)); bufferW = heap_alloc((sel_max - sel_min + 1) * sizeof(WCHAR));
} }
ME_GetTextW(editor, bufferW, sel_min, min(sel_max - sel_min, strlen(prefixes[i].text)), 0); ME_GetTextW(editor, bufferW, sel_min, min(sel_max - sel_min, lstrlenA(prefixes[i].text)), 0);
MultiByteToWideChar(CP_ACP, 0, prefixes[i].text, -1, bufW, 32); MultiByteToWideChar(CP_ACP, 0, prefixes[i].text, -1, bufW, 32);
if (!lstrcmpW(bufW, bufferW)) if (!lstrcmpW(bufW, bufferW))
{ {
......
...@@ -2326,7 +2326,7 @@ void LookupInit(void) ...@@ -2326,7 +2326,7 @@ void LookupInit(void)
void LookupCleanup(void) void LookupCleanup(void)
{ {
int i; unsigned int i;
for (i=0; i<RTF_KEY_COUNT*2; i++) for (i=0; i<RTF_KEY_COUNT*2; i++)
{ {
......
...@@ -201,7 +201,7 @@ ME_StreamOutRTFFontAndColorTbl(ME_OutStream *pStream, ME_DisplayItem *pFirstRun, ...@@ -201,7 +201,7 @@ ME_StreamOutRTFFontAndColorTbl(ME_OutStream *pStream, ME_DisplayItem *pFirstRun,
{ {
ME_DisplayItem *item = pFirstRun; ME_DisplayItem *item = pFirstRun;
ME_FontTableItem *table = pStream->fonttbl; ME_FontTableItem *table = pStream->fonttbl;
int i; unsigned int i;
ME_DisplayItem *pLastPara = ME_GetParagraph(pLastRun); ME_DisplayItem *pLastPara = ME_GetParagraph(pLastRun);
ME_DisplayItem *pCell = NULL; ME_DisplayItem *pCell = NULL;
...@@ -264,7 +264,7 @@ ME_StreamOutRTFFontAndColorTbl(ME_OutStream *pStream, ME_DisplayItem *pFirstRun, ...@@ -264,7 +264,7 @@ ME_StreamOutRTFFontAndColorTbl(ME_OutStream *pStream, ME_DisplayItem *pFirstRun,
{ {
if (borders[i]->width > 0) if (borders[i]->width > 0)
{ {
int j; unsigned int j;
COLORREF crColor = borders[i]->colorRef; COLORREF crColor = borders[i]->colorRef;
for (j = 1; j < pStream->nColorTblLen; j++) for (j = 1; j < pStream->nColorTblLen; j++)
if (pStream->colortbl[j] == crColor) if (pStream->colortbl[j] == crColor)
...@@ -348,7 +348,7 @@ ME_StreamOutRTFTableProps(ME_TextEditor *editor, ME_OutStream *pStream, ...@@ -348,7 +348,7 @@ ME_StreamOutRTFTableProps(ME_TextEditor *editor, ME_OutStream *pStream,
{ {
if (borders[i]->width) if (borders[i]->width)
{ {
int j; unsigned int j;
COLORREF crColor = borders[i]->colorRef; COLORREF crColor = borders[i]->colorRef;
sprintf(props + strlen(props), "\\clbrdr%c", sideChar[i]); sprintf(props + strlen(props), "\\clbrdr%c", sideChar[i]);
sprintf(props + strlen(props), "\\brdrs"); sprintf(props + strlen(props), "\\brdrs");
...@@ -380,7 +380,7 @@ ME_StreamOutRTFTableProps(ME_TextEditor *editor, ME_OutStream *pStream, ...@@ -380,7 +380,7 @@ ME_StreamOutRTFTableProps(ME_TextEditor *editor, ME_OutStream *pStream,
{ {
if (borders[i]->width) if (borders[i]->width)
{ {
int j; unsigned int j;
COLORREF crColor = borders[i]->colorRef; COLORREF crColor = borders[i]->colorRef;
sprintf(props + strlen(props), "\\trbrdr%c", sideChar[i]); sprintf(props + strlen(props), "\\trbrdr%c", sideChar[i]);
sprintf(props + strlen(props), "\\brdrs"); sprintf(props + strlen(props), "\\brdrs");
...@@ -555,7 +555,7 @@ static BOOL ...@@ -555,7 +555,7 @@ static BOOL
ME_StreamOutRTFCharProps(ME_OutStream *pStream, CHARFORMAT2W *fmt) ME_StreamOutRTFCharProps(ME_OutStream *pStream, CHARFORMAT2W *fmt)
{ {
char props[STREAMOUT_BUFFER_SIZE] = ""; char props[STREAMOUT_BUFFER_SIZE] = "";
int i; unsigned int i;
if (fmt->dwMask & CFM_ALLCAPS && fmt->dwEffects & CFE_ALLCAPS) if (fmt->dwMask & CFM_ALLCAPS && fmt->dwEffects & CFE_ALLCAPS)
strcat(props, "\\caps"); strcat(props, "\\caps");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment