From 2d93cf97c75ca0ac6a19d76544030a83af61cf48 Mon Sep 17 00:00:00 2001 From: Barrett17 Date: Tue, 31 Jul 2018 23:41:12 +0200 Subject: [PATCH] AdapterIO: Fix -Wtautological compare. * B_MEDIA_SEEKABLE was once a flag with one bit set. Due to the complexity of streaming mediums, I had to split this flag into B_MEDIA_SEEK_BACKWARD and B_MEDIA_SEEK_FORWARD and never noticed that this broke the flag check. * Reported by Murai Takashi through gcc8. --- src/kits/media/experimental/AdapterIO.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kits/media/experimental/AdapterIO.cpp b/src/kits/media/experimental/AdapterIO.cpp index be620c03c4..e164868e5e 100644 --- a/src/kits/media/experimental/AdapterIO.cpp +++ b/src/kits/media/experimental/AdapterIO.cpp @@ -163,21 +163,21 @@ public: { int32 flags = 0; fOwner->GetFlags(&flags); - return (flags & B_MEDIA_STREAMING) == true; + return ((flags & B_MEDIA_STREAMING) == B_MEDIA_STREAMING); } bool IsMutable() const { int32 flags = 0; fOwner->GetFlags(&flags); - return (flags & B_MEDIA_MUTABLE_SIZE) == true; + return ((flags & B_MEDIA_MUTABLE_SIZE) == B_MEDIA_MUTABLE_SIZE); } bool IsSeekable() const { int32 flags = 0; fOwner->GetFlags(&flags); - return (flags & B_MEDIA_SEEKABLE) == true; + return ((flags & B_MEDIA_SEEKABLE) == B_MEDIA_SEEKABLE); } private: