Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
1d9170af
Commit
1d9170af
authored
Mar 29, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need to print warning on obsolete command line options
We will print a fatal error afterward anyway.
parent
5960c93c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
19 deletions
+10
-19
src/config/cmdline.c
src/config/cmdline.c
+10
-19
No files found.
src/config/cmdline.c
View file @
1d9170af
...
@@ -195,6 +195,8 @@ int config_LoadCmdLine( vlc_object_t *p_this, int i_argc,
...
@@ -195,6 +195,8 @@ int config_LoadCmdLine( vlc_object_t *p_this, int i_argc,
memset
(
&
p_longopts
[
i_index
],
0
,
sizeof
(
*
p_longopts
)
);
memset
(
&
p_longopts
[
i_index
],
0
,
sizeof
(
*
p_longopts
)
);
psz_shortopts
[
i_shortopts
]
=
'\0'
;
psz_shortopts
[
i_shortopts
]
=
'\0'
;
int
ret
=
-
1
;
/*
/*
* Parse the command line options
* Parse the command line options
*/
*/
...
@@ -228,19 +230,12 @@ int config_LoadCmdLine( vlc_object_t *p_this, int i_argc,
...
@@ -228,19 +230,12 @@ int config_LoadCmdLine( vlc_object_t *p_this, int i_argc,
if
(
p_conf
->
psz_oldname
if
(
p_conf
->
psz_oldname
&&
!
strcmp
(
p_conf
->
psz_oldname
,
psz_name
)
)
&&
!
strcmp
(
p_conf
->
psz_oldname
,
psz_name
)
)
{
{
fprintf
(
stderr
,
"%s: option --%s is deprecated. Use --%s instead.
\n
"
,
b_ignore_errors
?
"Warning"
:
"Error"
,
psz_name
,
p_conf
->
psz_name
);
if
(
!
b_ignore_errors
)
if
(
!
b_ignore_errors
)
{
{
/*free */
fprintf
(
stderr
,
"Error: option --%s is deprecated. "
for
(
i_index
=
0
;
p_longopts
[
i_index
].
name
;
i_index
++
)
"Use --%s instead.
\n
"
,
free
(
(
char
*
)
p_longopts
[
i_index
].
name
);
psz_name
,
p_conf
->
psz_name
);
goto
out
;
free
(
p_longopts
);
free
(
psz_shortopts
);
return
-
1
;
}
}
psz_name
=
p_conf
->
psz_name
;
psz_name
=
p_conf
->
psz_name
;
...
@@ -335,22 +330,18 @@ int config_LoadCmdLine( vlc_object_t *p_this, int i_argc,
...
@@ -335,22 +330,18 @@ int config_LoadCmdLine( vlc_object_t *p_this, int i_argc,
fprintf
(
stderr
,
"`%s'
\n
"
,
ppsz_argv
[
vlc_optind
-
1
]
);
fprintf
(
stderr
,
"`%s'
\n
"
,
ppsz_argv
[
vlc_optind
-
1
]
);
}
}
fputs
(
"Try `vlc --help' for more information.
\n
"
,
stderr
);
fputs
(
"Try `vlc --help' for more information.
\n
"
,
stderr
);
goto
out
;
for
(
i_index
=
0
;
p_longopts
[
i_index
].
name
;
i_index
++
)
free
(
(
char
*
)
p_longopts
[
i_index
].
name
);
free
(
p_longopts
);
free
(
psz_shortopts
);
return
-
1
;
}
}
}
}
ret
=
0
;
out:
/* Free allocated resources */
/* Free allocated resources */
for
(
i_index
=
0
;
p_longopts
[
i_index
].
name
;
i_index
++
)
for
(
i_index
=
0
;
p_longopts
[
i_index
].
name
;
i_index
++
)
free
(
(
char
*
)
p_longopts
[
i_index
].
name
);
free
(
(
char
*
)
p_longopts
[
i_index
].
name
);
free
(
p_longopts
);
free
(
p_longopts
);
free
(
psz_shortopts
);
free
(
psz_shortopts
);
free
(
argv_copy
);
free
(
argv_copy
);
return
ret
;
return
0
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment