]> git.sesse.net Git - vlc/commitdiff
Initialize variables
authorClément Stenac <zorglub@videolan.org>
Sat, 29 Apr 2006 14:23:41 +0000 (14:23 +0000)
committerClément Stenac <zorglub@videolan.org>
Sat, 29 Apr 2006 14:23:41 +0000 (14:23 +0000)
include/variables.h
include/vlc_messages.h

index a906b0ed9c95ad9b201ec556d0535f82d2d34801..50861490d36fd832474854e05d543143a82d46fa 100644 (file)
@@ -336,7 +336,7 @@ static inline int __var_SetVoid( vlc_object_t *p_obj, const char *psz_name )
  */
 static inline int __var_GetInteger( vlc_object_t *p_obj, const char *psz_name )
 {
-    vlc_value_t val;
+    vlc_value_t val;val.i_int = 0;
     if( !__var_Get( p_obj, psz_name, &val ) )
         return val.i_int;
     else
@@ -351,7 +351,7 @@ static inline int __var_GetInteger( vlc_object_t *p_obj, const char *psz_name )
  */
 static inline int __var_GetBool( vlc_object_t *p_obj, const char *psz_name )
 {
-    vlc_value_t val;
+    vlc_value_t val; val.b_bool = VLC_FALSE;
     if( !__var_Get( p_obj, psz_name, &val ) )
         return val.b_bool;
     else
@@ -366,7 +366,7 @@ static inline int __var_GetBool( vlc_object_t *p_obj, const char *psz_name )
  */
 static inline int64_t __var_GetTime( vlc_object_t *p_obj, const char *psz_name )
 {
-    vlc_value_t val;
+    vlc_value_t val; val.i_time = 0L;
     if( !__var_Get( p_obj, psz_name, &val ) )
         return val.i_time;
     else
@@ -381,7 +381,7 @@ static inline int64_t __var_GetTime( vlc_object_t *p_obj, const char *psz_name )
  */
 static inline float __var_GetFloat( vlc_object_t *p_obj, const char *psz_name )
 {
-    vlc_value_t val;
+    vlc_value_t val; val.f_float = 0.0;
     if( !__var_Get( p_obj, psz_name, &val ) )
         return val.f_float;
     else
@@ -396,7 +396,7 @@ static inline float __var_GetFloat( vlc_object_t *p_obj, const char *psz_name )
  */
 static inline char *__var_GetString( vlc_object_t *p_obj, const char *psz_name )
 {
-    vlc_value_t val;
+    vlc_value_t val; val.psz_string = NULL;
     if( !__var_Get( p_obj, psz_name, &val ) )
         return val.psz_string;
     else
index b603381ab19ca46a698abf4794efe9383ff8b085..ae6065d330530edbd08b75eb90220c307717b7e8 100644 (file)
@@ -290,7 +290,7 @@ VLC_EXPORT( counter_t*, __stats_CounterGet, (vlc_object_t*, int, unsigned int )
 static inline int __stats_GetInteger( vlc_object_t *p_obj, int i_id,
                                       unsigned int i_counter, int *value )
 {
-    vlc_value_t val;
+    vlc_value_t val; val.i_int = 0;
     int i_ret = __stats_Get( p_obj, i_id, i_counter, &val );
     *value = val.i_int;
     return i_ret;
@@ -300,7 +300,7 @@ static inline int __stats_GetInteger( vlc_object_t *p_obj, int i_id,
 static inline int __stats_GetFloat( vlc_object_t *p_obj, int i_id,
                                     unsigned int i_counter, float *value )
 {
-    vlc_value_t val;
+    vlc_value_t val;val.f_float = 0.0;
     int i_ret = __stats_Get( p_obj, i_id, i_counter, &val );
     *value = val.f_float;
     return i_ret;
@@ -312,7 +312,7 @@ static inline int __stats_UpdateInteger( vlc_object_t *p_obj,
 {
     int i_ret;
     vlc_value_t val;
-    vlc_value_t new_val;
+    vlc_value_t new_val; new_val.i_int = 0;
     val.i_int = i;
     i_ret = __stats_Update( p_obj, i_counter, val , &new_val );
     if( pi_new )
@@ -326,7 +326,7 @@ static inline int __stats_UpdateFloat( vlc_object_t *p_obj,
 {
     vlc_value_t val;
     int i_ret;
-    vlc_value_t new_val;
+    vlc_value_t new_val;new_val.f_float = 0.0;
     val.f_float = f;
     i_ret =  __stats_Update( p_obj, i_counter, val, &new_val );
     if( pf_new )