[Webkit-unassigned] [Bug 33575] New: Compiler warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 12 22:11:35 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=33575

           Summary: Compiler warning: comparisons like 'X<=Y<=Z' do not
                    have their mathematical meaning
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: captain.magnus at gmail.com


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"));
                         }
                     }

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list