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 736980 - Non-void function should return a value
Non-void function should return a value
Status: RESOLVED FIXED
Product: four-in-a-row
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: four-in-a-row-maint
four-in-a-row-maint
Depends on:
Blocks:
 
 
Reported: 2014-09-19 15:18 UTC by Ting-Wei Lan
Modified: 2014-09-28 02:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix "Non-void function should return a value" (745 bytes, patch)
2014-09-19 15:18 UTC, Ting-Wei Lan
committed Details | Review
Fix return value of create_app (823 bytes, patch)
2014-09-27 19:37 UTC, Michael Catanzaro
committed Details | Review

Description Ting-Wei Lan 2014-09-19 15:18:55 UTC
Created attachment 286635 [details] [review]
Fix "Non-void function should return a value"

In src/main.c, function create_app should return a value. Please see the attached patch.
Comment 1 Michael Catanzaro 2014-09-19 19:28:52 UTC
Review of attachment 286635 [details] [review]:

Thanks!  Good thing that code path should never be hit....
Comment 2 Michael Catanzaro 2014-09-21 23:48:26 UTC
Attachment 286635 [details] pushed as cf54d83 - Fix "Non-void function should return a value"
Comment 3 Ting-Wei Lan 2014-09-27 03:47:33 UTC
Function create_app is a void function now, so we should remove the return value ...
Comment 4 Michael Catanzaro 2014-09-27 19:37:41 UTC
Sometimes I wonder why this isn't an error....

The following fix has been pushed:
4abb173 Fix return value of create_app
Comment 5 Michael Catanzaro 2014-09-27 19:37:47 UTC
Created attachment 287260 [details] [review]
Fix return value of create_app

Gah!
Comment 6 Ting-Wei Lan 2014-09-28 02:58:49 UTC
(In reply to comment #4)
> Sometimes I wonder why this isn't an error....
This problem is an error in clang. I think we needs to add -Werror=return-type when using gcc to prevent this problem. (I found this error by compiling many GNOME modules with clang)

> 
> The following fix has been pushed:
> 4abb173 Fix return value of create_app