Trivial integer truncation warning fixes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
diff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c
index c7184bd..2f53271 100644
--- a/src/video/SDL_egl.c
+++ b/src/video/SDL_egl.c
@@ -81,7 +81,7 @@ static int SDL_EGL_HasExtension(_THIS, const char *ext)
{
int i;
int len = 0;
- int ext_len;
+ size_t ext_len;
const char *exts;
const char *ext_word;
diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index c787f25..edf9c83 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -598,7 +598,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_CHAR:
{
char text[5];
- if ( WIN_ConvertUTF32toUTF8( wParam, text ) ) {
+ if ( WIN_ConvertUTF32toUTF8( (UINT32)wParam, text ) ) {
SDL_SendKeyboardText( text );
}
}
diff --git a/src/video/windows/SDL_windowskeyboard.c b/src/video/windows/SDL_windowskeyboard.c
index 847cba5..02f7b63 100644
--- a/src/video/windows/SDL_windowskeyboard.c
+++ b/src/video/windows/SDL_windowskeyboard.c
@@ -738,7 +738,7 @@ IME_SendEditingEvent(SDL_VideoData *videodata)
SDL_wcslcpy(buffer, videodata->ime_composition, size);
}
s = WIN_StringToUTF8(buffer);
- SDL_SendEditingText(s, videodata->ime_cursor + SDL_wcslen(videodata->ime_readingstring), 0);
+ SDL_SendEditingText(s, videodata->ime_cursor + (int)SDL_wcslen(videodata->ime_readingstring), 0);
SDL_free(s);
}
@@ -1403,7 +1403,7 @@ IME_RenderCandidateList(SDL_VideoData *videodata, HDC hdc)
if (!*s)
break;
- GetTextExtentPoint32W(hdc, s, SDL_wcslen(s), &candsizes[i]);
+ GetTextExtentPoint32W(hdc, s, (int)SDL_wcslen(s), &candsizes[i]);
maxcandsize.cx = SDL_max(maxcandsize.cx, candsizes[i].cx);
maxcandsize.cy = SDL_max(maxcandsize.cy, candsizes[i].cy);
@@ -1495,7 +1495,7 @@ IME_RenderCandidateList(SDL_VideoData *videodata, HDC hdc)
}
DrawRect(hdc, left, top, right, bottom, candborder);
- ExtTextOutW(hdc, left + candborder + candpadding, top + candborder + candpadding, 0, NULL, s, SDL_wcslen(s), NULL);
+ ExtTextOutW(hdc, left + candborder + candpadding, top + candborder + candpadding, 0, NULL, s, (int)SDL_wcslen(s), NULL);
}
StopDrawToBitmap(hdc, &hbm);