*sigh* fixes multiple compile errors and warnings
authorOmari Stephens <xsdg@xsdg.org>
Mon, 1 Aug 2022 09:01:29 +0000 (09:01 +0000)
committerColin Clark <colin.clark@cclark.uk>
Sun, 7 Aug 2022 08:41:53 +0000 (09:41 +0100)
src/rcfile.c

index 3d64013..1b7a225 100644 (file)
@@ -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
@@ -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);
                }
 }