From e42b3baae0b9c336e25cdaefe6fdb97e85bc9822 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Fri, 30 Jan 2015 11:34:38 -0800 Subject: [PATCH] fix possibly uninitialized variable warning --- src/wifi/model/mac-low.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wifi/model/mac-low.cc b/src/wifi/model/mac-low.cc index a43c80ffa..1fcd69b92 100644 --- a/src/wifi/model/mac-low.cc +++ b/src/wifi/model/mac-low.cc @@ -2246,10 +2246,11 @@ MacLow::RxCompleteBufferedPacketsWithSmallerSequence (uint16_t seq, Mac48Address uint16_t endSequence = ((*it).second.first.GetStartingSequence () + 2047) % 4096; uint16_t mappedStart = QosUtilsMapSeqControlToUniqueInteger (seq, endSequence); BufferedPacketI last = (*it).second.second.begin (); - uint16_t guard; + uint16_t guard = 0; if (last != (*it).second.second.end ()) - guard = (*it).second.second.begin ()->second.GetSequenceControl () & 0xfff0; - + { + guard = (*it).second.second.begin ()->second.GetSequenceControl () & 0xfff0; + } BufferedPacketI i = (*it).second.second.begin (); for (; i != (*it).second.second.end () && QosUtilsMapSeqControlToUniqueInteger ((*i).second.GetSequenceNumber (), endSequence) < mappedStart;)