Skip to content

Commit

Permalink
Fix: Unused variable warning. (aws#765)
Browse files Browse the repository at this point in the history
Unused variable warning when AWS_IOT_MQTT_ENABLE_METRICS is set to 0.
  • Loading branch information
abhidixi11 authored and leegeth committed Aug 31, 2020
1 parent 76d478d commit a8ac7ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/standard/mqtt/src/iot_mqtt_serialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,9 @@ static uint8_t * _encodeUserName( uint8_t * pDestination,
uint8_t * pBuffer = pDestination;
const char * pMetricsUserName = NULL;

/* Avoid unused variable warning when AWS_IOT_MQTT_ENABLE_METRICS is set to 0 */
( void ) pMetricsUserName;

/* If metrics are enabled, write the metrics username into the CONNECT packet.
* Otherwise, write the username and password only when not connecting to the
* AWS IoT MQTT server. */
Expand Down

0 comments on commit a8ac7ca

Please sign in to comment.