Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4108)

Unified Diff: base/third_party/xdg_mime/function_casts.patch

Issue 2755723004: base: Fix bad function pointer casts in xdg-mime. (Closed)
Patch Set: Address review comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/third_party/xdg_mime/README.chromium ('k') | base/third_party/xdg_mime/xdgmime.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/third_party/xdg_mime/function_casts.patch
diff --git a/base/third_party/xdg_mime/function_casts.patch b/base/third_party/xdg_mime/function_casts.patch
new file mode 100644
index 0000000000000000000000000000000000000000..37d38a7b3db43b004bd936a3e4bf95e2a1d65652
--- /dev/null
+++ b/base/third_party/xdg_mime/function_casts.patch
@@ -0,0 +1,44 @@
+diff --git a/base/third_party/xdg_mime/xdgmime.c b/base/third_party/xdg_mime/xdgmime.c
+index 6dc58c253fa2..f340fcefabb4 100644
+--- a/base/third_party/xdg_mime/xdgmime.c
++++ b/base/third_party/xdg_mime/xdgmime.c
+@@ -136,7 +136,7 @@ xdg_dir_time_list_free (XdgDirTimeList *list)
+ }
+
+ static int
+-xdg_mime_init_from_directory (const char *directory)
++xdg_mime_init_from_directory (const char *directory, void *user_data)
+ {
+ char *file_name;
+ struct stat st;
+@@ -340,8 +340,9 @@ xdg_check_file (const char *file_path,
+
+ static int
+ xdg_check_dir (const char *directory,
+- int *invalid_dir_list)
++ void *user_data)
+ {
++ int *invalid_dir_list = user_data;
+ int invalid, exists;
+ char *file_name;
+
+@@ -398,8 +399,7 @@ xdg_check_dirs (void)
+ for (list = dir_time_list; list; list = list->next)
+ list->checked = XDG_CHECKED_UNCHECKED;
+
+- xdg_run_command_on_dirs ((XdgDirectoryFunc) xdg_check_dir,
+- &invalid_dir_list);
++ xdg_run_command_on_dirs (xdg_check_dir, &invalid_dir_list);
+
+ if (invalid_dir_list)
+ return TRUE;
+@@ -455,8 +455,7 @@ xdg_mime_init (void)
+ icon_list = _xdg_mime_icon_list_new ();
+ generic_icon_list = _xdg_mime_icon_list_new ();
+
+- xdg_run_command_on_dirs ((XdgDirectoryFunc) xdg_mime_init_from_directory,
+- NULL);
++ xdg_run_command_on_dirs (xdg_mime_init_from_directory, NULL);
+
+ need_reread = FALSE;
+ }
« no previous file with comments | « base/third_party/xdg_mime/README.chromium ('k') | base/third_party/xdg_mime/xdgmime.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698