[vlc-devel] commit: variables: print an error message when a variable is created without a type ( often a typo like the previous commit). ( Rémi Duraffort )

git version control git at videolan.org
Fri Feb 5 12:16:40 CET 2010


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Feb  5 12:15:54 2010 +0100| [69343b742ab5c63e5ab45997ce2927809afecc10] | committer: Rémi Duraffort 

variables: print an error message when a variable is created without a type (often a typo like the previous commit).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=69343b742ab5c63e5ab45997ce2927809afecc10
---

 src/misc/variables.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/misc/variables.c b/src/misc/variables.c
index 406c1aa..ce9f4a9 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -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 )




More information about the vlc-devel mailing list