[vlc-commits] variables: remove dead code

Rémi Denis-Courmont git at videolan.org
Sat Apr 13 17:52:51 CEST 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 13 18:07:38 2019 +0300| [bb02e661e9aefa9dd3505b85334b3f83d4ae6540] | committer: Rémi Denis-Courmont

variables: remove dead code

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

 src/misc/variables.c | 78 ----------------------------------------------------
 src/misc/variables.h |  2 --
 2 files changed, 80 deletions(-)

diff --git a/src/misc/variables.c b/src/misc/variables.c
index 2203b702b2..a39fd4143f 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -1134,84 +1134,6 @@ error:
     return VLC_EGENERIC;
 }
 
-static void DumpVariable(const void *data, const VISIT which, const int depth)
-{
-    if (which != postorder && which != leaf)
-        return;
-    (void) depth;
-
-    const variable_t *var = *(const variable_t **)data;
-    const char *typename = "unknown";
-
-    switch (var->i_type & VLC_VAR_TYPE)
-    {
-        case VLC_VAR_VOID:     typename = "void";        break;
-        case VLC_VAR_BOOL:     typename = "bool";        break;
-        case VLC_VAR_INTEGER:  typename = "integer";     break;
-        case VLC_VAR_STRING:   typename = "string";      break;
-        case VLC_VAR_FLOAT:    typename = "float";       break;
-        case VLC_VAR_COORDS:   typename = "coordinates"; break;
-        case VLC_VAR_ADDRESS:  typename = "address";     break;
-        default:               typename = "unknown";     break;
-    }
-
-    printf(" *-o \"%s\" (%s", var->psz_name, typename);
-    if (var->psz_text != NULL)
-        printf(", %s", var->psz_text);
-    putchar(')');
-    if (var->i_type & VLC_VAR_HASCHOICE)
-        fputs(", has choices", stdout);
-    if (var->i_type & VLC_VAR_ISCOMMAND)
-        fputs(", command", stdout);
-    if (var->value_callbacks != NULL)
-    {
-        size_t count = 0;
-
-        for (callback_entry_t *entry = var->value_callbacks;
-             entry != NULL;
-             entry = entry->next)
-            count++;
-
-        printf(", %zu callbacks", count);
-    }
-
-    switch (var->i_type & VLC_VAR_CLASS)
-    {
-        case VLC_VAR_VOID:
-            break;
-        case VLC_VAR_BOOL:
-            printf(": %s", var->val.b_bool ? "true" : "false");
-            break;
-        case VLC_VAR_INTEGER:
-            printf(": %"PRId64, var->val.i_int );
-            break;
-        case VLC_VAR_STRING:
-            printf(": \"%s\"", var->val.psz_string );
-            break;
-        case VLC_VAR_FLOAT:
-            printf(": %f", var->val.f_float );
-            break;
-        case VLC_VAR_COORDS:
-            printf(": %"PRId32"x%"PRId32,
-                   var->val.coords.x, var->val.coords.y);
-            break;
-        case VLC_VAR_ADDRESS:
-            printf(": %p", var->val.p_address);
-            break;
-    }
-    putchar('\n');
-}
-
-void DumpVariables(vlc_object_t *obj)
-{
-    vlc_mutex_lock(&vlc_internals(obj)->var_lock);
-    if (vlc_internals(obj)->var_root == NULL)
-        puts(" `-o No variables");
-    else
-        twalk(vlc_internals(obj)->var_root, DumpVariable);
-    vlc_mutex_unlock(&vlc_internals(obj)->var_lock);
-}
-
 static thread_local void *twalk_ctx;
 
 static void TwalkGetNames(const void *data, const VISIT which, const int depth)
diff --git a/src/misc/variables.h b/src/misc/variables.h
index 0c8b1b2de7..4d214e455a 100644
--- a/src/misc/variables.h
+++ b/src/misc/variables.h
@@ -51,8 +51,6 @@ struct vlc_object_internals
 # define vlc_internals( obj ) (((vlc_object_internals_t*)(VLC_OBJECT(obj)))-1)
 # define vlc_externals( priv ) ((vlc_object_t *)((priv) + 1))
 
-void DumpVariables(vlc_object_t *obj);
-
 extern void var_DestroyAll( vlc_object_t * );
 
 /**



More information about the vlc-commits mailing list