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 791017 - Small warning fixes
Small warning fixes
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2017-11-30 10:53 UTC by Philip Withnall
Modified: 2017-11-30 14:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rsvg-filter: Use fabs() instead of abs() for floats (927 bytes, patch)
2017-11-30 10:53 UTC, Philip Withnall
committed Details | Review
rsvg-styles: Fix badly structured comparisons (2.08 KB, patch)
2017-11-30 10:53 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2017-11-30 10:53:37 UTC
Trivial patches attached, although the rsvg-styles patch should be reviewed carefully to make sure the changes conform to the SVG spec (I am just guessing at what the code is supposed to do).
Comment 1 Philip Withnall 2017-11-30 10:53:43 UTC
Created attachment 364658 [details] [review]
rsvg-filter: Use fabs() instead of abs() for floats

Fixes a compiler warning (-Wabsolute-value).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment 2 Philip Withnall 2017-11-30 10:53:49 UTC
Created attachment 364659 [details] [review]
rsvg-styles: Fix badly structured comparisons

It looks like someone ported from g_strcmp0() to g_str_equal() at some
point and forgot to remove the return value comparison, leaving two
comparisons against the g_str_equal() return value in the condition.

Drop one of the comparisons, hoping it’s the right one based on the
context.

Spotted with -Wlogical-not-parentheses.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment 3 Federico Mena Quintero 2017-11-30 14:10:29 UTC
Review of attachment 364658 [details] [review]:

Please commit this!
Comment 4 Federico Mena Quintero 2017-11-30 14:21:21 UTC
Review of attachment 364659 [details] [review]:

Good catch! Please commit this.

For extra points, could you fix the indentation of the line that contains xml:space?  It's within the lines you touched.
Comment 5 Philip Withnall 2017-11-30 14:30:30 UTC
I’ve fixed the indentation problem as a separate follow-up commit (pushed without review). Thanks for the fast reviews!

Attachment 364658 [details] pushed as 2898220 - rsvg-filter: Use fabs() instead of abs() for floats
Attachment 364659 [details] pushed as ac59670 - rsvg-styles: Fix badly structured comparisons