Hello!

I'm checking all gcc -Wall reports. As before, some of the "suggest
parenthesis" warnings could be ignored, but there's also one in
stdlogicds.cpp which at first glance seems to be legitimate:

while (
    !isAborted() && // not aborted
    (getDSConfig()->fMaxItemsPerMessage==0 || 
itemcount<getDSConfig()->fMaxItemsPerMessage==0) && // max item count per 
message not reached or not active
    !fSessionP->outgoingMessageFull() && // message not full
    aNextMessageCommands.size()==0 // no commands already queued for next 
message
  ) {

error: suggest parentheses around comparison in operand of ==

That's for "itemcount<getDSConfig()->fMaxItemsPerMessage==0".
                                                        ^^^

Is the intended meaning really
"itemcount<(getDSConfig()->fMaxItemsPerMessage==0)" (comparison against
0 or 1, the current interpretation of the code) or is it
"itemcount<getDSConfig()->fMaxItemsPerMessage" (a normal comparison of
two counts)?

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



_______________________________________________
os-libsynthesis mailing list
[email protected]
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis

Reply via email to