Skip to content

Commit

Permalink
[attribute storage] fix inclusion order to apply platform defs early
Browse files Browse the repository at this point in the history
- before, af-types.h got included before platform specific global defines
  in particular CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT were
  (re)defined via CHIPDeviceLayer.h
- this produced inconsistent value for CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT,
  between af-types.h and attribute-storage.cpp
- the problem surfaced on Darwin because it does force
  CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT to be >=1 in all cases
  in `src/platform/Darwin/CHIPDevicePlatformConfig.h`
  • Loading branch information
plan44 committed Aug 29, 2023
1 parent 8e436c4 commit ff6c957
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/app/util/attribute-storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
* limitations under the License.
*/

#include <platform/CHIPDeviceLayer.h>
#include "app/util/common.h"
#include <app/AttributePersistenceProvider.h>
#include <app/InteractionModelEngine.h>
#include <app/reporting/reporting.h>
#include <app/util/af.h>
#include <app/util/attribute-storage.h>
#include <app/util/config.h>
#include <app/util/generic-callbacks.h>
#include <lib/support/CodeUtils.h>
#include <lib/support/logging/CHIPLogging.h>
Expand Down
2 changes: 1 addition & 1 deletion src/app/util/attribute-storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
#pragma once

// #include PLATFORM_HEADER
#include <platform/CHIPDeviceLayer.h>
#include <app/AttributeAccessInterface.h>
#include <app/ConcreteAttributePath.h>
#include <app/util/af.h>
#include <app/util/config.h>
#include <app/util/endpoint-config-api.h>
#include <lib/support/CodeUtils.h>
#include <platform/CHIPDeviceLayer.h>

#if !defined(EMBER_SCRIPTED_TEST)
#include <app/att-storage.h>
Expand Down

0 comments on commit ff6c957

Please sign in to comment.