Bugzilla – Bug 846
packet.cc triggers deprecated warning
Last modified: 2010-08-11 00:31:34 EDT
During compilation, the following warnings were generated for packet.cc:
../src/common/packet.cc: In member function virtual bool ns3::PacketTest::DoRun():
../src/common/packet.cc:1113: warning: const uint8_t* ns3::Packet::PeekData() const is deprecated (declared at ../src/common/packet.cc:344)
../src/common/packet.cc:1273: warning: const uint8_t* ns3::Packet::PeekData() const is deprecated (declared at ../src/common/packet.cc:344)
Created attachment 795 [details]
The unit test routines used the deprecated function Packet::PeekData. I've changed the 1st occurrence to use CopyData.
The 2nd occurrence cannot be changed as it tests against a specific bug (#572) - now that PeekData is deprecated, do we still need the test case? Is CopyData prone to bug 572 or similar?
Created attachment 893 [details]
Proposed patch fixing the 1st instance.
Can someone review and apply this patch?
Created attachment 894 [details]
Patch removing the 2nd instance
In reply to my own comment at the start - given Packet::PeekData is now deprecated, there really are no reason to keep a test for it...