1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Fix -Wextra compiler warnings. (#184)

* Fix -Wextra compiler warnings.

Fix #183.

Signed-off-by: Kyle Fazzari <github@status.e4ward.com>

* Comment out unused parameters.

This is done everywhere possible instead of using Internals::unused().
Note that this involved moving some implementations into the
corresponding .cpp file.

Signed-off-by: Kyle Fazzari <github@status.e4ward.com>

* Fix warnings in tests as well.

Signed-off-by: Kyle Fazzari <github@status.e4ward.com>

* Leave IPv4Reassembler alone, it's growing.

Signed-off-by: Kyle Fazzari <github@status.e4ward.com>
This commit is contained in:
Kyle Fazzari
2017-01-25 13:26:11 -08:00
committed by Matias Fontanini
parent 94e5ac2109
commit a71a3d29ff
34 changed files with 80 additions and 53 deletions

View File

@@ -353,7 +353,7 @@ public:
*/
template<typename T>
const T* find_pdu(PDUType type = T::pdu_flag) const {
return const_cast<PDU*>(this)->find_pdu<T>();
return const_cast<PDU*>(this)->find_pdu<T>(type);
}
/**
@@ -381,7 +381,7 @@ public:
*/
template<typename T>
const T& rfind_pdu(PDUType type = T::pdu_flag) const {
return const_cast<PDU*>(this)->rfind_pdu<T>();
return const_cast<PDU*>(this)->rfind_pdu<T>(type);
}
/**
@@ -433,9 +433,7 @@ public:
* \param ptr The pointer to the buffer.
* \param total_sz The size of the buffer.
*/
virtual bool matches_response(const uint8_t* ptr, uint32_t total_sz) const {
return false;
}
virtual bool matches_response(const uint8_t* ptr, uint32_t total_sz) const;
/**
* \brief Check whether this PDU matches the specified flag.
@@ -485,7 +483,7 @@ protected:
*
* \param parent The parent PDU.
*/
virtual void prepare_for_serialize(const PDU* parent) { }
virtual void prepare_for_serialize(const PDU* parent);
/**
* \brief Serializes this PDU and propagates this action to child PDUs.