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 749892 - Fix gtk_tree_model_get_iter_first() retval
Fix gtk_tree_model_get_iter_first() retval
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-05-26 11:23 UTC by Bastien Nocera
Modified: 2015-05-27 09:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
common: Fix gtk_tree_model_get_iter_first() retval (929 bytes, patch)
2015-05-26 11:23 UTC, Bastien Nocera
committed Details | Review
keyboard: Fix gtk_tree_model_get_iter_first() retval (903 bytes, patch)
2015-05-26 11:23 UTC, Bastien Nocera
committed Details | Review
sound: Fix gtk_tree_model_get_iter_first() retval (948 bytes, patch)
2015-05-26 11:23 UTC, Bastien Nocera
committed Details | Review
user-accounts: Fix gtk_tree_model_get_iter_first() retval (1.41 KB, patch)
2015-05-26 11:23 UTC, Bastien Nocera
committed Details | Review
shell: Fix gtk_tree_model_get_iter_first() retval (1.35 KB, patch)
2015-05-26 11:23 UTC, Bastien Nocera
committed Details | Review
network: Fix gtk_tree_model_get_iter_first() retval (1.50 KB, patch)
2015-05-26 11:24 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2015-05-26 11:23:33 UTC
From coverity:
check_return: Calling "gtk_tree_model_get_iter_first" without checking return value (as is done elsewhere 36 out of 45 times).
Comment 1 Bastien Nocera 2015-05-26 11:23:37 UTC
Created attachment 303992 [details] [review]
common: Fix gtk_tree_model_get_iter_first() retval
Comment 2 Bastien Nocera 2015-05-26 11:23:42 UTC
Created attachment 303993 [details] [review]
keyboard: Fix gtk_tree_model_get_iter_first() retval
Comment 3 Bastien Nocera 2015-05-26 11:23:47 UTC
Created attachment 303994 [details] [review]
sound: Fix gtk_tree_model_get_iter_first() retval
Comment 4 Bastien Nocera 2015-05-26 11:23:52 UTC
Created attachment 303995 [details] [review]
user-accounts: Fix gtk_tree_model_get_iter_first() retval
Comment 5 Bastien Nocera 2015-05-26 11:23:57 UTC
Created attachment 303996 [details] [review]
shell: Fix gtk_tree_model_get_iter_first() retval
Comment 6 Bastien Nocera 2015-05-26 11:24:03 UTC
Created attachment 303997 [details] [review]
network: Fix gtk_tree_model_get_iter_first() retval

And don't select the first item when removing the item fails.
Comment 7 Rui Matos 2015-05-26 16:50:33 UTC
Review of attachment 303992 [details] [review]:

right, the model can't ever be empty
Comment 8 Rui Matos 2015-05-26 16:55:25 UTC
Review of attachment 303993 [details] [review]:

++
Comment 9 Rui Matos 2015-05-26 17:04:04 UTC
Review of attachment 303994 [details] [review]:

can't be empty, right
Comment 10 Rui Matos 2015-05-26 17:14:19 UTC
Review of attachment 303995 [details] [review]:

suppose this can't ever be empty either otherwise something is seriously wrong (not ever the current user account would be there...)
Comment 11 Rui Matos 2015-05-26 17:17:47 UTC
Review of attachment 303996 [details] [review]:

sure, can't be empty
Comment 12 Rui Matos 2015-05-26 17:25:28 UTC
Review of attachment 303997 [details] [review]:

changes behavior but fine, I don't think people will be mass removing network devices
Comment 13 Bastien Nocera 2015-05-27 09:10:26 UTC
Attachment 303992 [details] pushed as 41bb1a6 - common: Fix gtk_tree_model_get_iter_first() retval
Attachment 303993 [details] pushed as 71de309 - keyboard: Fix gtk_tree_model_get_iter_first() retval
Attachment 303994 [details] pushed as b410ec3 - sound: Fix gtk_tree_model_get_iter_first() retval
Attachment 303995 [details] pushed as 9341460 - user-accounts: Fix gtk_tree_model_get_iter_first() retval
Attachment 303996 [details] pushed as 3ff7c61 - shell: Fix gtk_tree_model_get_iter_first() retval
Attachment 303997 [details] pushed as 3569b2d - network: Fix gtk_tree_model_get_iter_first() retval