Skip to content

Commit 1dfcf6b

Browse files
authored
Batch project-chip#15 nodiscard errors: platform-specific: example apps air-chef (project-chip#42077)
1 parent 4361c74 commit 1dfcf6b

File tree

54 files changed

+455
-379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+455
-379
lines changed

examples/air-purifier-app/cc32xx/main/AppTask.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ int AppTask::Init()
125125

126126
// Init Chip memory management before the stack
127127
PLAT_LOG("Initialize Memory");
128-
chip::Platform::MemoryInit();
128+
TEMPORARY_RETURN_IGNORED chip::Platform::MemoryInit();
129129

130130
// Initialize LEDs
131131
PLAT_LOG("Initialize LEDs");
@@ -166,7 +166,7 @@ int AppTask::Init()
166166
static chip::CommonCaseDeviceServerInitParams initParams;
167167
(void) initParams.InitializeStaticResourcesBeforeServerInit();
168168
initParams.dataModelProvider = CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
169-
chip::Server::GetInstance().Init(initParams);
169+
TEMPORARY_RETURN_IGNORED chip::Server::GetInstance().Init(initParams);
170170

171171
// Initialize device attestation config
172172
PLAT_LOG("Initialize device attestation config");
@@ -178,10 +178,10 @@ int AppTask::Init()
178178
#endif
179179

180180
// init air purifier stuff
181-
SetParentEndpointForEndpoint(AIR_QUALITY_SENSOR_ENDPOINT, AIR_PURIFIER_ENDPOINT);
182-
SetParentEndpointForEndpoint(TEMPERATURE_SENSOR_ENDPOINT, AIR_PURIFIER_ENDPOINT);
183-
SetParentEndpointForEndpoint(RELATIVE_HUMIDITY_SENSOR_ENDPOINT, AIR_PURIFIER_ENDPOINT);
184-
SetParentEndpointForEndpoint(THERMOSTAT_ENDPOINT, AIR_PURIFIER_ENDPOINT);
181+
TEMPORARY_RETURN_IGNORED SetParentEndpointForEndpoint(AIR_QUALITY_SENSOR_ENDPOINT, AIR_PURIFIER_ENDPOINT);
182+
TEMPORARY_RETURN_IGNORED SetParentEndpointForEndpoint(TEMPERATURE_SENSOR_ENDPOINT, AIR_PURIFIER_ENDPOINT);
183+
TEMPORARY_RETURN_IGNORED SetParentEndpointForEndpoint(RELATIVE_HUMIDITY_SENSOR_ENDPOINT, AIR_PURIFIER_ENDPOINT);
184+
TEMPORARY_RETURN_IGNORED SetParentEndpointForEndpoint(THERMOSTAT_ENDPOINT, AIR_PURIFIER_ENDPOINT);
185185

186186
AirPurifierManager::InitInstance(EndpointId(AIR_PURIFIER_ENDPOINT), EndpointId(AIR_QUALITY_SENSOR_ENDPOINT),
187187
EndpointId(TEMPERATURE_SENSOR_ENDPOINT), EndpointId(RELATIVE_HUMIDITY_SENSOR_ENDPOINT),

examples/air-purifier-app/cc32xx/main/CHIPDeviceManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb)
4949

5050
// Register a function to receive events from the CHIP device layer. Note that calls to
5151
// this function will happen on the CHIP event loop thread, not the app_main thread.
52-
PlatformMgr().AddEventHandler(CHIPDeviceManager::DeviceEventHandler, reinterpret_cast<intptr_t>(cb));
52+
TEMPORARY_RETURN_IGNORED PlatformMgr().AddEventHandler(CHIPDeviceManager::DeviceEventHandler, reinterpret_cast<intptr_t>(cb));
5353

5454
// Start a task to run the CHIP Device event loop.
5555
return PlatformMgr().StartEventLoopTask();

examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp

Lines changed: 115 additions & 111 deletions
Large diffs are not rendered by default.

examples/air-quality-sensor-app/silabs/src/SensorManager.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void InitAirQualitySensorManager(intptr_t arg)
104104

