g_return

Neil Williams linux at codehelp.co.uk
Wed Aug 11 17:24:00 EDT 2004


On Wednesday 11 August 2004 7:25, Derek Atkins wrote:
> I'll also note that in the snippet you sent,
> qof_book_mergeUpdateResult() doesn't return anything, so you don't
> even get an error code back.  Not sure how what it's updating, or how
> "remainder" gets changed.. :)

the g_return_if_fail is inside qof_book_mergeUpdateResult - the function is 
called as part of a foreach sequence that calls each rule with a specific 
rule result and it sets an enum value in the current rule of the loop. The 
next iteration counts the rules, checks for abort and sums the remainder 
value for that specific enum value. The wrapping foreach then passes that 
back to the user loop.

I even tried g_return_if_fail(1 == 2);

> Finally, you should definitely be compiling with -Wall -Werror..  If
-Wall
-Werror
amongst others.

> you're getting "warning: implicit declaration of function
> `g_return_if_reached'" then that implies you've got a bug -- either
> missing headers, incorrect headers, or missing dependencies.

where do I start? nothing was picked up in config.

I've been trying all night to get this to work - I've even added:
g_return_if_fail(1==2);
to known working files and I get no messages.

I'll try it with a pristine CVS HEAD tree later.

-- 

Neil Williams
=============
http://www.codehelp.co.uk/
http://www.dclug.org.uk/
http://www.isbn.org.uk/
http://sourceforge.net/projects/isbnsearch/

http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20040811/232d8b0d/attachment.bin


More information about the gnucash-devel mailing list