[vlc-devel] commit: Fix warnings. Note that seeking is not enabled with timeshift. ( Jean-Philippe Andre )
Rémi Denis-Courmont
rdenis at simphalempin.com
Fri Aug 22 08:47:56 CEST 2008
On Fri, 22 Aug 2008 07:49:58 +0200 (CEST), git at videolan.org (git version
control) wrote:
> @@ -378,7 +378,12 @@ static void NextFileWrite( access_t *p_access )
>
> /* Put written file in read list */
> if( p_sys->i_write_size < p_sys->i_file_size )
> - ftruncate( fileno( p_sys->p_write_list->file ),
> p_sys->i_write_size );
> + if( ftruncate( fileno( p_sys->p_write_list->file ),
> + p_sys->i_write_size ) == -1 )
> + {
> + msg_Dbg( p_access, "unable to truncate file: %m" );
> + /* return; */
> + }
>
> fseek( p_sys->p_write_list->file, 0, SEEK_SET );
> *p_sys->pp_read_last = p_sys->p_write_list;
I really don't like this. Pretending to catch an error to avoid a warning,
yet not actually handling the error in any sensible manner.
--
Rémi Denis-Courmont
More information about the vlc-devel
mailing list