History

msg: change hack to silence command line pre-parse error messages

mp_msg_levels[] will go away.

wm4 committed 12 years ago

Commit 591a6721 parent 78292053 files · +6 −6Browse files

Showing the changes to options/parse_commandline.c (1 of 3 files). Show all

Unified · Split

options/parse_commandline.c+2−5
@@ -265,8 +265,6 @@ err_out: · 264 unmodified lines
265265 return ret;
266266 }
267267
268−extern int mp_msg_levels[];
269−
270268 /* Parse some command line options early before main parsing.
271269 * --no-config prevents reading configuration files (otherwise done before
272270 * command line parsing), and --really-quiet suppresses messages printed
@@ -275,8 +273,7 @@ extern int mp_msg_levels[]; · 2 unmodified lines
275273 void m_config_preparse_command_line(m_config_t *config, int argc, char **argv)
276274 {
277275 // Hack to shut up parser error messages
278− int msg_lvl_backup = mp_msg_levels[MSGT_CFGPARSER];
279− mp_msg_levels[MSGT_CFGPARSER] = -11;
276+ mp_msg_mute = true;
280277
281278 struct parse_state p = {config, argc, argv};
282279 while (split_opt_silent(&p) == 0) {
@@ -290,5 +287,5 @@ void m_config_preparse_command_line(m_config_t *config, int argc, char **argv) · 7 unmodified lines
290287 }
291288 }
292289
293− mp_msg_levels[MSGT_CFGPARSER] = msg_lvl_backup;
290+ mp_msg_mute = false;
294291 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t