[haiku-bugs] [Haiku] #6253: Typo in src/kits/tracker/AttributeStream.h

  • From: "kaliber" <trac@xxxxxxxxxxxx>
  • Date: Fri, 02 Jul 2010 19:38:23 -0000

#6253: Typo in src/kits/tracker/AttributeStream.h
--------------------------------+-------------------------------------------
 Reporter:  kaliber             |       Owner:  axeld         
     Type:  bug                 |      Status:  new           
 Priority:  normal              |   Milestone:  R1            
Component:  Kits/Interface Kit  |     Version:  R1/Development
 Keywords:  clang               |   Blockedby:                
    Patch:  0                   |    Platform:  All           
 Blocking:                      |  
--------------------------------+-------------------------------------------
 Looks like it should be a comparison instead of assignment.

 {{{
 src/kits/tracker/AttributeStream.h:399:46: warning: using the result of an
 assignment as a condition without parentheses [-Wparentheses]
         if (strcmp(fAttr.Name(), name) == 0 && type = fAttr.Type())
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
 src/kits/tracker/AttributeStream.h:399:46: note: use '==' to turn this
 assignment into an equality comparison
         if (strcmp(fAttr.Name(), name) == 0 && type = fAttr.Type())
                                                     ^
                                                     ==
 src/kits/tracker/AttributeStream.h:399:46: note: place parentheses around
 the assignment to silence this warning
         if (strcmp(fAttr.Name(), name) == 0 && type = fAttr.Type())
                                                     ^
             (                                                     )

 }}}

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

Other related posts: