PATCH: disallowing bill post to wrong commodity account

Christian Stimming stimming at tuhh.de
Thu Nov 20 04:30:35 EST 2008


Am Montag, 3. November 2008 18:03 schrieb Mark Jenkins:
> > Could you use "svn diff" or "diff -u" and re-attach please?
> > A 'standard diff' is very hard to read/follow.
>
> Attached. Apply with patch -p0 from within the source directory.
>
> Jamie is working on the proposal I made in my Oct 23 post,  "Proposal
> for business, multi-currency support"
> http://lists.gnucash.org/pipermail/gnucash-devel/2008-October/024162.html
> This patch is a first step towards that.

When compiling this with current trunk, I get

cc1: warnings being treated as errors
../../../src/gnome-utils/gnc-account-sel.c: In function 'gas_filter_accounts':
../../../src/gnome-utils/gnc-account-sel.c:258: warning: passing argument 3 
of 'g_list_find_custom' from incompatible pointer type
make[5]: *** [gnc-account-sel.lo] Fehler 1
make[5]: Leaving directory 
`/home/chs/org/gnucash/git/trunk/build/src/gnome-utils'

Seems to me the call to g_list_find_custom wants a function pointer that has a 
"int foo(const void*, const void*)" declaration as opposed to the currently 
used "int gnc_commodity_compare(const gnc_commodity*, const gnc_commodity*)", 
which is a pity, but IIRC that's what a C compiler wants. Maybe a local 
wrapper function...

Christian


More information about the gnucash-devel mailing list