mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17709 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
a7764502b0
commit
1de131ed1b
@ -231,6 +231,14 @@ gas_populate_list( GNCAccountSel *gas )
|
||||
}
|
||||
}
|
||||
|
||||
/* 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 @@ gas_filter_accounts( gpointer data, gpointer user_data )
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user