[Ns-bugs] [Bug 1132] useless for loops in block-ack-test-suite.cc

code@nsnam.ece.gatech.edu code at nsnam.ece.gatech.edu
Wed May 11 06:22:35 PDT 2011


https://www.nsnam.org/bugzilla/show_bug.cgi?id=1132

--- Comment #4 from Nicola Baldo <nbaldo at cttc.es> 2011-05-11 09:22:35 EDT ---
(In reply to comment #3)
> Hi Nicola...Yes,of course those semi-colons are errors...however now i note in
> ns-3-dev your changes:
> 
> for (i = m_buffer.begin (); i != m_buffer.end () &&
> QosUtilsMapSeqControlToUniqueInteger ((*i), endSeq) < mappedSeq; i++)
>   {
>     ;
>   }
> 
> {
>   m_buffer.insert (i, receivedSeq);
> }
> 
> an the same for the other loop...this is obviously wrong...Is this only a way
> to pass tests? However i'll investigate ASAP.

The no-op block
{
  ;
}
was added automatically by check-style.py to replace the single ";" at the end
of the "for" line. I didn't do any manual change. Functionally, they are
equivalent. 

The patch that I attached above aims at removing the no-op block (which is
equivalent to removing the ";" on the "for" line in the original code). But
with this patch, the test doesn't pass. Hence I think there is an error in the
test.

-- 
Configure bugmail: https://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the Ns-bugs mailing list