View | Details | Raw Unified | Return to bug 1868
Collapse All | Expand All

(-)a/src/core/model/int64x64.cc (-2 / +2 lines)
 Lines 35-41    Link Here 
35
  int64_t hi = absVal.GetHigh ();
35
  int64_t hi = absVal.GetHigh ();
36
36
37
  // Save stream format flags
37
  // Save stream format flags
38
  const std::streamsize precision = os.precision ();
38
  const std::size_t precision = static_cast<std::size_t> (os.precision ());
39
  std::ios_base::fmtflags ff = os.flags ();
39
  std::ios_base::fmtflags ff = os.flags ();
40
  const bool floatfield = os.flags () & std::ios_base::floatfield;
40
  const bool floatfield = os.flags () & std::ios_base::floatfield;
41
  os << std::setw (1) << std::noshowpos;
41
  os << std::setw (1) << std::noshowpos;
 Lines 47-53    Link Here 
47
47
48
48
49
  int64x64_t low(0, absVal.GetLow ());
49
  int64x64_t low(0, absVal.GetLow ());
50
  int places = 0;    // Number of decimal places printed so far
50
  std::size_t places = 0;    // Number of decimal places printed so far
51
  bool more = true;  // Should we print more digits?
51
  bool more = true;  // Should we print more digits?
52
52
53
#define HEXHILOW(hi, lo) \
53
#define HEXHILOW(hi, lo) \
(-)a/src/fd-net-device/model/fd-net-device.cc (-3 / +3 lines)
 Lines 288-294    Link Here 
