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 706532 - folks_small_set_copy() does not always return value
folks_small_set_copy() does not always return value
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: general
0.9.x
Other Linux
: Normal normal
: Unset
Assigned To: folks-maint
folks-maint
Depends on:
Blocks:
 
 
Reported: 2013-08-21 19:45 UTC by Dominique Leuenberger
Modified: 2013-08-22 05:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Define a return value. (540 bytes, patch)
2013-08-21 19:46 UTC, Dominique Leuenberger
committed Details | Review

Description Dominique Leuenberger 2013-08-21 19:45:31 UTC
The function folks_small_set_copy() only returns anything if the condition
  (G_OBJECT_TYPE (iterable) == FOLKS_TYPE_SMALL_SET)
is met.

In other cases, the function runs through without returning anything (not even NULL).

The compiler complains about:

[  108s] small-set.c: In function 'folks_small_set_copy':
[  108s] small-set.c:420:1: warning: control reaches end of non-void function [-Wreturn-type]
[  108s]  }
Comment 1 Dominique Leuenberger 2013-08-21 19:46:11 UTC
Created attachment 252663 [details] [review]
Define a return value.
Comment 2 Philip Withnall 2013-08-22 01:47:17 UTC
Review of attachment 252663 [details] [review]:

Good catch. Please commit to master, and don’t forget to update the NEWS file in your commit. Thanks!
Comment 3 Dominique Leuenberger 2013-08-22 05:51:40 UTC
Comment on attachment 252663 [details] [review]
Define a return value.

Commited as bced3b8a8, incl NEWS entry for 0.9.5.