[vlc-devel] Warning Fix: misc/vlm.c: In function 'vlm_MediaControl': WARNING Fix: misc/vlm.c: 1264: unused variable 'val'

Ibraheem P ibraheemp at gmail.com
Sun Mar 30 15:02:07 CEST 2008


misc/vlm.c: In function 'vlm_MediaControl':
WARNING : misc/vlm.c: 1264:  unused variable 'val'
----------------------------------------------------------------------------

if( !strcmp( psz_command, "seek" ) )
    {
        //vlc_value_t val;

        if( psz_args )
        {
            vlc_bool_t i_rel;
            float f_value = i18n_atof( psz_args );
            if( psz_args[0] == '+' || psz_args[0] == '-' )
               i_rel = VLC_TRUE;
            else
               i_rel = VLC_FALSE;
            if( strstr( psz_args, "ms" ) )
            {
               /* milliseconds */
               int64_t i_msec =  1000 * (int64_t)atoi( psz_args );
               if( i_rel )
               {
                  var_SetTime( p_instance->p_input, "time-offset", i_msec );
               }
               else if( i_msec >= 0
               && i_msec < var_GetTime( p_instance->p_input, "length" ) )
               {
                  var_SetTime( p_instance->p_input, "time", i_msec );
               }
            }
            else if( strchr( psz_args, 's' ) )
            {
               /* seconds */
               int64_t i_sec = 1000000 * (int64_t)atoi( psz_args );
               if( i_rel )
               {
                  var_SetTime( p_instance->p_input, "time-offset", i_sec );
               }
               else if( i_sec >= 0
                     && i_sec < var_GetTime( p_instance->p_input, "length" )
)
               {
                  var_SetTime( p_instance->p_input, "time", i_sec );
               }
            }
            else
            {
               /* percentage */
               f_value /= 100.;
               if( i_rel )
               {
                  float f_orig = var_GetFloat( p_instance->p_input,
"position" );
                  f_value += f_orig;
               }
               if( f_value >= 0.0 && f_value <= 1.0 )
               {
                  var_SetFloat( p_instance->p_input, "position", f_value );
                  return VLC_SUCCESS;
               }
            }
        }
    }


Dear Sir,

This is a simple warning fix, I found many warnings on Fedora 6 platform and
will show the patches very soon. will you accept such warning fixes as the
proof of compilation?

I have submitted the application for the project 'bluetooth remote
controller' to the GSoC. I am late to submit the patches and application due
to my university examination that was upto 28th March.

Please reply...

-- 
Regards
Ibraheem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080330/240296e0/attachment.html>


More information about the vlc-devel mailing list