288
///  instead of memcpy to add the PI header.
288
///  instead of memcpy to add the PI header.
289
///  It might be faster in this case to use memmove and avoid the extra mallocs.
289
///  It might be faster in this case to use memmove and avoid the extra mallocs.
290
static void
290
static void
291
AddPIHeader (uint8_t *&buf, ssize_t &len)
291
AddPIHeader (uint8_t *&buf, size_t &len)
292
{
292
{
293
  // Synthesize PI header for our friend the kernel
293
  // Synthesize PI header for our friend the kernel
294
  uint8_t *buf2 = (uint8_t*)malloc (len + 4);
294
  uint8_t *buf2 = (uint8_t*)malloc (len + 4);
 Lines 526-532    Link Here 
526
526
527
  NS_ASSERT_MSG (packet->GetSize () <= m_mtu, "FdNetDevice::SendFrom(): Packet too big " << packet->GetSize ());
527
  NS_ASSERT_MSG (packet->GetSize () <= m_mtu, "FdNetDevice::SendFrom(): Packet too big " << packet->GetSize ());
528
528
529
  ssize_t len =  (ssize_t) packet->GetSize ();
529
  size_t len =  (size_t)(packet->GetSize ());
530
  uint8_t *buffer = (uint8_t*)malloc (len);
530
  uint8_t *buffer = (uint8_t*)malloc (len);
531
  packet->CopyData (buffer, len);
531
  packet->CopyData (buffer, len);
532
532
 Lines 539-545    Link Here 
539
  ssize_t written = write (m_fd, buffer, len);
539
  ssize_t written = write (m_fd, buffer, len);
540
  free (buffer);
540
  free (buffer);
541
541
542
  if (written == -1 || written != len)
542
  if (written < 0 || (size_t)(written) != len)
543
    {
543
    {
544
      m_macTxDropTrace (packet);
544
      m_macTxDropTrace (packet);
545
      return false;
545
      return false;
(-)a/src/lte/model/lte-ue-phy.cc (-13 / +12 lines)
 Lines 728-734    Link Here 
728
{
728
{
729
  NS_LOG_FUNCTION (this);
729
  NS_LOG_FUNCTION (this);
730
730
731
732
  // apply transmission mode gain
731
  // apply transmission mode gain
733
  NS_ASSERT (m_transmissionMode < m_txModeGain.size ());
732
  NS_ASSERT (m_transmissionMode < m_txModeGain.size ());
734
  SpectrumValue newSinr = sinr;
733
  SpectrumValue newSinr = sinr;
 Lines 742-753    Link Here 
742
    {
741
    {
743
      cqi = m_amc->CreateCqiFeedbacks (newSinr, m_dlBandwidth);
742
      cqi = m_amc->CreateCqiFeedbacks (newSinr, m_dlBandwidth);
744
743
745
      int nLayer = TransmissionModesLayers::TxMode2LayerNum (m_transmissionMode);
744
      uint8_t nLayer = TransmissionModesLayers::TxMode2LayerNum (m_transmissionMode);
746
      int nbSubChannels = cqi.size ();
745
      std::size_t nbSubChannels = cqi.size ();
747
      double cqiSum = 0.0;
746
      double cqiSum = 0.0;
748
      int activeSubChannels = 0;
747
      uint32_t activeSubChannels = 0;
749
      // average the CQIs of the different RBs
748
      // average the CQIs of the different RBs
750
      for (int i = 0; i < nbSubChannels; i++)
749
      for (uint32_t i = 0; i < nbSubChannels; i++)
751
        {
750
        {
752
          if (cqi.at (i) != -1)
751
          if (cqi.at (i) != -1)
753
            {
752
            {
 Lines 761-767    Link Here 
761
      dlcqi.m_cqiType = CqiListElement_s::P10; // Peridic CQI using PUCCH wideband
760
      dlcqi.m_cqiType = CqiListElement_s::P10; // Peridic CQI using PUCCH wideband
762
      NS_ASSERT_MSG (nLayer > 0, " nLayer negative");
761
      NS_ASSERT_MSG (nLayer > 0, " nLayer negative");
763
      NS_ASSERT_MSG (nLayer < 3, " nLayer limit is 2s");
762
      NS_ASSERT_MSG (nLayer < 3, " nLayer limit is 2s");
764
      for (int i = 0; i < nLayer; i++)
763
      for (uint8_t i = 0; i < nLayer; i++)
765
        {
764
        {
766
          if (activeSubChannels > 0)
765
          if (activeSubChannels > 0)
767
            {
766
            {
 Lines 780-793    Link Here 
780
  else if (Simulator::Now () > m_a30CqiLast + m_a30CqiPeriocity)
779
  else if (Simulator::Now () > m_a30CqiLast + m_a30CqiPeriocity)
781
    {
780
    {
782
      cqi = m_amc->CreateCqiFeedbacks (newSinr, GetRbgSize ());
781
      cqi = m_amc->CreateCqiFeedbacks (newSinr, GetRbgSize ());
783
      int nLayer = TransmissionModesLayers::TxMode2LayerNum (m_transmissionMode);
782
      uint8_t nLayer = TransmissionModesLayers::TxMode2LayerNum (m_transmissionMode);
784
      int nbSubChannels = cqi.size ();
783
      std::size_t nbSubChannels = cqi.size ();
785
      int rbgSize = GetRbgSize ();
784
      uint8_t rbgSize = GetRbgSize ();
786
      double cqiSum = 0.0;
785
      double cqiSum = 0.0;
787
      int cqiNum = 0;
786
      uint8_t cqiNum = 0;
788
      SbMeasResult_s rbgMeas;
787
      SbMeasResult_s rbgMeas;
789
      //NS_LOG_DEBUG (this << " Create A30 CQI feedback, RBG " << rbgSize << " cqiNum " << nbSubChannels << " band "  << (uint16_t)m_dlBandwidth);
788
      //NS_LOG_DEBUG (this << " Create A30 CQI feedback, RBG " << (uint16_t) rbgSize << " cqiNum " << nbSubChannels << " band "  << (uint16_t)m_dlBandwidth);
790
      for (int i = 0; i < nbSubChannels; i++)
789
      for (uint32_t i = 0; i < nbSubChannels; i++)
791
        {
790
        {
792
          if (cqi.at (i) != -1)
791
          if (cqi.at (i) != -1)
793
            {
792
            {
 Lines 801-807    Link Here 
801
              //NS_LOG_DEBUG (this << " RBG CQI "  << (uint16_t) cqiSum / rbgSize);
800
              //NS_LOG_DEBUG (this << " RBG CQI "  << (uint16_t) cqiSum / rbgSize);
802
              HigherLayerSelected_s hlCqi;
801
              HigherLayerSelected_s hlCqi;
803
              hlCqi.m_sbPmi = 0; // not yet used
802
              hlCqi.m_sbPmi = 0; // not yet used
804
              for (int i = 0; i < nLayer; i++)
803
              for (uint8_t i = 0; i < nLayer; i++)
805
                {
804
                {
806
                  hlCqi.m_sbCqi.push_back ((uint16_t) cqiSum / rbgSize);
805
                  hlCqi.m_sbCqi.push_back ((uint16_t) cqiSum / rbgSize);
807
                }
806
                }
(-)a/src/stats/model/basic-data-calculators.h (-2 / +2 lines)
 Lines 160-170    Link Here 
160
        }
160
        }
161
      else
161
      else
162
        {
162
        {
163
          if (i < m_min)
163
          if (i - m_min < 0)
164
            {
164
            {
165
              m_min = i;
165
              m_min = i;
166
            }
166
            }
167
          if (i > m_max)
167
          if (i - m_max > 0)
168
            {
168
            {
169
              m_max = i;
169
              m_max = i;
170
            }
170
            }
(-)a/wscript (-1 / +1 lines)
 Lines 330-336    Link Here 
330
            if conf.check_compilation_flag('-march=native'):
330
            if conf.check_compilation_flag('-march=native'):
331
                env.append_value('CXXFLAGS', '-march=native') 
331
                env.append_value('CXXFLAGS', '-march=native') 
332
            env.append_value('CXXFLAGS', '-fstrict-overflow')
332
            env.append_value('CXXFLAGS', '-fstrict-overflow')
333
            if conf.env['CC_VERSION'] == cc_version_warn_strict_overflow:
333
            if conf.env['CC_VERSION'] >= cc_version_warn_strict_overflow:
334
                env.append_value('CXXFLAGS', '-Wstrict-overflow=5')
334
                env.append_value('CXXFLAGS', '-Wstrict-overflow=5')
335
335
336
        if sys.platform == 'win32':
336
        if sys.platform == 'win32':

Return to bug 1868