]> git.sesse.net Git - vlc/blobdiff - src/misc/variables.c
variables: print an error message when a variable is created without a type (often...
[vlc] / src / misc / variables.c
index 406c1aade9e84c4b73fcad62c44b9ef16549b393..ce9f4a9f6caad90300d6c0e4cf3c33d113ff7757 100644 (file)
@@ -276,7 +276,11 @@ int __var_Create( vlc_object_t *p_this, const char *psz_name, int i_type )
             break;
         default:
             p_var->ops = &void_ops;
-            break;
+#ifndef NDEBUG
+            if( i_type & VLC_VAR_CLASS  != VLC_VAR_VOID )
+                msg_Err( p_this, "Creating the variable '%s' without a type",
+                          psz_name );
+#endif
     }
 
     if( i_type & VLC_VAR_DOINHERIT )