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 629933 - Missing return value
Missing return value
Status: RESOLVED FIXED
Product: libgee
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: libgee-maint
libgee-maint
Depends on:
Blocks:
 
 
Reported: 2010-09-17 15:46 UTC by Vincent Untz
Modified: 2010-09-18 08:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vincent Untz 2010-09-17 15:46:46 UTC
I: A function uses a 'return;' statement, but has actually a value
   to return, like an integer ('return 42;') or similar.
W: libgee voidreturn linkedlist.c:726
Comment 1 Maciej (Matthew) Piechotka 2010-09-17 17:58:21 UTC
Thanks for taking the time to report this bug.
This bug report isn't very useful because it doesn't describe the bug well. If you have time and can still reproduce the bug, please read http://bugzilla.gnome.org/bug-HOWTO.html and add a more useful description to this bug.

I'd be mostly interested in:
 - linkedlist.c (it is not in git and it is generated by Vala)
 - Version of vala
 - Version of compiler

Full build log would be mostly helpful. 

PS. It looks like either bug of vala or using unsupported compiler by vala. Either way - it looks like vala problem but I cannot say without above informations.
Comment 2 Vincent Untz 2010-09-17 18:19:51 UTC
        public override G remove_at (int index) {
                assert (index >= 0);
                assert (index < this._size);
        
                unowned Node<G>? n = this._get_node_at (index);
                return_if_fail (n != null);
                G element = n.data;
                this._remove_node (n);
                return element; 
        }

The return_if_fail should be a return_val_if_fail.
Comment 3 Maciej (Matthew) Piechotka 2010-09-18 08:14:45 UTC
commit 235d9b0410b68062911c414badf9a94bce1d34b6
Author: Maciej Piechotka <uzytkownik2@gmail.com>
Date:   Sat Sep 18 09:10:05 2010 +0100

    Change return_if_fail into assert in remove_at of LinkedList.
    
    It fixes build issue described in bug #629933 and make the behavior
    compatible with ArrayList.



commit 11e19cc2183c0bb9871b70ab62e34b6cd3702e95
Author: Maciej Piechotka <uzytkownik2@gmail.com>
Date:   Sat Sep 18 09:10:05 2010 +0100

    Change return_if_fail into assert in remove_at of LinkedList.
    
    It fixes build issue described in bug #629933 and make the behavior
    compatible with ArrayList.