Clang -Wall -Wextra cleanups
This commit is contained in:
parent
4ce0bf73ea
commit
c01cd08b86
@ -168,7 +168,7 @@ void Appliance::RlpDerigsterVector()
|
|||||||
* @brief Appliance::SdtReceiver
|
* @brief Appliance::SdtReceiver
|
||||||
* @param rlp
|
* @param rlp
|
||||||
*/
|
*/
|
||||||
void Appliance::SdtReceiver(std::shared_ptr<RLP::Pdu> rlp)
|
void Appliance::SdtReceiver(__attribute__((unused)) std::shared_ptr<RLP::Pdu> rlp)
|
||||||
{
|
{
|
||||||
/// TODO: handle SDT
|
/// TODO: handle SDT
|
||||||
}
|
}
|
||||||
@ -178,7 +178,7 @@ void Appliance::SdtReceiver(std::shared_ptr<RLP::Pdu> rlp)
|
|||||||
* @brief Appliance::DmpReceiver
|
* @brief Appliance::DmpReceiver
|
||||||
* @param rlp
|
* @param rlp
|
||||||
*/
|
*/
|
||||||
void Appliance::DmpReceiver(std::shared_ptr<RLP::Pdu> rlp)
|
void Appliance::DmpReceiver(__attribute__((unused)) std::shared_ptr<RLP::Pdu> rlp)
|
||||||
{
|
{
|
||||||
/// TODO: DMP in root
|
/// TODO: DMP in root
|
||||||
}
|
}
|
||||||
|
@ -38,9 +38,9 @@ namespace ACN {
|
|||||||
class Component {
|
class Component {
|
||||||
public:
|
public:
|
||||||
Component(UUID::uuid cid = UUID::uuid())
|
Component(UUID::uuid cid = UUID::uuid())
|
||||||
: cid_(cid)
|
: fctn_(std::string("libESTA ACN Component"))
|
||||||
, fctn_(std::string("libESTA ACN Component"))
|
, uacn_(std::string())
|
||||||
, uacn_(std::string())
|
, cid_(cid)
|
||||||
{};
|
{};
|
||||||
|
|
||||||
const UUID::uuid cid() const { return cid_; }
|
const UUID::uuid cid() const { return cid_; }
|
||||||
|
@ -53,7 +53,7 @@ Pdu::~Pdu()
|
|||||||
* @brief Pdu::vector
|
* @brief Pdu::vector
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
const uint32_t Pdu::vector()
|
uint32_t Pdu::vector()
|
||||||
{
|
{
|
||||||
if (flags_.hasVector)
|
if (flags_.hasVector)
|
||||||
return vector_;
|
return vector_;
|
||||||
@ -172,7 +172,7 @@ void Pdu::iStream(Stream stream)
|
|||||||
|
|
||||||
// length includes the flags, length, and vector.
|
// length includes the flags, length, and vector.
|
||||||
// the remainder of the length of header and data
|
// the remainder of the length of header and data
|
||||||
int hd_length = length - (flags_.hasLength ? 3 : 2) - vector_size_;
|
uint hd_length = length - (flags_.hasLength ? 3 : 2) - vector_size_;
|
||||||
|
|
||||||
// abort if the remaining PDU length isn't available
|
// abort if the remaining PDU length isn't available
|
||||||
if (!stream->good() || stream->available() < hd_length) {
|
if (!stream->good() || stream->available() < hd_length) {
|
||||||
@ -188,7 +188,7 @@ void Pdu::iStream(Stream stream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// fast-forward the input stream
|
// fast-forward the input stream
|
||||||
for (int i = 0; i < hd_length; i++)
|
for (uint i = 0; i < hd_length; i++)
|
||||||
stream->get();
|
stream->get();
|
||||||
if (!stream->available())
|
if (!stream->available())
|
||||||
stream->setstate(std::ios_base::eofbit);
|
stream->setstate(std::ios_base::eofbit);
|
||||||
|
@ -85,7 +85,7 @@ public:
|
|||||||
~Pdu();
|
~Pdu();
|
||||||
|
|
||||||
// getters
|
// getters
|
||||||
const uint32_t vector(); // may inherit
|
uint32_t vector(); // may inherit
|
||||||
pdu_header * header(); // may inherit
|
pdu_header * header(); // may inherit
|
||||||
pdu_data * data(); // may inherit
|
pdu_data * data(); // may inherit
|
||||||
std::shared_ptr<Pdu> parent() {return parent_;}
|
std::shared_ptr<Pdu> parent() {return parent_;}
|
||||||
|
@ -50,7 +50,7 @@ Universe::~Universe()
|
|||||||
@param uint16_t address of the requested slot.
|
@param uint16_t address of the requested slot.
|
||||||
@return const uint8_t value of the slot.
|
@return const uint8_t value of the slot.
|
||||||
*/
|
*/
|
||||||
const uint8_t Universe::slot (const uint16_t address) const
|
uint8_t Universe::slot(const uint16_t address) const
|
||||||
{
|
{
|
||||||
if (address == 0) return 0;
|
if (address == 0) return 0;
|
||||||
if (address > null_start_data_.size() - 1) return 0;
|
if (address > null_start_data_.size() - 1) return 0;
|
||||||
@ -65,7 +65,7 @@ const uint8_t Universe::slot (const uint16_t address) const
|
|||||||
* Calculated as the rolling mean of (the number of frames in
|
* Calculated as the rolling mean of (the number of frames in
|
||||||
* the last 2.5 seconds) / 2.5 seconds.
|
* the last 2.5 seconds) / 2.5 seconds.
|
||||||
*/
|
*/
|
||||||
const double Universe::rxRate()
|
double Universe::rxRate()
|
||||||
{
|
{
|
||||||
rx_timeout_();
|
rx_timeout_();
|
||||||
return rx_times_.size() / 2.5;
|
return rx_times_.size() / 2.5;
|
||||||
|
@ -27,17 +27,17 @@ public:
|
|||||||
return QString::fromUtf8(universe_->source()->description().c_str());
|
return QString::fromUtf8(universe_->source()->description().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint16_t number() const
|
uint16_t number() const
|
||||||
{
|
{
|
||||||
return universe_->source()->universe();
|
return universe_->source()->universe();
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint8_t priority() const
|
uint8_t priority() const
|
||||||
{
|
{
|
||||||
return universe_->source()->priority();
|
return universe_->source()->priority();
|
||||||
}
|
}
|
||||||
|
|
||||||
const double rxRate() const
|
double rxRate() const
|
||||||
{
|
{
|
||||||
return universe_->rxRate();
|
return universe_->rxRate();
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ void frame_sync_header::iStream(PDU::Stream stream)
|
|||||||
* @brief frame_sync_header::oStream
|
* @brief frame_sync_header::oStream
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void frame_sync_header::oStream(PDU::Stream stream) const
|
void frame_sync_header::oStream(__attribute__((unused)) PDU::Stream stream) const
|
||||||
{
|
{
|
||||||
/// TODO: write header to stream
|
/// TODO: write header to stream
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ void frame_discovery_header::iStream(PDU::Stream stream)
|
|||||||
* @brief frame_discovery_header::oStream
|
* @brief frame_discovery_header::oStream
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void frame_discovery_header::oStream(PDU::Stream stream) const
|
void frame_discovery_header::oStream(__attribute__((unused)) PDU::Stream stream) const
|
||||||
{
|
{
|
||||||
/// TODO: write header to stream
|
/// TODO: write header to stream
|
||||||
}
|
}
|
||||||
@ -162,7 +162,7 @@ void discovery_list_header::iStream(PDU::Stream stream)
|
|||||||
* @brief discovery_list_header::oStream
|
* @brief discovery_list_header::oStream
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void discovery_list_header::oStream(PDU::Stream stream) const
|
void discovery_list_header::oStream(__attribute__((unused)) PDU::Stream stream) const
|
||||||
{
|
{
|
||||||
/// TODO: write header to stream
|
/// TODO: write header to stream
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ public:
|
|||||||
|
|
||||||
const UUID::uuid cid() const {return cid_;};
|
const UUID::uuid cid() const {return cid_;};
|
||||||
const std::string description() const {return description_;}
|
const std::string description() const {return description_;}
|
||||||
const uint16_t universe() const {return universe_;}
|
uint16_t universe() const {return universe_;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
UUID::uuid cid_;
|
UUID::uuid cid_;
|
||||||
|
@ -266,7 +266,7 @@ void Receiver::dataFrameHandler(std::shared_ptr<DATA::Pdu> frame) {
|
|||||||
* @brief Receiver::syncFrameHandler
|
* @brief Receiver::syncFrameHandler
|
||||||
* @param frame
|
* @param frame
|
||||||
*/
|
*/
|
||||||
void Receiver::syncFrameHandler(std::shared_ptr<EXTENDED::Pdu> frame)
|
void Receiver::syncFrameHandler(__attribute__((unused)) std::shared_ptr<EXTENDED::Pdu> frame)
|
||||||
{
|
{
|
||||||
/// TODO: Universe sync
|
/// TODO: Universe sync
|
||||||
}
|
}
|
||||||
|
@ -43,14 +43,14 @@ public:
|
|||||||
|
|
||||||
const UUID::uuid CID() const {return cid_;};
|
const UUID::uuid CID() const {return cid_;};
|
||||||
const std::string description() const {return description_;}
|
const std::string description() const {return description_;}
|
||||||
const uint16_t universe() const {return universe_;}
|
uint16_t universe() const {return universe_;}
|
||||||
const uint8_t priority() const {return priority_;}
|
uint8_t priority() const {return priority_;}
|
||||||
const uint16_t syncAddress() const {return sync_address_;}
|
uint16_t syncAddress() const {return sync_address_;}
|
||||||
const bool isTerminated() const {return options_
|
bool isTerminated() const {return options_
|
||||||
& DATA::STREAM_TERMINATED;}
|
& DATA::STREAM_TERMINATED;}
|
||||||
const bool isPreview() const {return options_
|
bool isPreview() const {return options_
|
||||||
& DATA::PREVIEW_DATA;}
|
& DATA::PREVIEW_DATA;}
|
||||||
const bool isForced() const {return options_
|
bool isForced() const {return options_
|
||||||
& DATA::FORCE_SYNCHRONIZATION;}
|
& DATA::FORCE_SYNCHRONIZATION;}
|
||||||
|
|
||||||
friend bool operator== (const UniverseSource& a, const UniverseSource& b);
|
friend bool operator== (const UniverseSource& a, const UniverseSource& b);
|
||||||
|
Loading…
Reference in New Issue
Block a user