Opened 3 years ago

Closed 3 years ago

#12742 closed bug (fixed)

[Patch] MediaJack.cpp: fix gcc6 build

Reported by: mt Owned by: Barrett
Priority: normal Milestone: Unscheduled
Component: Applications/Cortex Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All


In CORTEX_NAMESPACE compareTypeAndID(), gcc6 warns '-Werror=tautological-compare'. It seems there is same variable comparison at line 783 and 787.

C++ /home/haiku/haiku/haiku/generated-gcc6/objects/haiku/x86/release/apps/cortex/MediaRoutingView/MediaJack.o 
/home/haiku/haiku/haiku/src/apps/cortex/MediaRoutingView/MediaJack.cpp: In function 'int compareTypeAndID(const void*, const void*)':
/home/haiku/haiku/haiku/src/apps/cortex/MediaRoutingView/MediaJack.cpp:783:25: error: self-comparison always evaluates to false [-Werror=tautological-compare]
   if (lJack->m_jackType < lJack->m_jackType)
/home/haiku/haiku/haiku/src/apps/cortex/MediaRoutingView/MediaJack.cpp:787:25: error: self-comparison always evaluates to true [-Werror=tautological-compare]
   if (lJack->m_jackType == lJack->m_jackType)
cc1plus: all warnings being treated as errors

Attachments (1)

0003-MediaJack.cpp-fix-gcc6-build.patch (1.0 KB ) - added by mt 3 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by mt, 3 years ago

Has a Patch: set

comment:2 by Barrett, 3 years ago

Owner: changed from nobody to Barrett
Status: newassigned

comment:3 by Barrett, 3 years ago

Resolution: fixed
Status: assignedclosed

Applied in hrev50294. Thanks!

Note: See TracTickets for help on using tickets.