Fix compiler warnings

This commit is contained in:
Alex
2023-04-23 07:02:24 +03:00
parent a73a49094c
commit fcbb298077
50 changed files with 232 additions and 192 deletions

View File

@ -190,6 +190,7 @@ namespace NetworkARP
bool ARP::OnEthernetPacketReceived(uint8_t *Data, uint64_t Length)
{
UNUSED(Length);
netdbg("Received packet");
ARPHeader *Header = (ARPHeader *)Data;

View File

@ -155,6 +155,8 @@ namespace NetworkDHCP
void DHCP::OnUDPPacketReceived(NetworkUDP::Socket *Socket, uint8_t *Data, uint64_t Length)
{
UNUSED(Socket);
UNUSED(Length);
DHCPHeader *Packet = (DHCPHeader *)Data;
uint8_t *MessageType = (uint8_t *)GetOption(Packet, DHCP_OPTION_MESSAGE_TYPE);

View File

@ -62,6 +62,16 @@ namespace NetworkICMPv6
ICMPv6::ICMPv6(NetworkInterfaceManager::DeviceInterface *Interface) { this->Interface = Interface; }
ICMPv6::~ICMPv6() {}
void ICMPv6::Send(uint8_t *Data, uint64_t Length) { fixme("Unimplemented"); }
void ICMPv6::Receive(uint8_t *Data) { fixme("Unimplemented"); }
void ICMPv6::Send(uint8_t *Data, uint64_t Length)
{
UNUSED(Data);
UNUSED(Length);
fixme("Unimplemented");
}
void ICMPv6::Receive(uint8_t *Data)
{
UNUSED(Data);
fixme("Unimplemented");
}
}

View File

@ -144,8 +144,8 @@ namespace NetworkInterfaceManager
- 0.ro.pool.ntp.org ( {86, 127, 71, 168} )
- time-a-g.nist.gov ( {129, 6, 15, 28} )
*/
InternetProtocol ip = {.v4 = {.Address = {129, 6, 15, 28}},
.v6 = {.Address = {}}};
// InternetProtocol ip = {.v4 = {.Address = {129, 6, 15, 28}},
// .v6 = {.Address = {}}};
// NetworkUDP::Socket *NTP_Socket = udp->Connect(ip, 123);
// NetworkNTP::NTP *ntp = new NetworkNTP::NTP(NTP_Socket);
// udp->Bind(NTP_Socket, ntp);
@ -170,12 +170,20 @@ namespace NetworkInterfaceManager
ReadFSFunction(NetRead)
{
UNUSED(node);
UNUSED(Offset);
UNUSED(Size);
UNUSED(Buffer);
fixme("Not implemented.");
return Size;
}
WriteFSFunction(NetWrite)
{
UNUSED(node);
UNUSED(Offset);
UNUSED(Size);
UNUSED(Buffer);
fixme("Not implemented.");
return Size;
}
@ -224,7 +232,11 @@ namespace NetworkInterfaceManager
re->OnInterfaceReceived(Interface, Data, Length);
}
Events::Events(DeviceInterface *Interface) { RegisteredEvents.push_back(this); }
Events::Events(DeviceInterface *Interface)
{
UNUSED(Interface);
RegisteredEvents.push_back(this);
}
Events::~Events()
{

View File

@ -24,6 +24,8 @@ namespace NetworkNTP
{
void NTP::OnUDPPacketReceived(NetworkUDP::Socket *Socket, uint8_t *Data, uint64_t Length)
{
UNUSED(Socket);
UNUSED(Length);
this->NTPPacket = *(NTPHeader *)Data;
this->TimeReceived = true;
netdbg("Received UDP packet for NTP.");

View File

@ -65,12 +65,14 @@ namespace NetworkUDP
Socket *UDP::Listen(uint16_t Port)
{
UNUSED(Port);
fixme("Not implemented.");
return nullptr;
}
void UDP::Disconnect(Socket *Socket)
{
UNUSED(Socket);
fixme("Not implemented.");
}