compiling gnucash2 on FC5-devel (gcc 4.1.0)

Derek Atkins warlord at MIT.EDU
Fri Jan 13 11:08:57 EST 2006


ag381597 at ohio.edu writes:

> 1) in src/engine/gw-engine.c (which it appears may actually be
> generated at some point from scheme code?), a variable was passed an
> an argument to a function before being initialized, so I simply
> initialized it to a constant of the appropriate type:

Indeed, this is a generated file.  You should make sure you're using
g-wrap 1.9.6 and not g-wrap 1.3.4 and try again.  There's no way
we can "apply" this patch in any form.

[snip]
> 3) in src/register/ledger-core/split-register.c , some function return values
> are being typecast yet ignored.  I found that quite strange, but simply created
> a variable to which the return value could be assigned:
>
>  --- src/register/ledger-core/split-register.c   2006-01-12 22:09:58.000000000 -0500
> +++ ../split-register.c 2006-01-12 22:02:45.000000000 -0500
> @@ -1331,6 +1331,7 @@
>     const char *memo;
>     const char *desc;
>     Split *split;
> +   Account * acct;
>
>     if (!reg) return FALSE;
>
> @@ -1389,8 +1390,8 @@
>       return FALSE;
>
>     /* Validate the transfer account names */
> -   (void *)gnc_split_register_get_account (reg, MXFRM_CELL);
> -   (void *)gnc_split_register_get_account (reg, XFRM_CELL);
> +   acct = gnc_split_register_get_account (reg, MXFRM_CELL);
> +   acct = gnc_split_register_get_account (reg, XFRM_CELL);


I suspect these are supposed to be (void), not (void *)...  I'd have
to look at the code to understand why it's ignoring the return value
of these functions.

-derek
-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list