Skip to content

Commit

Permalink
*sigh* fixes multiple compile errors and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
xsdg authored and caclark committed Aug 7, 2022
1 parent 97b941e commit 3dfd621
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/rcfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,10 +1189,8 @@ static void class_filter_load_filter_type(const gchar **attribute_names, const g
// attribute_names will be {"enabled", "filter"} and attribute_values
// will be {"true", "RAW Image"}.

gchar *filter_name = NULL;
gchar *filter_value = NULL;
gchar *enabled_name = NULL;
gchar *enabled_value = NULL;
const gchar *enabled_name = NULL;
const gchar *enabled_value = NULL;
int format_class_index = -1;

// In this loop, we iterate through matching attribute/value pairs in
Expand Down Expand Up @@ -1227,17 +1225,17 @@ static void class_filter_load_filter_type(const gchar **attribute_names, const g
log_printf("unknown attribute %s = %s\n", option, value);
}

if (enabled_name == NULL || enabled_value == NULL || load_class_index < 0)
if (enabled_name == NULL || enabled_value == NULL || format_class_index < 0)
{
log_printf("Failed to parse <filter_type> config element\n");
return;
}

if (!read_bool_option(enabled_name, "enabled", enabled_value,
&(options->class_filter[load_class_index])
&(options->class_filter[format_class_index])))
{
log_printf("Failed to load <filter_type> config element with "
"class index %d\n", load_class_index);
"class index %d\n", format_class_index);
}
}

Expand Down

0 comments on commit 3dfd621

Please sign in to comment.