r23740 - gnucash/trunk/src/register/ledger-core - Bug 722123 - Zero price entry added to price database on stock purchase

Mike Alexander mta at umich.edu
Wed Jan 22 18:37:39 EST 2014


--On January 22, 2014 4:07:27 PM +0100 Herbert Thoma 
<herbert.thoma at iis.fraunhofer.de> wrote:

> This gives me a "may be used ininitialized" warning.
> Can be fixed by initializing PriceCell *cell with NULL
> (first line of function gnc_split_register_auto_calc()),
> see below.
>
>   Herbert.
>
>
> diff --git a/src/register/ledger-core/split-register.c
> b/src/register/ledger-core/split-register.c
> index 5055994..d126297 100644
> --- a/src/register/ledger-core/split-register.c
> +++ b/src/register/ledger-core/split-register.c
> @@ -2076,7 +2076,7 @@ record_price (SplitRegister *reg, Account
> *account, gnc_numeric value)
>   static gboolean
>   gnc_split_register_auto_calc (SplitRegister *reg, Split *split)
>   {
> -    PriceCell *cell;
> +    PriceCell *cell = NULL;
>       gboolean recalc_shares = FALSE;
>       gboolean recalc_price = FALSE;
>       gboolean recalc_value = FALSE;
>
>

I committed this in r23746.  Thanks for the patch.

           Mike
 


More information about the gnucash-devel mailing list