Bug 846 - packet.cc triggers deprecated warning
packet.cc triggers deprecated warning
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: core
ns-3-dev
All All
: P5 trivial
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-17 20:52 EDT by Quincy Tse
Modified: 2010-08-11 00:31 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch. (829 bytes, patch)
2010-03-17 21:11 EDT, Quincy Tse
Details | Diff
Proposed patch fixing the 1st instance. (826 bytes, patch)
2010-05-28 00:23 EDT, Quincy Tse
Details | Diff
Patch removing the 2nd instance (794 bytes, patch)
2010-05-28 00:23 EDT, Quincy Tse
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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