Silence additional compiler warnings about lack of return value

This commit is contained in:
Tom Henderson
2022-05-14 21:45:22 -07:00
parent 215f83f9ec
commit 9fbb26f04f
6 changed files with 10 additions and 1 deletions

View File

@@ -430,6 +430,8 @@ EmuFdNetDeviceHelper::CreateFileDescriptor (void) const
}
NS_FATAL_ERROR ("Did not get the raw socket from the socket creator");
}
NS_FATAL_ERROR ("Should be unreachable");
return 0; // Silence compiler warning about lack of return value
}
} // namespace ns3

View File

@@ -399,7 +399,8 @@ TapFdNetDeviceHelper::CreateFileDescriptor (void) const
}
NS_FATAL_ERROR ("Did not get the raw socket from the socket creator");
}
NS_FATAL_ERROR ("Should be unreachable");
return 0; // Silence compiler warning about lack of return value
}
} // namespace ns3

View File

@@ -580,6 +580,7 @@ TcpTxBuffer::GetPacketFromList (PacketList &list, const SequenceNumber32 &listSt
}
NS_FATAL_ERROR ("This point is not reachable");
return nullptr; // Silence compiler warning about lack of return value
}
void

View File

@@ -158,6 +158,7 @@ LteStatsCalculator::FindImsiFromEnbRlcPath (std::string path)
{
NS_FATAL_ERROR ("Lookup " << ueMapPath << " got no matches");
}
return 0; // Silence compiler warning about lack of return value
}
uint64_t
@@ -205,6 +206,7 @@ LteStatsCalculator::FindImsiFromLteNetDevice (std::string path)
{
NS_FATAL_ERROR ("Lookup " << path << " got no matches");
}
return 0; // Silence compiler warning about lack of return value
}
uint16_t
@@ -227,6 +229,7 @@ LteStatsCalculator::FindCellIdFromEnbRlcPath (std::string path)
{
NS_FATAL_ERROR ("Lookup " << enbNetDevicePath << " got no matches");
}
return 0; // Silence compiler warning about lack of return value
}
uint64_t

View File

@@ -171,6 +171,7 @@ PhyEntity::GetNextField (WifiPpduField currentField, WifiPreamble preamble) cons
{
NS_FATAL_ERROR ("Unsupported preamble " << preamble << " for the provided PPDU formats");
}
return WifiPpduField::WIFI_PPDU_FIELD_PREAMBLE; // Silence compiler warning
}
Time

View File

@@ -246,6 +246,7 @@ GetTid (Ptr<const Packet> packet, const WifiMacHeader hdr)
{
NS_FATAL_ERROR ("Packet has no Traffic ID");
}
return 0; // Silence compiler warning about lack of return value
}
uint8_t