105105
CHIP_ERROR SensorManager::Init()
106106
{
107-
DeviceLayer::PlatformMgr().ScheduleWork(InitAirQualitySensorManager);
107+
TEMPORARY_RETURN_IGNORED DeviceLayer::PlatformMgr().ScheduleWork(InitAirQualitySensorManager);
108108
// Create cmsisos sw timer for air quality sensor timer.
109109
mSensorTimer = osTimerNew(SensorTimerEventHandler, osTimerPeriodic, nullptr, nullptr);
110110
if (mSensorTimer == NULL)
@@ -176,5 +176,6 @@ void SensorManager::SensorTimerEventHandler(void * arg)
176176
#endif // USE_AIR_QUALITY_SENSOR
177177
// create pointer for the int32_t air_quality
178178
int32_t * air_quality_ptr = new int32_t(air_quality);
179-
DeviceLayer::PlatformMgr().ScheduleWork(writeAirQualityToAttribute, reinterpret_cast<intptr_t>(air_quality_ptr));
179+
TEMPORARY_RETURN_IGNORED DeviceLayer::PlatformMgr().ScheduleWork(writeAirQualityToAttribute,
180+
reinterpret_cast<intptr_t>(air_quality_ptr));
180181
}

examples/air-quality-sensor-app/telink/src/AppTask.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ CHIP_ERROR AppTask::Init(void)
3838
CHIP_ERROR err;
3939

4040
SetExampleButtonCallbacks(AirQualitySensorUpdateTimerEventHandler);
41-
InitCommonParts();
41+
TEMPORARY_RETURN_IGNORED InitCommonParts();
4242

4343
err = SensorMgr().Init();
4444
if (err != CHIP_NO_ERROR)

examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static bool sSwitchOnOffState = false;
4242
static void ToggleSwitchOnOff(bool newState)
4343
{
4444
sSwitchOnOffState = newState;
45-
Binding::Manager::GetInstance().NotifyBoundClusterChanged(1, OnOff::Id, nullptr);
45+
TEMPORARY_RETURN_IGNORED Binding::Manager::GetInstance().NotifyBoundClusterChanged(1, OnOff::Id, nullptr);
4646
}
4747

4848
static CHIP_ERROR SwitchCommandHandler(int argc, char ** argv)

examples/all-clusters-app/asr/src/AppTask.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ AppTask AppTask::sAppTask;
7474

7575
void NetWorkCommissioningInstInit()
7676
{
77-
sWiFiNetworkCommissioningInstance.Init();
77+
TEMPORARY_RETURN_IGNORED sWiFiNetworkCommissioningInstance.Init();
7878

7979
// We only have network commissioning on endpoint 0.
8080
emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false);

examples/all-clusters-app/asr/src/DeviceCallbacks.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ void IdentifyTimerHandler(Layer * systemLayer, void * appState)
246246
{
247247
if (identifyTimerCount)
248248
{
249-
systemLayer->StartTimer(Clock::Milliseconds32(kIdentifyTimerDelayMS), IdentifyTimerHandler, appState);
249+
TEMPORARY_RETURN_IGNORED systemLayer->StartTimer(Clock::Milliseconds32(kIdentifyTimerDelayMS), IdentifyTimerHandler,
250+
appState);
250251
identifyTimerCount--;
251252
}
252253
}
@@ -263,7 +264,8 @@ void DeviceCallbacks::OnIdentifyPostAttributeChangeCallback(EndpointId endpointI
263264
identifyTimerCount = (*value) * 4;
264265

265266
DeviceLayer::SystemLayer().CancelTimer(IdentifyTimerHandler, this);
266-
DeviceLayer::SystemLayer().StartTimer(Clock::Milliseconds32(kIdentifyTimerDelayMS), IdentifyTimerHandler, this);
267+
TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer().StartTimer(Clock::Milliseconds32(kIdentifyTimerDelayMS),
268+
IdentifyTimerHandler, this);
267269
exit:
268270
return;
269271
}

examples/all-clusters-app/asr/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ int main(void)
7777
vTaskStartScheduler();
7878

7979
chip::Platform::MemoryShutdown();
80-
PlatformMgr().StopEventLoopTask();
80+
TEMPORARY_RETURN_IGNORED PlatformMgr().StopEventLoopTask();
8181
PlatformMgr().Shutdown();
8282

8383
// Should never get here.

examples/all-clusters-app/esp32/main/include/DeviceCallbacks.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ class AppDeviceCallbacksDelegate : public DeviceCallbacksDelegate
6161
public:
6262
void OnIPv4ConnectivityEstablished(void) override;
6363
void OnIPv4ConnectivityLost(void) override;
64-
void OnDnssdInitialized(void) override { InitBindingHandlers(); }
64+
void OnDnssdInitialized(void) override { TEMPORARY_RETURN_IGNORED InitBindingHandlers(); }
6565
};

0 commit comments

Comments
 (0)