Skip to content

Commit c637fc8

Browse files
committed
Merge branch 'fix-warnings' into 'main'
components/esp_matter: fix few warnings See merge request app-frameworks/esp-matter!1188
2 parents e8601ac + 63e76c8 commit c637fc8

File tree

4 files changed

+6
-30
lines changed

4 files changed

+6
-30
lines changed

components/esp_matter/esp_matter_attribute_bounds.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ void add_bounds_cb(cluster_t *cluster)
131131
break;
132132
}
133133
case LevelControl::Attributes::MinLevel::Id: {
134-
esp_matter_attr_val_t max_val = esp_matter_invalid(NULL);
135134
uint8_t min = 1, max = 254;
136135
esp_matter::attribute::add_bounds(current_attribute, esp_matter_uint8(min), esp_matter_uint8(max));
137136
break;

components/esp_matter/esp_matter_command.cpp

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -550,17 +550,6 @@ static esp_err_t esp_matter_command_callback_stop_with_on_off(const ConcreteComm
550550
return ESP_OK;
551551
}
552552

553-
static esp_err_t esp_matter_command_callback_move_to_closest_frequency(const ConcreteCommandPath &command_path,
554-
TLVReader &tlv_data, void *opaque_ptr)
555-
{
556-
chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::DecodableType command_data;
557-
CHIP_ERROR error = Decode(tlv_data, command_data);
558-
if (error == CHIP_NO_ERROR) {
559-
emberAfLevelControlClusterMoveToClosestFrequencyCallback((CommandHandler *)opaque_ptr, command_path, command_data);
560-
}
561-
return ESP_OK;
562-
}
563-
564553
static esp_err_t esp_matter_command_callback_move_to_hue(const ConcreteCommandPath &command_path, TLVReader &tlv_data,
565554
void *opaque_ptr)
566555
{
@@ -1360,6 +1349,7 @@ static esp_err_t esp_matter_command_callback_disable_action_with_duration(const
13601349
return ESP_OK;
13611350
}
13621351

1352+
#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
13631353
static esp_err_t esp_matter_command_callback_review_fabric_restrictions(const ConcreteCommandPath &command_path, TLVReader &tlv_data, void *opaque_ptr)
13641354
{
13651355
chip::app::Clusters::AccessControl::Commands::ReviewFabricRestrictions::DecodableType command_data;
@@ -1369,16 +1359,7 @@ static esp_err_t esp_matter_command_callback_review_fabric_restrictions(const Co
13691359
}
13701360
return ESP_OK;
13711361
}
1372-
1373-
static esp_err_t esp_matter_command_callback_keep_active(const ConcreteCommandPath &command_path, TLVReader &tlv_data, void *opaque_ptr)
1374-
{
1375-
chip::app::Clusters::BridgedDeviceBasicInformation::Commands::KeepActive::DecodableType command_data;
1376-
CHIP_ERROR error = Decode(tlv_data, command_data);
1377-
if (error == CHIP_NO_ERROR) {
1378-
emberAfBridgedDeviceBasicInformationClusterKeepActiveCallback((CommandHandler *)opaque_ptr, command_path, command_data);
1379-
}
1380-
return ESP_OK;
1381-
}
1362+
#endif // CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
13821363

13831364
static esp_err_t esp_matter_command_callback_send_key(const ConcreteCommandPath &command_path, TLVReader &tlv_data, void *opaque_ptr)
13841365
{

components/esp_matter/esp_matter_ota.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ esp_err_t esp_matter_ota_requestor_init(void)
7373
#endif
7474
}
7575

76+
#if CONFIG_ENABLE_OTA_REQUESTOR
7677
static esp_err_t esp_matter_ota_override_impl(const esp_matter_ota_requestor_impl_t *impl)
7778
{
78-
#if CONFIG_ENABLE_OTA_REQUESTOR
7979
VerifyOrReturnError(impl != nullptr, ESP_ERR_INVALID_ARG);
8080

8181
if (impl->driver != nullptr) {
@@ -88,10 +88,8 @@ static esp_err_t esp_matter_ota_override_impl(const esp_matter_ota_requestor_imp
8888
s_ota_requestor_impl.user_consent = impl->user_consent;
8989

9090
return ESP_OK;
91-
#else
92-
return ESP_ERR_NOT_SUPPORTED;
93-
#endif // CONFIG_ENABLE_OTA_REQUESTOR
9491
}
92+
#endif // CONFIG_ENABLE_OTA_REQUESTOR
9593

9694
void esp_matter_ota_requestor_start(void)
9795
{
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
#include <esp_log.h>
22
#include <esp_heap_caps.h>
33

4+
#ifdef CONFIG_ENABLE_MEMORY_PROFILING
45
static const char *HEAP_PROFILING_TAG = "heap_profiling";
56

67
static void memory_profiler_dump_heap_stat(const char *state)
78
{
8-
#ifdef CONFIG_ENABLE_MEMORY_PROFILING
99
ESP_LOGI(HEAP_PROFILING_TAG,"========== HEAP-DUMP-START ==========\n");
1010
ESP_LOGI(HEAP_PROFILING_TAG,"state: %s\n", state);
1111
ESP_LOGI(HEAP_PROFILING_TAG,"\tDescription\tInternal\n");
1212
ESP_LOGI(HEAP_PROFILING_TAG,"Current Free Memory\t%d\n", heap_caps_get_free_size(MALLOC_CAP_8BIT));
1313
ESP_LOGI(HEAP_PROFILING_TAG,"Largest Free Block\t%d\n", heap_caps_get_largest_free_block(MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL));
1414
ESP_LOGI(HEAP_PROFILING_TAG,"Min. Ever Free Size\t%d\n", heap_caps_get_minimum_free_size(MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL));
1515
ESP_LOGI(HEAP_PROFILING_TAG,"========== HEAP-DUMP-END ==========\n");
16-
#endif
1716
}
1817

19-
#ifdef CONFIG_ENABLE_MEMORY_PROFILING
2018
#define MEMORY_PROFILER_DUMP_HEAP_STAT(state) memory_profiler_dump_heap_stat(state)
2119
#else
22-
#define MEMORY_PROFILER_DUMP_HEAP_STAT(state)
20+
#define MEMORY_PROFILER_DUMP_HEAP_STAT(state) void(0)
2321
#endif // CONFIG_ENABLE_MEMORY_PROFILING

0 commit comments

Comments
 (0)