Bug 633: wimax doesn't compile in optimized mode
authorFaker Moatamri <faker.moatamri@sophia.inria.fr>
Tue Aug 04 09:41:03 2009 -0400 (6 months ago)
changeset 45397ff2ecfe943c
parent 4538 9d68322b34b8
child 4540 cbf953af4e56
Bug 633: wimax doesn't compile in optimized mode
examples/simple-wimax.cc
src/applications/UdpClientServer/udpServer.cc
src/devices/wimax/IPCS_BS_Packet_classifier.cc
src/devices/wimax/IPCS_SS_Packet_classifier.cc
src/devices/wimax/bs-link-manager.cc
src/devices/wimax/connection-identifier-factory.cc
src/devices/wimax/ofdm-wimax-phy.cc
src/devices/wimax/qos-parameter-set.h
src/devices/wimax/simpleOfdmWimaxPhy.cc
src/devices/wimax/wimax-bs-net-device.cc
src/devices/wimax/wimax-ofdm-phy/packetCreator.cpp
     1.1 --- a/examples/simple-wimax.cc	Tue Aug 04 09:19:32 2009 -0400
     1.2 +++ b/examples/simple-wimax.cc	Tue Aug 04 09:41:03 2009 -0400
     1.3 @@ -62,6 +62,8 @@
     1.4        return (char*)"NOT FOUND!";
     1.5        break;
     1.6    }
     1.7 +  //this line is never reached but it is here to support compiling under gcc 4.0.4
     1.8 +  return 0;
     1.9  }
    1.10  
    1.11  void
     2.1 --- a/src/applications/UdpClientServer/udpServer.cc	Tue Aug 04 09:19:32 2009 -0400
     2.2 +++ b/src/applications/UdpClientServer/udpServer.cc	Tue Aug 04 09:41:03 2009 -0400
     2.3 @@ -101,11 +101,10 @@
     2.4        {
     2.5          if (InetSocketAddress::IsMatchingType(from))
     2.6            {
     2.7 -            uint32_t * sequence_number = (uint32_t *) (packet->PeekData());
     2.8              InetSocketAddress address = InetSocketAddress::ConvertFrom(from);
     2.9              NS_LOG_INFO("Received " << packet->GetSize() << " bytes from "
    2.10                  << address.GetIpv4() << " Sequence Number: "
    2.11 -                << *sequence_number << std::endl);
    2.12 +                << (uint32_t *) (packet->PeekData()) << std::endl);
    2.13              packet->RemoveAllPacketTags();
    2.14              packet->RemoveAllByteTags();
    2.15            }
     3.1 --- a/src/devices/wimax/IPCS_BS_Packet_classifier.cc	Tue Aug 04 09:19:32 2009 -0400
     3.2 +++ b/src/devices/wimax/IPCS_BS_Packet_classifier.cc	Tue Aug 04 09:41:03 2009 -0400
     3.3 @@ -188,8 +188,8 @@
     3.4      Ipv4Header IPV4_Header;
     3.5      UdpHeader UDP_Header;
     3.6      TcpHeader TCP_Header;
     3.7 -    uint16_t source_port;
     3.8 -    uint16_t dest_port;
     3.9 +    uint16_t source_port = 0;
    3.10 +    uint16_t dest_port = 0;
    3.11      SSRecord *my_ssRecord;
    3.12      SSRecord *ssRecord;
    3.13      Mac48Address destMac;
     4.1 --- a/src/devices/wimax/IPCS_SS_Packet_classifier.cc	Tue Aug 04 09:19:32 2009 -0400
     4.2 +++ b/src/devices/wimax/IPCS_SS_Packet_classifier.cc	Tue Aug 04 09:41:03 2009 -0400
     4.3 @@ -68,8 +68,8 @@
     4.4      Ipv4Header IPV4_Header;
     4.5      UdpHeader UDP_Header;
     4.6      TcpHeader TCP_Header;
     4.7 -    uint16_t source_port;
     4.8 -    uint16_t dest_port;
     4.9 +    uint16_t source_port = 0;
    4.10 +    uint16_t dest_port = 0;
    4.11      std::cout << "\tIPCS-Packet-Classifier: " << std::endl;
    4.12      std::cout << "\t\tRetrieving parameters from packet:" << std::endl;
    4.13      Ptr<Packet> C_Packet = packet->Copy();
     5.1 --- a/src/devices/wimax/bs-link-manager.cc	Tue Aug 04 09:19:32 2009 -0400
     5.2 +++ b/src/devices/wimax/bs-link-manager.cc	Tue Aug 04 09:41:03 2009 -0400
     5.3 @@ -129,12 +129,10 @@
     5.4          rngrsp.SetInitRangOppNumber(m_bs->GetRangingOppNumber());
     5.5  
     5.6          //not needed actually, m_rangingOppNumber serves the purpose. will not be an integer due to transmission delay
     5.7 -        double curRangingOpp = ((Simulator::Now()
     5.8 -            - m_bs->GetUlSubframeStartTime()).GetSeconds()
     5.9 -            / (m_bs->GetRangReqOppSize()
    5.10 -                * m_bs->GetSymbolDuration().GetSeconds())) + 1;
    5.11 -        uint8_t curRangingOppNumber = (uint8_t) curRangingOpp;
    5.12 -        NS_ASSERT(m_bs->GetRangingOppNumber() == curRangingOppNumber);//temp
    5.13 +        NS_ASSERT(m_bs->GetRangingOppNumber() == (uint8_t)(((Simulator::Now()
    5.14 +        - m_bs->GetUlSubframeStartTime()).GetSeconds()
    5.15 +        / (m_bs->GetRangReqOppSize()
    5.16 +            * m_bs->GetSymbolDuration().GetSeconds())) + 1));//temp
    5.17  
    5.18          SetParametersToAdjust(&rngrsp);
    5.19          rngrsp.SetRangStatus(WimaxNetDevice::RANGING_STATUS_CONTINUE); //see Figure 64
     6.1 --- a/src/devices/wimax/connection-identifier-factory.cc	Tue Aug 04 09:19:32 2009 -0400
     6.2 +++ b/src/devices/wimax/connection-identifier-factory.cc	Tue Aug 04 09:41:03 2009 -0400
     6.3 @@ -69,7 +69,7 @@
     6.4    WimaxConnection::ConnectionType
     6.5    ConnectionIdentifierFactory::GetCidType(Ptr<const ConnectionIdentifier> cid) const
     6.6    {
     6.7 -    WimaxConnection::ConnectionType type;
     6.8 +    WimaxConnection::ConnectionType type = WimaxConnection::CONNECTION_TYPE_UNINITIALIZED;//initialize the variable for compiling in optimized mode
     6.9      uint16_t identifier = cid->GetIdentifier();
    6.10  
    6.11      if (identifier == ConnectionIdentifier::CID_INITIAL_RANGING)
     7.1 --- a/src/devices/wimax/ofdm-wimax-phy.cc	Tue Aug 04 09:19:32 2009 -0400
     7.2 +++ b/src/devices/wimax/ofdm-wimax-phy.cc	Tue Aug 04 09:41:03 2009 -0400
     7.3 @@ -504,7 +504,7 @@
     7.4    uint32_t
     7.5    OfdmWimaxPhy::GetFecBlockSize(WimaxPhy::ModulationType modulationType) const
     7.6    {
     7.7 -    uint32_t blockSize;
     7.8 +    uint32_t blockSize = 0;
     7.9      switch (modulationType)
    7.10        {
    7.11      case MODULATION_TYPE_BPSK_12:
     8.1 --- a/src/devices/wimax/qos-parameter-set.h	Tue Aug 04 09:19:32 2009 -0400
     8.2 +++ b/src/devices/wimax/qos-parameter-set.h	Tue Aug 04 09:41:03 2009 -0400
     8.3 @@ -22,6 +22,7 @@
     8.4  #define QOS_PARAMETER_SET_H
     8.5  
     8.6  #include <stdint.h>
     8.7 +#include <iostream>
     8.8  #include "ns3/buffer.h"
     8.9  
    8.10  namespace ns3
     9.1 --- a/src/devices/wimax/simpleOfdmWimaxPhy.cc	Tue Aug 04 09:19:32 2009 -0400
     9.2 +++ b/src/devices/wimax/simpleOfdmWimaxPhy.cc	Tue Aug 04 09:41:03 2009 -0400
     9.3 @@ -823,7 +823,7 @@
     9.4    uint32_t
     9.5    simpleOfdmWimaxPhy::GetFecBlockSize(WimaxPhy::ModulationType modulationType) const
     9.6    {
     9.7 -    uint32_t blockSize;
     9.8 +    uint32_t blockSize = 0;
     9.9      switch (modulationType)
    9.10        {
    9.11      case MODULATION_TYPE_BPSK_12:
    10.1 --- a/src/devices/wimax/wimax-bs-net-device.cc	Tue Aug 04 09:19:32 2009 -0400
    10.2 +++ b/src/devices/wimax/wimax-bs-net-device.cc	Tue Aug 04 09:41:03 2009 -0400
    10.3 @@ -424,7 +424,7 @@
    10.4        uint16_t protocolNumber)
    10.5    {
    10.6      Ptr<PacketBurst> burst = Create<PacketBurst> ();
    10.7 -    ServiceFlow *serviceFlow;
    10.8 +    ServiceFlow *serviceFlow = 0;
    10.9  
   10.10      //drop packet if no SS registered with BS, the destination SS is not yet registered or if queue is full
   10.11  
    11.1 --- a/src/devices/wimax/wimax-ofdm-phy/packetCreator.cpp	Tue Aug 04 09:19:32 2009 -0400
    11.2 +++ b/src/devices/wimax/wimax-ofdm-phy/packetCreator.cpp	Tue Aug 04 09:41:03 2009 -0400
    11.3 @@ -44,7 +44,7 @@
    11.4  bool PacketCreator::nextPacket(bvec& output){
    11.5  /// method to extract the next packet from the file. Successive calls of this method will result in different packets.
    11.6  /// return value will be 0 if there are no more packets in the file.
    11.7 -int cicleEnd; 
    11.8 +int cicleEnd = 0; 
    11.9  bool isValid;
   11.10  
   11.11  if (bytesLeftToRead >= packetSizeBytes){ // there are more bytes left in the file than the packet size