Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
454
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
bb02e661
Commit
bb02e661
authored
5 years ago
by
Rémi Denis-Courmont
Browse files
Options
Downloads
Patches
Plain Diff
variables: remove dead code
parent
c7e98fa7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/misc/variables.c
+0
-78
0 additions, 78 deletions
src/misc/variables.c
src/misc/variables.h
+0
-2
0 additions, 2 deletions
src/misc/variables.h
with
0 additions
and
80 deletions
src/misc/variables.c
+
0
−
78
View file @
bb02e661
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
src/misc/variables.h
+
0
−
2
View file @
bb02e661
...
...
@@ -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
*
);
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment