Bug 106463 - daemon: fix compiler warnings
Summary: daemon: fix compiler warnings
Status: RESOLVED FIXED
Alias: None
Product: accountsservice
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Matthias Clasen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-10 17:24 UTC by Ray Strode [halfline]
Modified: 2018-05-10 20:04 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
daemon: fix compiler warnings (4.16 KB, patch)
2018-05-10 17:24 UTC, Ray Strode [halfline]
Details | Splinter Review
Revert "daemon: fix compiler warnings" (3.96 KB, patch)
2018-05-10 20:04 UTC, Ray Strode [halfline]
Details | Splinter Review
daemon: fix compiler warnings (3.75 KB, patch)
2018-05-10 20:04 UTC, Ray Strode [halfline]
Details | Splinter Review

Description Ray Strode [halfline] 2018-05-10 17:24:53 UTC
Right now we have code like:

 if (!refreshed_user || user_get_cached (user) && !user_get_cached (refreshed_user))

which gcc warns about because of missing parentheses.  Rather than
just add brackets, this commit moves the last bit into a separate boolean
for clarity.
Comment 1 Ray Strode [halfline] 2018-05-10 17:24:58 UTC
Created attachment 139471 [details] [review]
daemon: fix compiler warnings
Comment 2 Ray Strode [halfline] 2018-05-10 17:25:41 UTC
Attachment 139471 [details] pushed as 27f4dbe - daemon: fix compiler warnings
Comment 3 Ray Strode [halfline] 2018-05-10 20:04:12 UTC
Created attachment 139472 [details] [review]
Revert "daemon: fix compiler warnings"

This reverts commit 27f4dbe3181390c7572f9438d63b654255b7a2df.
Comment 4 Ray Strode [halfline] 2018-05-10 20:04:24 UTC
Created attachment 139473 [details] [review]
daemon: fix compiler warnings

Right now we have code like:

 if (!refreshed_user || user_get_cached (user) && !user_get_cached (refreshed_user))

which gcc warns about because of missing parentheses.

This commit fixes it by adding brackets.
Comment 5 Ray Strode [halfline] 2018-05-10 20:04:51 UTC
Attachment 139472 [details] pushed as b77548d - Revert "daemon: fix compiler warnings"
Attachment 139473 [details] pushed as f513320 - daemon: fix compiler warnings


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.