Bug 2128 - Compilation error on lte module in optimized mode
Compilation error on lte module in optimized mode
Status: RESOLVED DUPLICATE of bug 2143
Product: ns-3
Classification: Unclassified
Component: lte
pre-release
PC Linux
: P5 blocker
Assigned To: Nicola Baldo
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-05-28 10:01 UTC by natale.patriciello
Modified: 2015-07-10 04:25 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description natale.patriciello 2015-05-28 10:01:01 UTC
The error is:

Waf: Entering directory `/home/nat/Work/ns-3-dev-git/build'
[1557/2076] cxx: src/lte/model/epc-x2.cc -> build/src/lte/model/epc-x2.cc.1.o
In file included from ./ns3/epc-x2-header.h:24:0,
                 from ../src/lte/model/epc-x2.cc:27:
./ns3/epc-x2-sap.h: In member function ‘void ns3::EpcX2::RecvFromX2cSocket(ns3::Ptr<ns3::Socket>)’:
./ns3/epc-x2-sap.h:311:10: error: ‘params.ns3::EpcX2Sap::ResourceStatusUpdateParams::targetCellId’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   struct ResourceStatusUpdateParams
          ^
../src/lte/model/epc-x2.cc:350:52: note: ‘params.ns3::EpcX2Sap::ResourceStatusUpdateParams::targetCellId’ was declared here
           EpcX2SapUser::ResourceStatusUpdateParams params;

I used the following configure line (gcc version 5.1.0 (GCC)):

./waf configure --enable-examples --disable-gtk --disable-tests -d optimized

The problem is that "params.targetCellId" isn't initialized. A simple (but maybe wrong) patch is to add an initialization, for example:

  EpcX2SapUser::ResourceStatusUpdateParams params;
+ params.targetCellId = 0;
  params.enb1MeasurementId = x2ResStatUpdHeader.GetEnb1MeasurementId ();

With this patch, it compiles fine.
Comment 1 Nicola Baldo 2015-07-10 04:25:05 UTC

*** This bug has been marked as a duplicate of bug 2143 ***