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 791929 - Fix return value error for create_main_window_vala
Fix return value error for create_main_window_vala
Product: gnome-latex
Classification: Other
Component: general
Other FreeBSD
: Normal normal
: unspecified
Assigned To: LaTeXila maintainer(s)
LaTeXila maintainer(s)
Depends on:
Reported: 2017-12-24 17:48 UTC by Ting-Wei Lan
Modified: 2017-12-26 11:34 UTC
See Also:
GNOME target: ---
GNOME version: ---

build: fix "non-void function should return a value" for clang (899 bytes, patch)
2017-12-24 17:51 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2017-12-24 17:48:27 UTC
In file src/factory.vala, class Factory, function create_main_window_vala returns a pointer, so it must use return_val_if_fail instead of return_if_fail.

factory.c:155:2: error: non-void function 'factory_real_create_main_window_vala' should return a value [-Wreturn-type]
        g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (gtk_app, TYPE_LATEXILA_APP));
/home/lantw44/gnome/devinstall/include/glib-2.0/glib/gmessages.h:606:3: note: expanded from macro 'g_return_if_fail'
         return;                                                        \
1 error generated.
Comment 1 Ting-Wei Lan 2017-12-24 17:51:41 UTC
Created attachment 365946 [details] [review]
build: fix "non-void function should return a value" for clang
Comment 2 Sébastien Wilmet 2017-12-26 10:59:59 UTC
Review of attachment 365946 [details] [review]:

Thanks for the patch.

Pushed as commit 7359e31c7184e51b019eea3f37e39228c7665bee.