Trivial integer truncation warning fixes.
authorSam Lantinga <slouken@libsdl.org>
Thu, 30 Jul 2015 10:01:04 -0700
changeset 9821c1d91866a968
parent 9820 c0bcc39a3491
child 9822 371d82c6bf94
Trivial integer truncation warning fixes.
src/video/SDL_egl.c
src/video/windows/SDL_windowsevents.c
src/video/windows/SDL_windowskeyboard.c
     1.1 --- a/src/video/SDL_egl.c	Wed Jul 29 17:19:15 2015 -0700
     1.2 +++ b/src/video/SDL_egl.c	Thu Jul 30 10:01:04 2015 -0700
     1.3 @@ -81,7 +81,7 @@
     1.4  {
     1.5      int i;
     1.6      int len = 0;
     1.7 -    int ext_len;
     1.8 +    size_t ext_len;
     1.9      const char *exts;
    1.10      const char *ext_word;
    1.11  
     2.1 --- a/src/video/windows/SDL_windowsevents.c	Wed Jul 29 17:19:15 2015 -0700
     2.2 +++ b/src/video/windows/SDL_windowsevents.c	Thu Jul 30 10:01:04 2015 -0700
     2.3 @@ -598,7 +598,7 @@
     2.4  	case WM_CHAR:
     2.5  		{
     2.6  			char text[5];
     2.7 -			if ( WIN_ConvertUTF32toUTF8( wParam, text ) ) {
     2.8 +			if ( WIN_ConvertUTF32toUTF8( (UINT32)wParam, text ) ) {
     2.9  				SDL_SendKeyboardText( text );
    2.10  			}
    2.11  		}
     3.1 --- a/src/video/windows/SDL_windowskeyboard.c	Wed Jul 29 17:19:15 2015 -0700
     3.2 +++ b/src/video/windows/SDL_windowskeyboard.c	Thu Jul 30 10:01:04 2015 -0700
     3.3 @@ -738,7 +738,7 @@
     3.4          SDL_wcslcpy(buffer, videodata->ime_composition, size);
     3.5      }
     3.6      s = WIN_StringToUTF8(buffer);
     3.7 -    SDL_SendEditingText(s, videodata->ime_cursor + SDL_wcslen(videodata->ime_readingstring), 0);
     3.8 +    SDL_SendEditingText(s, videodata->ime_cursor + (int)SDL_wcslen(videodata->ime_readingstring), 0);
     3.9      SDL_free(s);
    3.10  }
    3.11  
    3.12 @@ -1403,7 +1403,7 @@
    3.13          if (!*s)
    3.14              break;
    3.15  
    3.16 -        GetTextExtentPoint32W(hdc, s, SDL_wcslen(s), &candsizes[i]);
    3.17 +        GetTextExtentPoint32W(hdc, s, (int)SDL_wcslen(s), &candsizes[i]);
    3.18          maxcandsize.cx = SDL_max(maxcandsize.cx, candsizes[i].cx);
    3.19          maxcandsize.cy = SDL_max(maxcandsize.cy, candsizes[i].cy);
    3.20  
    3.21 @@ -1495,7 +1495,7 @@
    3.22          }
    3.23  
    3.24          DrawRect(hdc, left, top, right, bottom, candborder);
    3.25 -        ExtTextOutW(hdc, left + candborder + candpadding, top + candborder + candpadding, 0, NULL, s, SDL_wcslen(s), NULL);
    3.26 +        ExtTextOutW(hdc, left + candborder + candpadding, top + candborder + candpadding, 0, NULL, s, (int)SDL_wcslen(s), NULL);
    3.27      }
    3.28      StopDrawToBitmap(hdc, &hbm);
    3.29