# HG changeset patch # User gpoirier # Date 1172654322 0 # Node ID 37248dbbf6ffc7a3bde74c961573ac6201c1fe49 # Parent 20be7be45f47b803771fb265b6b73d12f1fa1dda remove C99-ism (mixed declaration and code), 10l to Uoti Urpala for breaking GCC-2.95 support yet again even though any post-2.95 GCC version print a clear warning about it Patch by Carl Eugen Hoyos % cehoyos A ag P or P at % diff -r 20be7be45f47 -r 37248dbbf6ff m_option.c --- a/m_option.c Tue Feb 27 22:25:00 2007 +0000 +++ b/m_option.c Wed Feb 28 09:18:42 2007 +0000 @@ -1204,10 +1204,12 @@ static int parse_time(m_option_t* opt,char *name, char *param, void* dst, int src) { + double time; + if (param == NULL || strlen(param) == 0) return M_OPT_MISSING_PARAM; - double time = parse_timestring(param); + time = parse_timestring(param); if (time == -1e100) { mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s: invalid time: '%s'\n", name,param);