Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1207 clang warnings ( coding glitch ? )

v4.2.0
closed
David Ashley
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

  • Enrico
    Enrico
    2013-11-15

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

     


Anonymous


Cancel   Add attachments