From 1bd09bfd40e2f068c423123fd8a5b327e661fc3c Mon Sep 17 00:00:00 2001 From: Ben Hoskings Date: Wed, 2 Dec 2009 03:08:20 +1100 Subject: [PATCH] Fix casting warnings in screen.c / s_update() by casting al_get() twice to convert type and then size, instead of both at once. --- screen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/screen.c b/screen.c index 8ffaeacd1..7029572c4 100644 --- a/screen.c +++ b/screen.c @@ -700,8 +700,8 @@ static void s_update( screen_t *scr, wchar_t *prompt ) for( j=start_pos; jtext ); j++ ) { - wchar_t o = (wchar_t)al_get( &o_line->text, j ); - int o_c = (int)al_get( &o_line->color, j ); + wchar_t o = (wchar_t)(long)al_get( &o_line->text, j ); + int o_c = (int)(long)al_get( &o_line->color, j ); if( !o ) @@ -717,8 +717,8 @@ static void s_update( screen_t *scr, wchar_t *prompt ) } else { - wchar_t s = (wchar_t)al_get( &s_line->text, j ); - int s_c = (int)al_get( &s_line->color, j ); + wchar_t s = (wchar_t)(long)al_get( &s_line->text, j ); + int s_c = (int)(long)al_get( &s_line->color, j ); if( o != s || o_c != s_c ) { s_move( scr, &output, current_width, i );