Skip to content

Commit

Permalink
Trivial integer truncation warning fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 30, 2015
1 parent 628d8ed commit e93f90a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/video/SDL_egl.c
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/video/windows/SDL_windowsevents.c
Expand Up @@ -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 );
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/video/windows/SDL_windowskeyboard.c
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit e93f90a

Please sign in to comment.