void-packages/srcpkgs/gnucash/patches/gchar_ptr_cast.patch

180 lines
7.4 KiB
Diff

--- libgnucash/core-utils/gnc-filepath-utils.cpp 2019-06-09 02:08:58.000000000 +0200
+++ libgnucash/core-utils/gnc-filepath-utils.cpp 2019-08-01 20:05:39.643967252 +0200
@@ -1177,7 +1177,7 @@
if (g_path_is_absolute (name))
fullname = g_strdup (name);
else if (default_path)
- fullname = g_build_filename (default_path, name, NULL);
+ fullname = g_build_filename (default_path, name, (gchar *)NULL);
else
fullname = gnc_resolve_file_path (name);
@@ -1204,7 +1204,7 @@
gchar *fullname;
gchar* pkgdatadir = gnc_path_get_pkgdatadir ();
- default_path = g_build_filename (pkgdatadir, "pixmaps", NULL);
+ default_path = g_build_filename (pkgdatadir, "pixmaps", (gchar *)NULL);
g_free(pkgdatadir);
fullname = gnc_filepath_locate_file (default_path, name);
g_free(default_path);
@@ -1219,7 +1219,7 @@
gchar *fullname;
gchar* pkgdatadir = gnc_path_get_pkgdatadir ();
- default_path = g_build_filename (pkgdatadir, "ui", NULL);
+ default_path = g_build_filename (pkgdatadir, "ui", (gchar *)NULL);
g_free(pkgdatadir);
fullname = gnc_filepath_locate_file (default_path, name);
g_free(default_path);
--- libgnucash/engine/qoflog.cpp 2019-04-29 06:35:49.000000000 +0200
+++ libgnucash/engine/qoflog.cpp 2019-08-01 20:38:28.311888756 +0200
@@ -163,7 +163,7 @@
if (fout != NULL && fout != stderr && fout != stdout)
fclose(fout);
- fname = g_strconcat(log_filename, ".XXXXXX.log", NULL);
+ fname = g_strconcat(log_filename, ".XXXXXX.log", (gchar *)NULL);
if ((fd = g_mkstemp(fname)) != -1)
{
@@ -346,7 +346,7 @@
str = g_strdup_printf ("%d", logger_max_name_length);
if (qof_logger_format)
g_free (qof_logger_format);
- qof_logger_format = g_strconcat ("* %s %*s <%-", str, ".", str, "s> %*s%s%s", NULL);
+ qof_logger_format = g_strconcat ("* %s %*s <%-", str, ".", str, "s> %*s%s%s", (gchar *)NULL);
g_free (str);
g_strfreev(levels);
--- libgnucash/engine/qof-backend.cpp 2019-01-12 00:57:38.000000000 +0100
+++ libgnucash/engine/qof-backend.cpp 2019-08-01 20:39:52.100885415 +0200
@@ -102,7 +102,7 @@
{
auto modname = g_strdup_printf ("lib%s.dylib", module_name);
g_free (fullpath);
- fullpath = g_build_filename (absdir, modname, NULL);
+ fullpath = g_build_filename (absdir, modname, (gchar *)NULL);
g_free (modname);
}
auto backend = g_module_open (fullpath, G_MODULE_BIND_LAZY);
--- libgnucash/engine/qofbook.cpp 2019-06-09 02:09:13.000000000 +0200
+++ libgnucash/engine/qofbook.cpp 2019-08-01 20:41:08.479882370 +0200
@@ -941,7 +941,7 @@
/* Copy the string we have so far and add normalized format specifier for long int */
aux_str = g_strndup (base, p - base);
- normalized_str = g_strconcat (aux_str, PRIi64, NULL);
+ normalized_str = g_strconcat (aux_str, PRIi64, (gchar *)NULL);
g_free (aux_str);
/* Skip length modifier / conversion specifier */
@@ -973,7 +973,7 @@
/* Add the suffix to our normalized string */
aux_str = normalized_str;
- normalized_str = g_strconcat (aux_str, tmp, NULL);
+ normalized_str = g_strconcat (aux_str, tmp, (gchar *)NULL);
g_free (aux_str);
/* If we end up here, the string was valid, so return no error
--- libgnucash/engine/Account.cpp 2019-03-31 19:42:39.000000000 +0200
+++ libgnucash/engine/Account.cpp 2019-08-01 20:42:09.139879951 +0200
@@ -188,7 +188,7 @@
{
gchar *tmp_list = NULL;
- tmp_list = g_strconcat (account_list, "\n", node->data, NULL );
+ tmp_list = g_strconcat (account_list, "\n", node->data, (gchar *)NULL );
g_free ( account_list );
account_list = tmp_list;
}
@@ -4533,7 +4533,7 @@
}
accname = g_strconcat (_("Orphaned Gains"), "-",
- gnc_commodity_get_mnemonic (currency), NULL);
+ gnc_commodity_get_mnemonic (currency), (gchar *)NULL);
/* See if we've got one of these going already ... */
acc = gnc_account_lookup_by_name(root, accname);
--- libgnucash/backend/xml/sixtp-utils.cpp 2019-01-12 00:57:38.000000000 +0100
+++ libgnucash/backend/xml/sixtp-utils.cpp 2019-08-01 20:46:04.459870568 +0200
@@ -129,7 +129,7 @@
else
{
char* temp;
- temp = g_strconcat (name, (gchar*) cr->data, NULL);
+ temp = g_strconcat (name, (gchar*) cr->data, (gchar *)NULL);
g_free (name);
name = temp;
}
--- gnucash/gnome/assistant-loan.cpp 2019-06-09 02:08:56.000000000 +0200
+++ gnucash/gnome/assistant-loan.cpp 2019-08-01 20:49:12.189863083 +0200
@@ -614,7 +614,7 @@
gtk_widget_set_halign (GTK_WIDGET(ldd->prmOrigPrincGAE), GTK_ALIGN_FILL);
gtk_widget_set_hexpand (GTK_WIDGET(ldd->prmOrigPrincGAE), FALSE);
- g_object_set (GTK_WIDGET(ldd->prmOrigPrincGAE), "margin", 2, NULL);
+ g_object_set (GTK_WIDGET(ldd->prmOrigPrincGAE), "margin", 2, (gchar *)NULL);
for ( i = 0; gas_data[i].loc != NULL; i++ )
{
@@ -637,7 +637,7 @@
gtk_widget_set_halign (GTK_WIDGET(gas), GTK_ALIGN_FILL);
gnc_account_sel_set_hexpand (GNC_ACCOUNT_SEL(gas), true);
- g_object_set (GTK_WIDGET(gas), "margin", 2, NULL);
+ g_object_set (GTK_WIDGET(gas), "margin", 2, (gchar *)NULL);
*(gas_data[i].loc) = gas;
}
}
@@ -679,7 +679,7 @@
gtk_widget_set_halign (GTK_WIDGET( *gde_data[i].loc ), GTK_ALIGN_START);
gtk_widget_set_hexpand (GTK_WIDGET( *gde_data[i].loc ), FALSE);
- g_object_set (GTK_WIDGET( *gde_data[i].loc ), "margin", 0, NULL);
+ g_object_set (GTK_WIDGET( *gde_data[i].loc ), "margin", 0, (gchar *)NULL);
}
}
@@ -1866,25 +1866,25 @@
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(_("Date"), renderer,
"text", LOAN_COL_DATE,
- NULL);
+ (gchar *)NULL);
gtk_tree_view_append_column(ldd->revView, column);
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(_("Payment"), renderer,
"text", LOAN_COL_PAYMENT,
- NULL);
+ (gchar *)NULL);
gtk_tree_view_append_column(ldd->revView, column);
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(_("Principal"), renderer,
"text", LOAN_COL_PRINCIPAL,
- NULL);
+ (gchar *)NULL);
gtk_tree_view_append_column(ldd->revView, column);
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(_("Interest"), renderer,
"text", LOAN_COL_INTEREST,
- NULL);
+ (gchar *)NULL);
gtk_tree_view_append_column(ldd->revView, column);
/* move the appropriate names over into the title array */
@@ -1899,7 +1899,7 @@
column = gtk_tree_view_column_new_with_attributes
(ldd->ld.repayOpts[i]->name, renderer,
"text", LOAN_COL_INTEREST + col,
- NULL);
+ (gchar *)NULL);
gtk_tree_view_append_column(ldd->revView, column);
col++;
}