Initialized a number of unused and deprecated variables to zero. This was not a big issue, because the information was unused, but it caused valgrind to report errors about using unitialized data
This commit is contained in:
parent
d4e543e74a
commit
ffc400f4f0
|
|
@ -19,7 +19,7 @@ private:
|
|||
* Field that is no longer used
|
||||
* @var uint16_t
|
||||
*/
|
||||
uint16_t _deprecated;
|
||||
uint16_t _deprecated = 0;
|
||||
|
||||
/**
|
||||
* specifies the name of the queue to consume from
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ private:
|
|||
* Deprecated field
|
||||
* @var uint16_t
|
||||
*/
|
||||
uint16_t _deprecated;
|
||||
uint16_t _deprecated = 0;
|
||||
|
||||
/**
|
||||
* name of the queue to get a message from
|
||||
|
|
@ -60,7 +60,6 @@ public:
|
|||
*/
|
||||
BasicGetFrame(uint16_t channel, const std::string& queue, bool noAck = false) :
|
||||
BasicFrame(channel, queue.length() + 4), // 1 for bool, 1 for string size, 2 for deprecated field
|
||||
_deprecated(0),
|
||||
_queue(queue),
|
||||
_noAck(noAck)
|
||||
{}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ private:
|
|||
* Weight field, unused but must be sent, always value 0;
|
||||
* @var uint16_t
|
||||
*/
|
||||
uint16_t _weight;
|
||||
uint16_t _weight = 0;
|
||||
|
||||
/**
|
||||
* Body size, sum of the sizes of all body frames following the content header
|
||||
|
|
@ -63,7 +63,6 @@ public:
|
|||
*/
|
||||
BasicHeaderFrame(uint16_t channel, const Envelope &envelope) :
|
||||
HeaderFrame(channel, 10 + envelope.size()), // there are at least 10 bytes sent, weight (2), bodySize (8), plus the size of the meta data
|
||||
_weight(0),
|
||||
_bodySize(envelope.bodySize()),
|
||||
_metadata(envelope)
|
||||
{}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ private:
|
|||
* Variable that no longer is in use
|
||||
* @var int16_t
|
||||
*/
|
||||
int16_t _deprecated;
|
||||
int16_t _deprecated = 0;
|
||||
|
||||
/**
|
||||
* the name of the exchange to publish to. An empty exchange name means the default exchange.
|
||||
|
|
@ -71,7 +71,6 @@ public:
|
|||
*/
|
||||
BasicPublishFrame(uint16_t channel, const std::string& exchange = "", const std::string& routingKey = "", bool mandatory = false, bool immediate = false) :
|
||||
BasicFrame(channel, exchange.length() + routingKey.length() + 5), // 1 extra per string (for the size), 1 for bools, 2 for deprecated field
|
||||
_deprecated(0),
|
||||
_exchange(exchange),
|
||||
_routingKey(routingKey),
|
||||
_bools(mandatory, immediate)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ private:
|
|||
* reserved byte
|
||||
* @var uint16_t
|
||||
*/
|
||||
uint16_t _reserved;
|
||||
uint16_t _reserved = 0;
|
||||
|
||||
/**
|
||||
* Exchange to bind to
|
||||
|
|
@ -96,7 +96,6 @@ public:
|
|||
*/
|
||||
ExchangeBindFrame(uint16_t channel, const std::string &destination, const std::string &source, const std::string &routingKey, bool noWait, const Table &arguments) :
|
||||
ExchangeFrame(channel, (destination.length() + source.length() + routingKey.length() + arguments.size() + 6)), // 1 for each string, 1 for booleanset, 2 for deprecated field
|
||||
_reserved(0),
|
||||
_destination(destination),
|
||||
_source(source),
|
||||
_routingKey(routingKey),
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ private:
|
|||
* Field that no longer is used
|
||||
* @var uint16_t
|
||||
*/
|
||||
uint16_t _deprecated;
|
||||
uint16_t _deprecated = 0;
|
||||
|
||||
/**
|
||||
* The exchange name
|
||||
|
|
@ -82,7 +82,6 @@ public:
|
|||
*/
|
||||
ExchangeDeclareFrame(uint16_t channel, const std::string& name, const std::string& type, bool passive, bool durable, bool noWait, const Table& arguments) :
|
||||
ExchangeFrame(channel, (name.length() + type.length() + arguments.size() + 5)), // size of name, type and arguments + 1 (all booleans are stored in 1 byte) + 2 (deprecated short) + 2 (string sizes)
|
||||
_deprecated(0),
|
||||
_name(name),
|
||||
_type(type),
|
||||
_bools(passive, durable, false, false, noWait),
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ private:
|
|||
* Field that is no longer in use
|
||||
* @var uint16_t
|
||||
*/
|
||||
uint16_t _deprecated;
|
||||
uint16_t _deprecated = 0;
|
||||
|
||||
/**
|
||||
* The exchange name
|
||||
|
|
@ -74,7 +74,6 @@ public:
|
|||
*/
|
||||
ExchangeDeleteFrame(uint16_t channel, const std::string& name, bool ifUnused = false, bool noWait = false) :
|
||||
ExchangeFrame(channel, name.length() + 4), // length of the name, 1 byte for encoding this length, 1 for bools, 2 for deprecated short
|
||||
_deprecated(0),
|
||||
_name(name),
|
||||
_bools(ifUnused, noWait)
|
||||
{}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ private:
|
|||
* reserved byte
|
||||
* @var uint16_t
|
||||
*/
|
||||
uint16_t _reserved;
|
||||
uint16_t _reserved = 0;
|
||||
|
||||
/**
|
||||
* Exchange to bind to
|
||||
|
|
@ -96,7 +96,6 @@ public:
|
|||
*/
|
||||
ExchangeUnbindFrame(uint16_t channel, const std::string &destination, const std::string &source, const std::string &routingKey, bool noWait, const Table &arguments) :
|
||||
ExchangeFrame(channel, (destination.length() + source.length() + routingKey.length() + arguments.size() + 6)), // 1 for each string, 1 for booleanset, 2 for deprecated field
|
||||
_reserved(0),
|
||||
_destination(destination),
|
||||
_source(source),
|
||||
_routingKey(routingKey),
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ private:
|
|||
* Deprecated field
|
||||
* @var uint16_t
|
||||
*/
|
||||
uint16_t _deprecated;
|
||||
uint16_t _deprecated = 0;
|
||||
|
||||
/**
|
||||
* Queue name
|
||||
|
|
@ -88,7 +88,6 @@ public:
|
|||
*/
|
||||
QueueBindFrame(uint16_t channel, const std::string& name, const std::string& exchange, const std::string& routingKey = "", bool noWait = false, const Table& arguments = {}) :
|
||||
QueueFrame(channel, (name.length() + exchange.length() + routingKey.length() + arguments.size() + 6) ), // 3 extra per string, 1 for bools, 2 for deprecated field
|
||||
_deprecated(0),
|
||||
_name(name),
|
||||
_exchange(exchange),
|
||||
_routingKey(routingKey),
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ private:
|
|||
* Field that no longer is in use
|
||||
* @var int16_t
|
||||
*/
|
||||
int16_t _deprecated;
|
||||
int16_t _deprecated = 0;
|
||||
|
||||
/**
|
||||
* The exchange name
|
||||
|
|
@ -81,7 +81,6 @@ public:
|
|||
*/
|
||||
QueueDeclareFrame(uint16_t channel, const std::string& name = "", bool passive = false, bool durable = false, bool exclusive = false, bool autoDelete = false, bool noWait = false, const Table& arguments = {}) :
|
||||
QueueFrame(channel, (name.length() + arguments.size() + 4 ) ), // 1 extra for string size, 1 for bools, 2 for deprecated value
|
||||
_deprecated(0),
|
||||
_name(name),
|
||||
_bools(passive, durable, exclusive, autoDelete, noWait),
|
||||
_arguments(arguments)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ private:
|
|||
* Field that is no longer in use
|
||||
* @var int16_t
|
||||
*/
|
||||
int16_t _deprecated;
|
||||
int16_t _deprecated = 0;
|
||||
|
||||
/**
|
||||
* the queue name
|
||||
|
|
@ -70,7 +70,6 @@ public:
|
|||
*/
|
||||
QueueDeleteFrame(uint16_t channel, const std::string& name, bool ifUnused = false, bool ifEmpty = false, bool noWait = false) :
|
||||
QueueFrame(channel, name.length() + 4), // 1 for string length, 1 for bools, 2 for deprecated field
|
||||
_deprecated(0),
|
||||
_name(name),
|
||||
_bools(ifUnused, ifEmpty, noWait)
|
||||
{}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ private:
|
|||
* Field that is no longer in use
|
||||
* @var int16_t
|
||||
*/
|
||||
int16_t _deprecated;
|
||||
int16_t _deprecated = 0;
|
||||
|
||||
/**
|
||||
* Name of the queue
|
||||
|
|
@ -66,7 +66,6 @@ public:
|
|||
*/
|
||||
QueuePurgeFrame(uint16_t channel, const std::string& name, bool noWait = false) :
|
||||
QueueFrame(channel, name.length() + 4), // 1 extra for string length, 1 for bool, 2 for deprecated field
|
||||
_deprecated(0),
|
||||
_name(name),
|
||||
_noWait(noWait)
|
||||
{}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ private:
|
|||
* Unused field
|
||||
* @var int16_t
|
||||
*/
|
||||
int16_t _deprecated;
|
||||
int16_t _deprecated = 0;
|
||||
|
||||
/**
|
||||
* the queue name
|
||||
|
|
@ -81,7 +81,6 @@ public:
|
|||
*/
|
||||
QueueUnbindFrame(uint16_t channel, const std::string& name, const std::string& exchange, const std::string& routingKey = "", const Table& arguments = {} ) :
|
||||
QueueFrame(channel, (name.length() + exchange.length() + routingKey.length() + arguments.size() + 5) ), // 1 per string, 2 for deprecated field
|
||||
_deprecated(0),
|
||||
_name(name),
|
||||
_exchange(exchange),
|
||||
_routingKey(routingKey),
|
||||
|
|
|
|||
Loading…
Reference in New Issue