GNOME Bugzilla – Bug 409262
test-mime-info-cache.c:36: warning: no return statement in function returning non-void
Last modified: 2018-08-17 13:47:18 UTC
Hi, When jhbuilding gnome-vfs, the builds fails with: /bin/sh ../libtool --tag=CC --mode=link gcc -std=gnu99 -Os -Wl,-O1 -Wl,-z,defs -o test-mime-handlers test-mime-handlers.o ../libgnomevfs/libgnomevfs-2.la -pthread -L/home/lool/jhbuild-gnome-2.18/prefix/lib -lgconf-2 -lORBit-2 -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lselinux -lutil -lrt -lrt creating test-mime gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I/home/lool/jhbuild-gnome-2.18/checkout/gnome-vfs/test -I/home/lool/jhbuild-gnome-2.18/checkout/gnome-vfs -I.. -I../libgnomevfs -DORBIT2=1 -pthread -I/home/lool/jhbuild-gnome-2.18/prefix/include/gconf/2 -I/home/lool/jhbuild-gnome-2.18/prefix/include/orbit-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/include/glib-2.0 -I/home/lool/jhbuild-gnome-2.18/prefix/lib/glib-2.0/include -Wall -Werror -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-strict-aliasing -Wno-sign-compare -DG_DISABLE_DEPRECATED -DMODULES_PATH=\"/home/lool/jhbuild-gnome-2.18/prefix/lib/vfs/modules\" -Os -MT test-mime-info-cache.o -MD -MP -MF .deps/test-mime-info-cache.Tpo -c -o test-mime-info-cache.o /home/lool/jhbuild-gnome-2.18/checkout/gnome-vfs/test/test-mime-info-cache.c cc1: warnings being treated as errors /home/lool/jhbuild-gnome-2.18/checkout/gnome-vfs/test/test-mime-info-cache.c: In function ‘foo’: /home/lool/jhbuild-gnome-2.18/checkout/gnome-vfs/test/test-mime-info-cache.c:36: warning: no return statement in function returning non-void make[2]: *** [test-mime-info-cache.o] Erreur 1 make[2]: *** Amake[2]: quittant le répertoire « /home/lool/jhbuild-gnome-2.18/build/gnome-vfs/test » ttente des tâches non terminées.... Of course, this is only a warning but this fails with -Werror. There's an endless loop, so no real programming error. Will attach a trivial patch. Bye,
Created attachment 82805 [details] [review] Add a g_return_val_if_reached(NULL)
gnome-vfs got deprecated in 2008. gnome-vfs is not under active development anymore and had its last code changes in 2011. Its codebase has been archived: https://gitlab.gnome.org/Archive/gnome-vfs/commits/master gio (in glib) and gvfs are its successors. See https://developer.gnome.org/gio/stable/ch33.html and https://people.gnome.org/~gicmo/gio-migration-guide/ for porting info. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Feel free to open a task in GNOME Gitlab if the issue described in this task still applies to a recent + supported version of glib/gio/gvfs. Thanks!