Skip to content

Commit

Permalink
Hotfix: Fixes some warnings and compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zzudongxiang committed Nov 3, 2024
1 parent 3b098c6 commit 9ad27e5
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/point-to-point/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ build_lib(
SOURCE_FILES
${mpi_sources}
helper/point-to-point-helper.cc
model/point-to-point-remote-channel.cc
model/cn-header.cc
model/nvswitch-node.cc
model/pause-header.cc
Expand All @@ -43,7 +42,6 @@ build_lib(
${mpi_headers}
helper/point-to-point-helper.h
helper/sim-setting.h
model/point-to-point-remote-channel.h
model/cn-header.h
model/nvswitch-node.h
model/pause-header.h
Expand Down
4 changes: 2 additions & 2 deletions src/point-to-point/helper/qbb-helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ QbbHelper::GetTraceFromPacket(TraceFormat& tr,
Ptr<QbbNetDevice> dev,
Ptr<const Packet> p,
uint32_t qidx,
Event event,
EventEnum event,
bool hasL2)
{
CustomHeader hdr((hasL2 ? CustomHeader::L2_Header : 0) | CustomHeader::L3_Header |
Expand Down Expand Up @@ -409,7 +409,7 @@ QbbHelper::PacketEventCallback(FILE* file,
Ptr<QbbNetDevice> dev,
Ptr<const Packet> p,
uint32_t qidx,
Event event,
EventEnum event,
bool hasL2)
{
TraceFormat tr;
Expand Down
4 changes: 2 additions & 2 deletions src/point-to-point/helper/qbb-helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ class QbbHelper : public PcapHelperForDevice, public AsciiTraceHelperForDevice
Ptr<QbbNetDevice>,
Ptr<const Packet> p,
uint32_t qidx,
Event event,
EventEnum event,
bool hasL2);
static void PacketEventCallback(FILE* file,
Ptr<QbbNetDevice>,
Ptr<const Packet>,
uint32_t qidx,
Event event,
EventEnum event,
bool hasL2);
static void MacRxDetailCallback(FILE* file, Ptr<QbbNetDevice>, Ptr<const Packet> p);
static void EnqueueDetailCallback(FILE* file,
Expand Down
3 changes: 1 addition & 2 deletions src/point-to-point/helper/sim-setting.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class SimSetting
// write port_speed
uint32_t len = 0;
for (auto i : port_speed)
for (auto j : i.second)
len++;
len += i.second.size();
fwrite(&len, sizeof(len), 1, file);
for (auto i : port_speed)
for (auto j : i.second)
Expand Down
4 changes: 2 additions & 2 deletions src/point-to-point/model/rdma-hw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ RdmaHw::UpdateRateHp(Ptr<RdmaQueuePair> qp, Ptr<Packet> p, CustomHeader& ch, boo
}

DataRate new_rate;
int32_t new_incStage;
int32_t new_incStage = 0;
DataRate new_rate_per_hop[IntHeader::maxHop];
int32_t new_incStage_per_hop[IntHeader::maxHop];
if (!m_multipleRate)
Expand Down Expand Up @@ -1741,7 +1741,7 @@ RdmaHw::UpdateRateHpPint(Ptr<RdmaQueuePair> qp, Ptr<Packet> p, CustomHeader& ch,
double U = Pint::decode_u(ih.GetPower());

DataRate new_rate;
int32_t new_incStage;
int32_t new_incStage = 0;
double max_c = U / m_targetUtil;

if (max_c >= 1 || qp->hpccPint.m_incStage >= m_miThresh)
Expand Down
4 changes: 2 additions & 2 deletions src/point-to-point/model/trace-format.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace ns3
{

enum Event
enum EventEnum
{
Recv = 0,
Enqu = 1,
Expand Down Expand Up @@ -94,7 +94,7 @@ struct TraceFormat
};

static inline const char*
EventToStr(enum Event e)
EventToStr(enum EventEnum e)
{
switch (e)
{
Expand Down

0 comments on commit 9ad27e5

Please sign in to comment.