Opened 6 years ago

Closed 6 years ago

Last modified 6 years 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:
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, 6 years 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, 6 years 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.