commit | 0b90fd5adf1f01625412efadba4331b5041fb828 | [log] [tgz] |
---|---|---|
author | Keith Packard <keithp@keithp.com> | Tue Feb 07 21:00:59 2023 -0800 |
committer | Stephanos Ioannidis <root@stephanos.io> | Fri Apr 14 07:49:41 2023 +0900 |
tree | 90839fe4e0e67267049a612589f4ca862580c3e0 | |
parent | fc076f5a1deef390f4c988985a0036c2fdda40f5 [diff] |
samples, tests, boards: Switch main return type from void to int As both C and C++ standards require applications running under an OS to return 'int', adapt that for Zephyr to align with those standard. This also eliminates errors when building with clang when not using -ffreestanding, and reduces the need for compiler flags to silence warnings for both clang and gcc. Most of these changes were automated using coccinelle with the following script: @@ @@ - void + int main(...) { ... - return; + return 0; ... } Approximately 40 files had to be edited by hand as coccinelle was unable to fix them. Signed-off-by: Keith Packard <keithp@keithp.com>