RESOLVED FIXED 33575
[Gtk] Compiler warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning
https://bugs.webkit.org/show_bug.cgi?id=33575
Summary [Gtk] Compiler warning: comparisons like 'X<=Y<=Z' do not have their mathemat...
Magnus Boman
Reported 2010-01-12 22:11:34 PST
Compiler complains about "comparisons like 'X<=Y<=Z' do not have their mathematical meaning" in WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp Here's a patch. Not sure if I got it right though :-) Index: WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp =================================================================== --- WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp.orig 2010-01-05 08:53:00.000000000 +1100 +++ WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp 2010-01-13 16:59:29.000000000 +1100 @@ -852,11 +852,11 @@ static HashSet<String> mimeTypeCache() if (G_VALUE_TYPE(layer) == GST_TYPE_INT_RANGE) { gint minLayer = gst_value_get_int_range_min(layer); gint maxLayer = gst_value_get_int_range_max(layer); - if (minLayer <= 1 <= maxLayer) + if (minLayer <= 1 && 1 <= maxLayer) cache.add(String("audio/mp1")); - if (minLayer <= 2 <= maxLayer) + if (minLayer <= 2 && 2 <= maxLayer) cache.add(String("audio/mp2")); - if (minLayer <= 3 <= maxLayer) + if (minLayer <= 3 && 3 <= maxLayer) cache.add(String("audio/mp3")); } }
Attachments
fix compiler warnings (2.26 KB, patch)
2010-01-14 05:13 PST, Philippe Normand
xan.lopez: review+
Alexey Proskuryakov
Comment 1 2010-01-13 13:01:20 PST
That's clearly a bug. Would you be willing to submit a patch for review, as described in <http://webkit.org/coding/contributing.html>?
Philippe Normand
Comment 2 2010-01-14 04:57:07 PST
Thanks Magnus for spotting this, it is my mistake :( I will try your patch and attach it here if you don't mind
Philippe Normand
Comment 3 2010-01-14 05:13:02 PST
Created attachment 46556 [details] fix compiler warnings
Xan Lopez
Comment 4 2010-01-14 05:27:41 PST
Comment on attachment 46556 [details] fix compiler warnings LGTM.
Magnus Boman
Comment 5 2010-01-14 10:08:02 PST
(In reply to comment #2) > Thanks Magnus for spotting this, it is my mistake :( I will try your patch and > attach it here if you don't mind Philippe, I don't mind. Just wasn't sure that the logic was according to my patch.
Eric Seidel (no email)
Comment 6 2010-01-14 12:54:31 PST
Attachment 46556 [details] was posted by a committer and has review+, assigning to Philippe Normand for commit.
Philippe Normand
Comment 7 2010-01-15 03:55:17 PST
Landed as r53329. Thanks!
Note You need to log in before you can comment on or make changes to this bug.