Skip to content

Commit

Permalink
Drop extern "C" from main functions
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed Oct 22, 2024
1 parent 8952368 commit 76fc3f6
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion examples/all-clusters-app/nxp/common/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ uint8_t __attribute__((section(".heap"))) ucHeap[configTOTAL_HEAP_SIZE];

using namespace ::chip::DeviceLayer;

extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
TaskHandle_t taskHandle;

Expand Down
2 changes: 1 addition & 1 deletion examples/contact-sensor-app/nxp/common/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern "C" void main_task(void const * argument)
chip::NXP::App::GetAppTask().Start();
}
#else
extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
chip::DeviceLayer::PlatformMgrImpl().HardwareInit();
chip::NXP::App::GetAppTask().Start();
Expand Down
2 changes: 1 addition & 1 deletion examples/laundry-washer-app/nxp/common/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ uint8_t __attribute__((section(".heap"))) ucHeap[configTOTAL_HEAP_SIZE];

using namespace ::chip::DeviceLayer;

extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
TaskHandle_t taskHandle;

Expand Down
2 changes: 1 addition & 1 deletion examples/light-switch-app/genio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters)
* Main Function
****************************************************************************/

extern "C" int main(void)
int main(void)
{
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void ApplicationShutdown()
}
}

extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
if (ChipLinuxAppInit(argc, argv) != 0)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/genio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters)
* Main Function
****************************************************************************/

extern "C" int main(void)
int main(void)
{
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);

Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void ApplicationShutdown()
}
}

extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
if (ChipLinuxAppInit(argc, argv) != 0)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/nxp/common/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern "C" void main_task(void const * argument)
chip::NXP::App::GetAppTask().Start();
}
#else
extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
chip::DeviceLayer::PlatformMgrImpl().HardwareInit();
chip::NXP::App::GetAppTask().Start();
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/genio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters)
* Main Function
****************************************************************************/

extern "C" int main(void)
int main(void)
{
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);

Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/nxp/common/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extern "C" void main_task(void const * argument)
chip::NXP::App::GetAppTask().Start();
}
#else
extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
chip::DeviceLayer::PlatformMgrImpl().HardwareInit();
chip::NXP::App::GetAppTask().Start();
Expand Down
2 changes: 1 addition & 1 deletion examples/ota-requestor-app/genio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void vStartTask(void * pvParameters)
* Main Function
****************************************************************************/

extern "C" int main(void)
int main(void)
{
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ alignas(8) static uint8_t malloc_mutex_obj[80];

// C runtime import: constructor initialization and main
extern "C" void __libc_init_array(void);
extern "C" int main(void);
int main(void);

// IOT SDK serial declarations
#define STDIN_FILENO 0
Expand Down
2 changes: 1 addition & 1 deletion examples/shell/genio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void vStartTask(void * pvParameters)
* Main Function
****************************************************************************/

extern "C" int main(void)
int main(void)
{
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);

Expand Down
2 changes: 1 addition & 1 deletion examples/thermostat/genio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters)
* Main Function
****************************************************************************/

extern "C" int main(void)
int main(void)
{
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);

Expand Down
2 changes: 1 addition & 1 deletion examples/thermostat/nxp/common/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ uint8_t __attribute__((section(".heap"))) ucHeap[configTOTAL_HEAP_SIZE];

using namespace ::chip::DeviceLayer;

extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
TaskHandle_t taskHandle;

Expand Down
2 changes: 1 addition & 1 deletion src/lib/address_resolve/tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ extern "C" void StopSignalHandler(int signal)

} // namespace

extern "C" int main(int argc, const char ** argv)
int main(int argc, const char ** argv)
{
Platform::MemoryInit();

Expand Down
2 changes: 1 addition & 1 deletion src/test_driver/nrfconnect/main/runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ using namespace ::chip::DeviceLayer;

LOG_MODULE_REGISTER(runner, CONFIG_MATTER_LOG_LEVEL);

extern "C" int main(void)
int main(void)
{
VerifyOrDie(settings_subsys_init() == 0);

Expand Down
2 changes: 1 addition & 1 deletion src/tools/chip-cert/chip-cert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ bool PrintVersion()

} // namespace

extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
bool res = false;

Expand Down
2 changes: 1 addition & 1 deletion src/tools/spake2p/spake2p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ bool PrintVersion()

} // namespace

extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
bool res = false;

Expand Down

0 comments on commit 76fc3f6

Please sign in to comment.