Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Three minor fixes #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

larseggert
Copy link
Contributor

@larseggert larseggert commented Sep 5, 2024

  1. Fix the legacy ENV syntax in the Dockerfile.
  2. Remove an unused variable from DropRateErrorModel.
  3. Dynamically allocate new_p in QuicPacket::ReassemblePacket.

The latter fixes several of these warnings during the ns-3 compilation:

#18 80.41 [985/1050] Building CXX object scratch/CMakeFiles/scratch_blackhole_blackhole.dir/helper/quic-packet.cc.o
#18 80.41 In file included from /ns3/src/core/model/simple-ref-count.h:25,
#18 80.41                  from /ns3/src/core/model/attribute.h:23,
#18 80.41                  from /ns3/src/core/model/attribute-accessor-helper.h:22,
#18 80.41                  from /ns3/src/core/model/attribute-helper.h:23,
#18 80.41                  from /ns3/src/core/model/callback.h:24,
#18 80.41                  from /ns3/src/core/model/object-base.h:22,
#18 80.41                  from /ns3/out/include/ns3/object-base.h:1,
#18 80.41                  from /ns3/src/network/model/chunk.h:25,
#18 80.41                  from /ns3/src/network/model/header.h:24,
#18 80.41                  from /ns3/out/include/ns3/header.h:1,
#18 80.41                  from /ns3/scratch/helper/quic-packet.h:6,
#18 80.41                  from /ns3/scratch/helper/quic-packet.cc:4:
#18 80.41 In static member function ‘static void ns3::DefaultDeleter<T>::Delete(T*) [with T = ns3::Packet]’,
#18 80.41     inlined from ‘void ns3::SimpleRefCount<T, PARENT, DELETER>::Unref() const [with T = ns3::Packet; PARENT = ns3::Empty; DELETER = ns3::DefaultDeleter<ns3::Packet>]’ at /ns3/src/core/model/simple-ref-count.h:131:28,
#18 80.41     inlined from ‘ns3::Ptr<T>::~Ptr() [with T = ns3::Packet]’ at /ns3/src/core/model/ptr.h:693:21,
#18 80.41     inlined from ‘void QuicPacket::ReassemblePacket()’ at /ns3/scratch/helper/quic-packet.cc:84:18:
#18 80.41 /ns3/src/core/model/default-deleter.h:55:9: warning: ‘void operator delete(void*, std::size_t)’ called on unallocated object ‘new_p’ [-Wfree-nonheap-object]
#18 80.41    55 |         delete object;
#18 80.41       |         ^~~~~~~~~~~~~
#18 80.41 /ns3/scratch/helper/quic-packet.cc: In member function ‘void QuicPacket::ReassemblePacket()’:
#18 80.41 /ns3/scratch/helper/quic-packet.cc:72:12: note: declared here
#18 80.41    72 |     Packet new_p = Packet(udp_payload_.data(), udp_payload_.size());
#18 80.41       |            ^~~~~

1. Fix the legacy `ENV` syntax in the Dockerfile.
2. Remove an unused variable from `DropRateErrorModel`.
3. Dynamically allocate `new_packet` in `QuicPacket::ReassemblePacket`.

The latter fixes several these warnings during the ns-3 compilation:
```
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant