ONME-3113: Fix GCC_ARM and ARM compiler warnings from mbed-mesh-api

Warning #1300-D: inherits implicit virtual
- Adding the virtual keyword in the derived class prevents the warning

Warning #1-D: last line of file ends without a newline
- New line added at the end of file

Warning #997-D:
function "MeshInterfaceNanostack::initialize(NanostackPhy *)" is hidden
by "ThreadInterface::initialize"  -- virtual function override intended?
- virtual keyword removed from "MeshInterfaceNanostack::initialize"

Warning #1300-D: inherits implicit virtual
- Adding the virtual keyword in the derived class prevents the warning
pull/4738/head
Kari Haapalehto 2017-06-30 14:45:33 +03:00 committed by Seppo Takalo
parent aae62bd990
commit f3c7e0dbc0
7 changed files with 15 additions and 15 deletions

View File

@ -34,9 +34,9 @@ public:
LoWPANNDInterface(NanostackRfPhy *phy) : MeshInterfaceNanostack(phy) { }
nsapi_error_t initialize(NanostackRfPhy *phy);
int connect();
int disconnect();
bool getOwnIpAddress(char *address, int8_t len);
virtual int connect();
virtual int disconnect();
virtual bool getOwnIpAddress(char *address, int8_t len);
bool getRouterIpAddress(char *address, int8_t len);
private:
mesh_error_t init();

View File

@ -32,7 +32,7 @@ public:
*
* @return 0 on success, negative on failure
*/
virtual nsapi_error_t initialize(NanostackPhy *phy);
nsapi_error_t initialize(NanostackPhy *phy);
/** Start the interface
*

View File

@ -27,9 +27,9 @@ public:
NanostackEthernetInterface(NanostackEthernetPhy *phy) : MeshInterfaceNanostack(phy) { }
nsapi_error_t initialize(NanostackEthernetPhy *phy);
int connect();
int disconnect();
bool getOwnIpAddress(char *address, int8_t len);
virtual int connect();
virtual int disconnect();
virtual bool getOwnIpAddress(char *address, int8_t len);
bool getRouterIpAddress(char *address, int8_t len);
};

View File

@ -34,8 +34,8 @@ public:
ThreadInterface(NanostackRfPhy *phy) : MeshInterfaceNanostack(phy) { }
nsapi_error_t initialize(NanostackRfPhy *phy);
int connect();
int disconnect();
virtual int connect();
virtual int disconnect();
private:
/*
* \brief Initialization of the interface.
@ -69,7 +69,7 @@ private:
* \param len is the length of the address buffer, must be at least 40 bytes
* \return true if address is read successfully, false otherwise
*/
bool getOwnIpAddress(char *address, int8_t len);
virtual bool getOwnIpAddress(char *address, int8_t len);
};
#endif // THREADINTERFACE_H
#endif // THREADINTERFACE_H

View File

@ -124,4 +124,4 @@ bool LoWPANNDInterface::getRouterIpAddress(char *address, int8_t len)
return true;
}
return false;
}
}

View File

@ -32,4 +32,4 @@ int8_t enet_tasklet_get_ip_address(char *address, int8_t len);
}
#endif
#endif // ENET_TASKLET_H
#endif // ENET_TASKLET_H

View File

@ -27,12 +27,12 @@ public:
* @return Device driver ID or a negative error
* code on failure
*/
int8_t phy_register() { return rf_register();}
virtual int8_t phy_register() { return rf_register();}
/** Unregister this physical interface
*
*/
void unregister() { rf_unregister(); }
virtual void unregister() { rf_unregister(); }
};
#endif /* NANOSTACK_RF_PHY_H_ */