After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
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]
gnome-utils/gnc-tree-view-split-reg.c:4094:9: error: ‘start_spath’ may be use...
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: General
2.6.19
Other Linux
: Normal normal
: ---
Assigned To: gnucash-general-maint
gnucash-general-maint
Depends on:
Blocks:
 
 
Reported: 2018-02-21 17:19 UTC by Johannes Buchner
Modified: 2018-06-30 00:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Johannes Buchner 2018-02-21 17:19:54 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
Comment 1 Bob 2018-03-06 15:48:59 UTC
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
Comment 2 John Ralls 2018-03-12 16:05:56 UTC
PR302 is merged and part of GnuCash 2.7.6.
Comment 3 John Ralls 2018-03-13 16:21:10 UTC
So Johannes Buchner, please test.
Comment 4 Geert Janssens 2018-04-28 15:26:48 UTC
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!
Comment 5 Johannes Buchner 2018-05-01 00:33:17 UTC
I was able to install gnucash 2.7.7-r1 on gentoo without problems. Thank you!
Comment 6 John Ralls 2018-05-01 02:16:52 UTC
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!
Comment 7 John Ralls 2018-06-30 00:04:46 UTC
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.