r17709 - gnucash/trunk/src/gnome-utils - Fix compiler warning/error about incompatible function pointer type
Christian Stimming
cstim at cvs.gnucash.org
Thu Nov 20 12:00:46 EST 2008
Author: cstim
Date: 2008-11-20 12:00:45 -0500 (Thu, 20 Nov 2008)
New Revision: 17709
Trac: http://svn.gnucash.org/trac/changeset/17709
Modified:
gnucash/trunk/src/gnome-utils/gnc-account-sel.c
Log:
Fix compiler warning/error about incompatible function pointer type
This is fixed by inserting a wrapper function whose pointer has the
correct type as needed by g_list_find_custom.
Modified: gnucash/trunk/src/gnome-utils/gnc-account-sel.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-account-sel.c 2008-11-20 17:00:37 UTC (rev 17708)
+++ gnucash/trunk/src/gnome-utils/gnc-account-sel.c 2008-11-20 17:00:45 UTC (rev 17709)
@@ -231,6 +231,14 @@
}
}
+/* Wrapper to offer the correct function declaration for
+ g_list_find_custom(), which needs void pointers instead of
+ gnc_commodity ones */
+static int gnc_commodity_compare_void(const void *a, const void *b)
+{
+ return gnc_commodity_compare(a, b);
+}
+
static
void
gas_filter_accounts( gpointer data, gpointer user_data )
@@ -255,7 +263,7 @@
if ( atnd->gas->acctCommodityFilters ) {
if ( g_list_find_custom( atnd->gas->acctCommodityFilters,
GINT_TO_POINTER(xaccAccountGetCommodity( a )),
- gnc_commodity_compare)
+ gnc_commodity_compare_void)
== NULL ) {
return;
}
More information about the gnucash-changes
mailing list