#1207 clang warnings ( coding glitch ? )

v4.2.0
closed
None
complete
1
2014-04-15
2013-11-15
Enrico
No

while compiling the current SVN pull under OS X mavericks XCODE 5.0.2
I get the following warnings

./extensions/platform/unix/rxunixsys/rxunixsys.cpp:814:21: warning: & has lower precedence than ==; == will be evaluated first
[-Wparentheses]
if (S_IFDIR & mystat.st_mode == S_IFDIR) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
... ... ...
}

my understanding of the coding is that it is meant to test for S_IFDIR
( along the lines of doing it in rexx if ( bitand(something,SOMEBITS) = SOMEBITS ) )

in this case I tend to believe that it should be written as
if (( S_IFDIR & mystat.st_mode ) == S_IFDIR)

best regards
Enrico

Discussion

  • David Ashley

    David Ashley - 2013-11-15
    • status: open --> pending
    • assigned_to: David Ashley
     
  • David Ashley

    David Ashley - 2013-11-15

    Fixed in SVN revision 9510. Thanks for reporting this.

     
  • Enrico

    Enrico - 2013-11-15

    wow :-) that was fast!
    Thank You for caring
    Cheers
    Enrico

     
  • Mark Miesfeld

    Mark Miesfeld - 2013-11-16
    • Group: None --> 4.1.4
     
  • Mark Miesfeld

    Mark Miesfeld - 2013-11-16

    Committed revision 9513. [r9513] 4.1 fixes

     

    Related

    Commit: [r9513]

  • Mark Miesfeld

    Mark Miesfeld - 2014-02-15
    • Pending work items: none --> complete
    • Group: 4.1.4 --> v4.2.0
     
  • Mark Miesfeld

    Mark Miesfeld - 2014-02-15

    In 4.2.0

     
  • Rick McGuire

    Rick McGuire - 2014-04-15
    • status: pending --> closed
     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks