Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#14300 closed bug (fixed)

Media Kit: Fix -Wtautological-compare

Reported by: mt Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: - General Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

https://review.haiku-os.org/#/c/haiku/+/359/

In kits/media/experimental/AdapterIO.cpp, modify comparisons, since they always evaluates to false. Pointed by gcc8 [-Werror=tautological-compare].

/home/haiku/haiku/haiku/src/kits/media/experimental/AdapterIO.cpp: In member function 'bool RelativePositionIO::IsMutable() const':
/home/haiku/haiku/haiku/src/kits/media/experimental/AdapterIO.cpp:173:41: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
   return (flags & B_MEDIA_MUTABLE_SIZE) == true;
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/home/haiku/haiku/haiku/src/kits/media/experimental/AdapterIO.cpp: In member function 'bool RelativePositionIO::IsSeekable() const':
/home/haiku/haiku/haiku/src/kits/media/experimental/AdapterIO.cpp:180:37: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
   return (flags & B_MEDIA_SEEKABLE) == true;
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

Change History (2)

comment:1 by Barrett, 15 months ago

Resolution: fixed
Status: newclosed

hrev52141.

@Waddlesplash could you please avoid closing the gerrit ticket for me? I may want to reserve the pleasure of hitting the button myself. Thank you.

comment:2 by korli, 15 months ago

@Barrett are you subscribed to the commits list? The commit email didn't get through for hrev52141, see https://www.freelists.org/archive/haiku-commits/07-2018

Note: See TracTickets for help on using tickets.