Op maandag 13 februari 2012 09:24:27 schreef Casey Cichon: > Hey all, > > I'm getting the following error when trying to compile the latest trunk (git > pulled this morning). > > make[5]: Entering directory `/home/casey/Downloads/gnucash/src/engine' > /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. > -I../.. -DG_LOG_DOMAIN=\"gnc.engine\" -I../../lib/libc > -I../../src/core-utils -I../../src -I../../src -I../../src/gnc-module > -I../../src/libqof/qof -pthread -I/usr/include/glib-2.0 > -I/usr/lib/i386-linux-gnu/glib-2.0/include -pthread -Werror > -Wdeclaration-after-statement -g -O2 -Wall -Wunused -Wmissing-prototypes > -Wmissing-declarations -Wno-unused -MT gncOwner.lo -MD -MP -MF > .deps/gncOwner.Tpo -c -o gncOwner.lo gncOwner.c libtool: compile: gcc > -DHAVE_CONFIG_H -I. -I../.. -DG_LOG_DOMAIN=\"gnc.engine\" -I../../lib/libc > -I../../src/core-utils -I../../src -I../../src -I../../src/gnc-module > -I../../src/libqof/qof -pthread -I/usr/include/glib-2.0 > -I/usr/lib/i386-linux-gnu/glib-2.0/include -pthread -Werror > -Wdeclaration-after-statement -g -O2 -Wall -Wunused -Wmissing-prototypes > -Wmissing-declarations -Wno-unused -MT gncOwner.lo -MD -MP -MF > .deps/gncOwner.Tpo -c gncOwner.c -fPIC -DPIC -o .libs/gncOwner.o > gncOwner.c: In function 'gncOwnerAutoApplyPaymentsWithLots': > gncOwner.c:1015:33: error: 'txn' may be used uninitialized in this function > [-Werror=uninitialized] cc1: all warnings being treated as errors > > make[5]: *** [gncOwner.lo] Error 1 > make[5]: Leaving directory `/home/casey/Downloads/gnucash/src/engine' > make[4]: *** [all-recursive] Error 1 > make[4]: Leaving directory `/home/casey/Downloads/gnucash/src/engine' > make[3]: *** [all] Error 2 > make[3]: Leaving directory `/home/casey/Downloads/gnucash/src/engine' > make[2]: *** [all-recursive] Error 1 > make[2]: Leaving directory `/home/casey/Downloads/gnucash/src' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/home/casey/Downloads/gnucash' > make: *** [all] Error 2 > > > > I looked at the code, and txn is logically defined in the code before this > line, so the warning I don't think could actually happen. > I see how the compiler can get confused about this even though in reality this code will never be executed with an uninitialized 'txn' variable.
Just to satisfy the compiler I have slightly modified the code in r22021 which I hope should avoid the compiler warning. Can you update to latest trunk and try again ? Geert _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel