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 785863 - Fixes for coverity errors
Fixes for coverity errors
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2017-08-05 18:32 UTC by Carlos Garnacho
Modified: 2017-08-05 18:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libtracker-data: Add optional() method for tokens that need no retval checks (1.68 KB, patch)
2017-08-05 18:32 UTC, Carlos Garnacho
committed Details | Review
libtracker-data: Use optional() to parse a few tokens (2.93 KB, patch)
2017-08-05 18:32 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2017-08-05 18:32:18 UTC
Attaching/pushing a few patches to fix "Unchecked return value" coverity warnings.
Comment 1 Carlos Garnacho 2017-08-05 18:32:46 UTC
Created attachment 357022 [details] [review]
libtracker-data: Add optional() method for tokens that need no retval checks

Also makes code clearer, as accept() implies you may react differently on
token availability.
Comment 2 Carlos Garnacho 2017-08-05 18:32:51 UTC
Created attachment 357023 [details] [review]
libtracker-data: Use optional() to parse a few tokens

Fixes a bunch of "unchecked return value" warnings on coverity,
it's also clearer to read.

Spotted by Coverity (CID#: 1188417, 1188418, 1188428, 1452443,
1452445, 1452449)
Comment 3 Carlos Garnacho 2017-08-05 18:34:33 UTC
Attachment 357022 [details] pushed as 17962ff - libtracker-data: Add optional() method for tokens that need no retval checks
Attachment 357023 [details] pushed as 1561d7c - libtracker-data: Use optional() to parse a few tokens