GNOME Bugzilla – Bug 501365
dead error condition in theme-parser.c
Last modified: 2008-03-18 02:46:49 UTC
The following code around line 377 in theme-parser.c looks wrong: retval = TRUE; n_attrs = 1; attrs[0].name = first_attribute_name; attrs[0].retloc = first_attribute_retloc; *first_attribute_retloc = NULL; va_start (args, first_attribute_retloc); name = va_arg (args, const char*); retloc = va_arg (args, const char**); while (name != NULL) { g_return_val_if_fail (retloc != NULL, FALSE); g_assert (n_attrs < MAX_ATTRS); attrs[n_attrs].name = name; attrs[n_attrs].retloc = retloc; n_attrs += 1; *retloc = NULL; name = va_arg (args, const char*); retloc = va_arg (args, const char**); } va_end (args); if (!retval) return retval; retval can never be FALSE here.
Examination of the places locate_attributes() is called shows that its return value is expected to be true iff there was an error set (a required attribute was not found, an attribute was specified twice, an unknown attribute was specified). In this case there is no error and so these lines should be removed. I'll do it this evening if you like.
Fixed.