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 722023 - Non-void function should return a value
Non-void function should return a value
Status: RESOLVED FIXED
Product: seahorse
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Seahorse Maintainer
Seahorse Maintainer
Depends on: 722090
Blocks:
 
 
Reported: 2014-01-12 03:53 UTC by Ting-Wei Lan
Modified: 2014-02-09 15:22 UTC
See Also:
GNOME target: ---
GNOME version: 3.11/3.12


Attachments
Fix "Non-void function should return a value" (1.42 KB, patch)
2014-01-13 08:49 UTC, Stef Walter
committed Details | Review
Fix some return_(val_)_if_fail mismatches (1.26 KB, patch)
2014-01-15 04:52 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Ting-Wei Lan 2014-01-12 03:53:49 UTC
Some Non-void functions use g_return_if_fail, which should be replaced by g_return_val_if_fail.

gkr/gkr-backend.vala: Gkr.Backend.construct
gkr/gkr-backend.vala: Gkr.Backend.instance
ssh/seahorse-ssh-key-properties.c: seahorse_ssh_key_properties_show
Comment 1 Stef Walter 2014-01-13 08:49:17 UTC
Created attachment 266134 [details] [review]
Fix "Non-void function should return a value"
Comment 2 Stef Walter 2014-01-13 09:13:37 UTC
This one is a vala bug #722090

gkr/gkr-backend.vala: Gkr.Backend.construct

The other two are fixed by the patch.
Comment 3 Stef Walter 2014-01-13 09:14:49 UTC
Comment on attachment 266134 [details] [review]
Fix "Non-void function should return a value"

Attachment 266134 [details] pushed as 766d384 - Fix "Non-void function should return a value"
Comment 4 Ting-Wei Lan 2014-01-13 09:38:48 UTC
Gkr.Backend.instance is not fixed.
Gkr.Backend.initialize: void function should not return a value.
Comment 5 Stef Walter 2014-01-13 09:44:15 UTC
Please include complete compiler output or provide a patch. Otherwise we could go back and forth on this forever :)

Thank you.
Comment 6 Ting-Wei Lan 2014-01-13 09:46:10 UTC
gkr-backend.c:464:2: error: void function 'seahorse_gkr_backend_initialize'
      should not return a value [-Wreturn-type]
gkr-backend.c:480:2: error: non-void function 'seahorse_gkr_backend_instance'
      should return a value [-Wreturn-type]
gkr-backend.c:824:2: error: non-void function 'seahorse_gkr_backend_constructor'
      should return a value [-Wreturn-type]
Comment 7 Allison Karlitskaya (desrt) 2014-01-15 04:52:58 UTC
Created attachment 266329 [details] [review]
Fix some return_(val_)_if_fail mismatches
Comment 8 Allison Karlitskaya (desrt) 2014-02-09 15:22:10 UTC
Attachment 266329 [details] pushed as 395a5ef - Fix some return_(val_)_if_fail mismatches