Alter warning fix
Uninitialised GValue does not always work, but is an opaque type so structure of initialiser isn't known. Glib 2.30 on has G_VALUE_INIT to use as initial value. Fix so if not defined give it the previous literal value { 0 }, although this leaves the warning, so it is not initialising the GValue correctly but enough to work.
This commit is contained in:
parent
4d92e0530b
commit
1e54fb6a01
@ -167,10 +167,13 @@ static void open_file_dialog_handle_response(GtkWidget *dialog, gint response)
|
||||
app->project->base_path, NULL);
|
||||
}
|
||||
|
||||
#ifndef G_VALUE_INIT
|
||||
#define G_VALUE_INIT { 0 }
|
||||
#endif
|
||||
|
||||
static void on_file_open_notify(GObject *filechooser, GParamSpec *pspec, gpointer data)
|
||||
{
|
||||
GValue value;
|
||||
GValue value = G_VALUE_INIT;
|
||||
|
||||
g_value_init(&value, pspec->value_type);
|
||||
g_object_get_property(filechooser, pspec->name, &value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user