diff options
-rw-r--r-- | Gui/bitmap.c | 6 | ||||
-rw-r--r-- | Gui/interface.c | 4 | ||||
-rw-r--r-- | Gui/mplayer/gtk/sb.c | 8 | ||||
-rw-r--r-- | Gui/mplayer/pb.c | 2 | ||||
-rw-r--r-- | Gui/mplayer/play.c | 6 | ||||
-rw-r--r-- | Gui/win32/interface.c | 4 |
6 files changed, 15 insertions, 15 deletions
diff --git a/Gui/bitmap.c b/Gui/bitmap.c index 4714cae563..4367d99415 100644 --- a/Gui/bitmap.c +++ b/Gui/bitmap.c @@ -38,7 +38,7 @@ int pngRead( unsigned char * fname,txSample * bf ) png_read_info( png,info ); png_get_IHDR( png,info,&bf->Width,&bf->Height,&bf->BPP,&color,NULL,NULL,NULL ); - row_p=(png_bytep *)malloc( sizeof( png_bytep ) * bf->Height ); + row_p=malloc( sizeof( png_bytep ) * bf->Height ); if ( !row_p ) { mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[png] not enough memory for row buffer\n" ); @@ -198,7 +198,7 @@ void Convert32to1( txSample * in,txSample * out,int adaptivlimit ) out->BPP=1; out->ImageSize=(out->Width * out->Height + 7) / 8; mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c32to1] imagesize: %d\n",out->ImageSize ); - out->Image=(char *)calloc( 1,out->ImageSize ); + out->Image=calloc( 1,out->ImageSize ); if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_NotEnoughMemoryC32To1 ); { int i,b,c=0; unsigned int * buf = NULL; unsigned char tmp = 0; int nothaveshape = 1; @@ -221,7 +221,7 @@ void Convert1to32( txSample * in,txSample * out ) out->Height=in->Height; out->BPP=32; out->ImageSize=out->Width * out->Height * 4; - out->Image=(char *)calloc( 1,out->ImageSize ); + out->Image=calloc( 1,out->ImageSize ); mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c1to32] imagesize: %d\n",out->ImageSize ); if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_NotEnoughMemoryC1To32 ); { diff --git a/Gui/interface.c b/Gui/interface.c index bdb2fc6187..eb1a4849ee 100644 --- a/Gui/interface.c +++ b/Gui/interface.c @@ -241,7 +241,7 @@ void guiInit( void ) case -2: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinCfgReadError,skinName ); exit( 0 ); } // --- initialize windows - if ( ( mplDrawBuffer = (unsigned char *)malloc( appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) + if ( ( mplDrawBuffer = malloc( appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) { fprintf( stderr,MSGTR_NEMDB ); exit( 0 ); @@ -1151,7 +1151,7 @@ void * gtkSet( int cmd,float fparam, void * vparam ) case gtkSetPanscan: { mp_cmd_t * mp_cmd; - mp_cmd=(mp_cmd_t *)calloc( 1,sizeof( *mp_cmd ) ); + mp_cmd=calloc( 1,sizeof( *mp_cmd ) ); mp_cmd->id=MP_CMD_PANSCAN; mp_cmd->name=strdup( "panscan" ); mp_cmd->args[0].v.f=fparam; mp_cmd->args[1].v.i=1; mp_input_queue_cmd( mp_cmd ); diff --git a/Gui/mplayer/gtk/sb.c b/Gui/mplayer/gtk/sb.c index eb00f55d67..44f0cb5a60 100644 --- a/Gui/mplayer/gtk/sb.c +++ b/Gui/mplayer/gtk/sb.c @@ -179,13 +179,13 @@ GtkWidget * create_SkinBrowser( void ) gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void *)1 ); gtk_signal_connect( GTK_OBJECT( Cancel ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void *)0 ); - if ( ( sbMPlayerDirInHome_obsolete=(char *)calloc( 1,strlen( skinDirInHome_obsolete ) + 4 ) ) != NULL ) + if ( ( sbMPlayerDirInHome_obsolete=calloc( 1,strlen( skinDirInHome_obsolete ) + 4 ) ) != NULL ) { strcpy( sbMPlayerDirInHome_obsolete,skinDirInHome_obsolete ); strcat( sbMPlayerDirInHome_obsolete,"/*" ); } - if ( ( sbMPlayerDirInHome=(char *)calloc( 1,strlen( skinDirInHome ) + 4 ) ) != NULL ) + if ( ( sbMPlayerDirInHome=calloc( 1,strlen( skinDirInHome ) + 4 ) ) != NULL ) { strcpy( sbMPlayerDirInHome,skinDirInHome ); strcat( sbMPlayerDirInHome,"/*" ); } - if ( ( sbMPlayerPrefixDir_obsolete=(char *)calloc( 1,strlen( skinMPlayerDir ) + 4 ) ) != NULL ) + if ( ( sbMPlayerPrefixDir_obsolete=calloc( 1,strlen( skinMPlayerDir ) + 4 ) ) != NULL ) { strcpy( sbMPlayerPrefixDir_obsolete,skinMPlayerDir ); strcat( sbMPlayerPrefixDir_obsolete,"/*" ); } - if ( ( sbMPlayerPrefixDir=(char *)calloc( 1,strlen( skinMPlayerDir ) + 4 ) ) != NULL ) + if ( ( sbMPlayerPrefixDir=calloc( 1,strlen( skinMPlayerDir ) + 4 ) ) != NULL ) { strcpy( sbMPlayerPrefixDir,skinMPlayerDir ); strcat( sbMPlayerPrefixDir,"/*" ); } gtk_window_add_accel_group( GTK_WINDOW( SkinBrowser ),accel_group ); diff --git a/Gui/mplayer/pb.c b/Gui/mplayer/pb.c index 69a3734509..f8cad1c10b 100644 --- a/Gui/mplayer/pb.c +++ b/Gui/mplayer/pb.c @@ -226,7 +226,7 @@ void mplPBInit( void ) gfree( (void**)&mplPBDrawBuffer ); - if ( ( mplPBDrawBuffer = (unsigned char *)malloc( appMPlayer.bar.Bitmap.ImageSize ) ) == NULL ) + if ( ( mplPBDrawBuffer = malloc( appMPlayer.bar.Bitmap.ImageSize ) ) == NULL ) { mp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_NEMDB ); exit( 0 ); diff --git a/Gui/mplayer/play.c b/Gui/mplayer/play.c index f5ae44654a..1b35b04478 100644 --- a/Gui/mplayer/play.c +++ b/Gui/mplayer/play.c @@ -127,7 +127,7 @@ void mplPause( void ) if ( !guiIntfStruct.Playing ) return; if ( guiIntfStruct.Playing == 1 ) { - mp_cmd_t * cmd = (mp_cmd_t *)calloc( 1,sizeof( *cmd ) ); + mp_cmd_t * cmd = calloc( 1,sizeof( *cmd ) ); cmd->id=MP_CMD_PAUSE; cmd->name=strdup("pause"); mp_input_queue_cmd(cmd); @@ -194,7 +194,7 @@ void ChangeSkin( char * name ) if ( prev && appMPlayer.menuIsPresent ) { if ( mplMenuDrawBuffer ) free( mplMenuDrawBuffer ); - if ( ( mplMenuDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL ) + if ( ( mplMenuDrawBuffer = calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL ) { mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; } wsResizeWindow( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height ); wsResizeImage( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height ); @@ -224,7 +224,7 @@ void ChangeSkin( char * name ) // --- reload main window if ( mplDrawBuffer ) free( mplDrawBuffer ); - if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) + if ( ( mplDrawBuffer = calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) { mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; } wsDestroyWindow( &appMPlayer.mainWindow ); diff --git a/Gui/win32/interface.c b/Gui/win32/interface.c index 6d425340b5..f7d148f954 100644 --- a/Gui/win32/interface.c +++ b/Gui/win32/interface.c @@ -266,7 +266,7 @@ static void guiSetEvent(int event) } case evMute: { - mp_cmd_t * cmd = (mp_cmd_t *)calloc(1, sizeof(*cmd)); + mp_cmd_t * cmd = calloc(1, sizeof(*cmd)); cmd->id=MP_CMD_MUTE; cmd->name=strdup("mute"); mp_input_queue_cmd(cmd); @@ -311,7 +311,7 @@ void mplPause( void ) if(guiIntfStruct.Playing == 1) { - mp_cmd_t * cmd = (mp_cmd_t *)calloc(1, sizeof(*cmd)); + mp_cmd_t * cmd = calloc(1, sizeof(*cmd)); cmd->id=MP_CMD_PAUSE; cmd->name=strdup("pause"); mp_input_queue_cmd(cmd); |