[haiku-bugs] [Haiku] #12742: [Patch] MediaJack.cpp: fix gcc6 build

  • From: "mt" <trac@xxxxxxxxxxxx>
  • Date: Mon, 02 May 2016 08:52:56 -0000

#12742: [Patch] MediaJack.cpp: fix gcc6 build
---------------------------------+------------------------------
 Reporter:  mt                   |        Owner:  nobody
     Type:  bug                  |       Status:  new
 Priority:  normal               |    Milestone:  Unscheduled
Component:  Applications/Cortex  |      Version:  R1/Development
 Keywords:                       |   Blocked By:
 Blocking:                       |  Has a Patch:  0
 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


 }}}

--
Ticket URL: <https://dev.haiku-os.org/ticket/12742>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: