Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solve the g_free incompatible-pointer-types #399

Closed

Conversation

Easyghost195
Copy link
Contributor

@Easyghost195 Easyghost195 commented Dec 4, 2018

There is a g_free with incompatible pointer type in gmpv_preferences_dialog.c:

gmpv_preferences_dialog.c:184:7: warning: passing argument 5 of ‘g_signal_connect_data’ from incompatible pointer type [-Wincompatible-pointer-types] g_free,
So there is a proposition to solve this make error.

Regards

@@ -173,6 +173,11 @@ static GtkWidget *build_page( const PreferencesDialogItem *items,
gtk_widget_set_size_request(widget, 100, -1);
gtk_file_chooser_set_filename(chooser, filename);

void free_data(gpointer data, GClosure *closure)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use nested functions.

src/gmpv_preferences_dialog.c Outdated Show resolved Hide resolved
@@ -173,6 +173,11 @@ static GtkWidget *build_page( const PreferencesDialogItem *items,
gtk_widget_set_size_request(widget, 100, -1);
gtk_file_chooser_set_filename(chooser, filename);

void free_data(gpointer data, GClosure *closure)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea to rename this to something more specific (e.g. free_signal_data).

@Easyghost195
Copy link
Contributor Author

Sorry for this big mistake about the nested function. I pushed a correction of this with the static function and a better name of this function.
Regards

@gnome-mpv
Copy link
Collaborator

Merged as 21ee21c. Thanks!

In the future, don't forget to pull before committing.

@gnome-mpv gnome-mpv closed this Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants