GNOME Bugzilla – Bug 793699
gnome-utils/gnc-tree-view-split-reg.c:4094:9: error: ‘start_spath’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
Last modified: 2018-06-30 00:04:46 UTC
I am getting the following compile error; I do not enable -Werror=maybe-uninitialized in my flags, not sure why it is there. [ 62%] Building C object gnucash/gnome-utils/CMakeFiles/gncmod-gnome-utils.dir/gnc-tree-view-split-reg.c.o cd /mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4_build/gnucash/gnome-utils && /usr/bin/x86_64-pc-linux-gnu-gcc -DG_LOG_DOMAIN=\"gnc.gui\" -DHAVE_CONFIG_H -DHAVE_GUILE20 -Dgncmod_gnome_utils_EXPORTS -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/gnucash/gnome-utils -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4_build/gnucash/gnome-utils -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/app-utils -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/engine -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4_build/common -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/common -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/borrowed/libc -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4_build/libgnucash/core-utils -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/core-utils -I/usr/include/guile/2.0 -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/gnc-module -I/usr/include/libxml2 -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/backend/xml -DNDEBUG -Os -pipe -march=native -fstack-check -fstack-protector-all -Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-unused -Wno-deprecated-declarations -std=gnu11 -fPIC -o CMakeFiles/gncmod-gnome-utils.dir/gnc-tree-view-split-reg.c.o -c /mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/gnucash/gnome-utils/gnc-tree-view-split-reg.c [ 62%] Building C object gnucash/gnome-utils/CMakeFiles/gncmod-gnome-utils.dir/gnc-tree-view-sx-list.c.o cd /mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4_build/gnucash/gnome-utils && /usr/bin/x86_64-pc-linux-gnu-gcc -DG_LOG_DOMAIN=\"gnc.gui\" -DHAVE_CONFIG_H -DHAVE_GUILE20 -Dgncmod_gnome_utils_EXPORTS -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/gnucash/gnome-utils -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4_build/gnucash/gnome-utils -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/app-utils -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/engine -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4_build/common -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/common -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/borrowed/libc -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4_build/libgnucash/core-utils -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/core-utils -I/usr/include/guile/2.0 -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/gnc-module -I/usr/include/libxml2 -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/backend/xml -DNDEBUG -Os -pipe -march=native -fstack-check -fstack-protector-all -Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-unused -Wno-deprecated-declarations -std=gnu11 -fPIC -o CMakeFiles/gncmod-gnome-utils.dir/gnc-tree-view-sx-list.c.o -c /mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/gnucash/gnome-utils/gnc-tree-view-sx-list.c [ 62%] Building C object gnucash/gnome-utils/CMakeFiles/gncmod-gnome-utils.dir/gnc-tree-view.c.o cd /mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4_build/gnucash/gnome-utils && /usr/bin/x86_64-pc-linux-gnu-gcc -DG_LOG_DOMAIN=\"gnc.gui\" -DHAVE_CONFIG_H -DHAVE_GUILE20 -Dgncmod_gnome_utils_EXPORTS -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/gnucash/gnome-utils -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4_build/gnucash/gnome-utils -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/app-utils -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/engine -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4_build/common -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/common -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/borrowed/libc -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4_build/libgnucash/core-utils -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/core-utils -I/usr/include/guile/2.0 -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/gnc-module -I/usr/include/libxml2 -I/mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/libgnucash/backend/xml -DNDEBUG -Os -pipe -march=native -fstack-check -fstack-protector-all -Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-unused -Wno-deprecated-declarations -std=gnu11 -fPIC -o CMakeFiles/gncmod-gnome-utils.dir/gnc-tree-view.c.o -c /mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/gnucash/gnome-utils/gnc-tree-view.c /mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/gnucash/gnome-utils/gnc-tree-view-split-reg.c: In function ‘gtv_sr_key_press_cb’: /mnt/data/tmp/portage/app-office/gnucash-2.7.4/work/gnucash-2.7.4/gnucash/gnome-utils/gnc-tree-view-split-reg.c:4094:9: error: ‘start_spath’ may be used uninitialized in this function [-Werror=maybe-uninitialized] gtk_tree_path_free (start_spath); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors I reported this issue first with my linux distribution, Gentoo, here: https://bugs.gentoo.org/647858 The complete build log can be found there, https://647858.bugs.gentoo.org/attachment.cgi?id=519708
I could not get this to fail as above but have refactored the code so start_spath is defined in the while loop and freed also there in PR 302. Bob
PR302 is merged and part of GnuCash 2.7.6.
So Johannes Buchner, please test.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment. Thanks!
I was able to install gnucash 2.7.7-r1 on gentoo without problems. Thank you!
OK, thanks for getting back to us. But you should now build GnuCash 3.1 in order to avoid all of the other bugs we fixed!
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=793699. Please update any external references or bookmarks.