gnucash maint: from_price and to_price may be uninitialized in extract_comon_prices

Christopher Lam clam at code.gnucash.org
Thu Apr 29 19:09:47 EDT 2021


Updated	 via  https://github.com/Gnucash/gnucash/commit/888676eb (commit)
	from  https://github.com/Gnucash/gnucash/commit/37afd65f (commit)



commit 888676eb31d0a942d1ee12dec4bd3767517d2bcb
Author: Hong Xu <hong at topbug.net>
Date:   Thu Apr 29 14:49:16 2021 -0700

    from_price and to_price may be uninitialized in extract_comon_prices
    
    Fix the compilation error on gcc 10:
    
        gnucash/libgnucash/engine/gnc-pricedb.c: In function ‘extract_common_prices’:
        gnucash/libgnucash/engine/gnc-pricedb.c:2469:40: error:
        to_price may be used uninitialized in this function [-Werror=maybe-uninitialized]
         2469 |     if (from_price == NULL || to_price == NULL)
               |                                        ^
               gnucash/libgnucash/engine/gnc-pricedb.c:2469:20:
               error: ‘from_price’ may be used uninitialized in this
               function [-Werror=maybe-uninitialized]
                2469 |     if (from_price == NULL || to_price == NULL)
                      |                    ^



Summary of changes:
 libgnucash/engine/gnc-pricedb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



More information about the gnucash-patches mailing list