Skip to content

Commit b000bea

Browse files
committed
Ignore false positive unused variable/function
1 parent 495a24f commit b000bea

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

libraries/Zigbee/src/ZigbeeEP.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ void ZigbeeEP::readManufacturerAndModel(uint8_t endpoint, uint16_t short_addr) {
8181
esp_zb_zcl_read_attr_cmd_req(&read_req);
8282
}
8383

84+
#pragma GCC diagnostic push
85+
#pragma GCC diagnostic ignored "-Wunused-variable"
86+
8487
void ZigbeeEP::printBoundDevices() {
8588
log_i("Bound devices:");
8689
for(const auto& device : _bound_devices) {
@@ -89,6 +92,8 @@ void ZigbeeEP::printBoundDevices() {
8992
}
9093
}
9194

95+
#pragma GCC diagnostic pop
96+
9297
void ZigbeeEP::readBasicCluster(uint16_t cluster_id, const esp_zb_zcl_attribute_t *attribute) {
9398
/* Basic cluster attributes */
9499
if (attribute->id == ESP_ZB_ZCL_ATTR_BASIC_MANUFACTURER_NAME_ID && attribute->data.type == ESP_ZB_ZCL_ATTR_TYPE_CHAR_STRING && attribute->data.value) {

libraries/Zigbee/src/ZigbeeHandlers.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ static esp_err_t zb_cmd_read_attr_resp_handler(const esp_zb_zcl_cmd_read_attr_re
1111
static esp_err_t zb_configure_report_resp_handler(const esp_zb_zcl_cmd_config_report_resp_message_t *message);
1212
static esp_err_t zb_cmd_default_resp_handler(const esp_zb_zcl_cmd_default_resp_message_t *message);
1313

14+
15+
#pragma GCC diagnostic push
16+
#pragma GCC diagnostic ignored "-Wunused-function"
17+
1418
// Zigbee action handlers
1519
static esp_err_t zb_action_handler(esp_zb_core_action_callback_id_t callback_id, const void *message) {
1620
esp_err_t ret = ESP_OK;
@@ -25,6 +29,8 @@ static esp_err_t zb_action_handler(esp_zb_core_action_callback_id_t callback_id,
2529
return ret;
2630
}
2731

32+
#pragma GCC diagnostic pop
33+
2834
static esp_err_t zb_attribute_set_handler(const esp_zb_zcl_set_attr_value_message_t *message) {
2935
if (!message) {
3036
log_e("Empty message");

0 commit comments

Comments
 (0)