LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   gcc warning compiling C code (https://www.linuxquestions.org/questions/programming-9/gcc-warning-compiling-c-code-236644/)

vose 09-29-2004 09:37 AM

gcc warning compiling C code
 
What does "warning: `or' of unmatched not-equal tests is always 1" mean?
That is the warning generated by gcc.

In particular, what is "always 1" or "unmatched" about

if ( (!((x>>(BITS*i))&MASK)) || (((x>>(BITS*i))&MASK) == MASK) ) {
if (d) h++;
else nh++;
} else {
if (d) f++;
else nf++;
}

itsme86 09-29-2004 10:10 AM

I assume it's because of what BITS or MASK are set to. What's the rest of that function look like? And what are BITS and MASK set to?

vose 09-29-2004 10:58 AM

Yep, that was it. I naively supposed there was something "unmatched"; that threw me off.

Thanks


All times are GMT -5. The time now is 09:06 PM.