Bug 846

Summary: packet.cc triggers deprecated warning
Product: ns-3 Reporter: Quincy Tse <quincy.tse>
Component: coreAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: trivial CC: jpelkey
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: Proposed patch.
Proposed patch fixing the 1st instance.
Patch removing the 2nd instance

Description Quincy Tse 2010-03-17 20:52:47 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)
Comment 1 Quincy Tse 2010-03-17 21:11:30 EDT
Created attachment 795 [details]
Proposed patch.

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?
Comment 2 Quincy Tse 2010-05-28 00:23:01 EDT
Created attachment 893 [details]
Proposed patch fixing the 1st instance.

Can someone review and apply this patch?
Comment 3 Quincy Tse 2010-05-28 00:23:24 EDT
Created attachment 894 [details]
Patch removing the 2nd instance
Comment 4 Quincy Tse 2010-05-28 00:24:48 EDT
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...
Comment 5 Josh Pelkey 2010-08-11 00:31:34 EDT
changeset: 487146fc889e