zephyr/kernel
Keith Packard 0b90fd5adf 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>
2023-04-14 07:49:41 +09:00
..
include kernel: Add z_sched_wake_thread API 2023-03-09 09:22:21 +01:00
paging
atomic_c.c
banner.c kernel: banner: Remove unnecessary header 2023-01-09 12:07:28 -05:00
CMakeLists.txt cache: Fix cache API calling from userspace 2022-08-23 10:14:17 +02:00
compiler_stack_protect.c
condvar.c
device.c kernel: move z_sys_init_run_level to init.c 2022-10-12 18:49:12 +09:00
errno.c
events.c kernel: events: fix waitq timeout race condition 2023-03-09 09:22:21 +01:00
fatal.c
futex.c
idle.c kernel: idle: fix -Werror=misleading-indentation 2022-10-12 18:43:15 +02:00
init.c samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
Kconfig kernel: Kconfig: Increase the main stack size for ARM when TEST 2022-12-09 21:59:10 +09:00
Kconfig.vm
kheap.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
mailbox.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
main_weak.c kernel: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
mem_domain.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
mem_slab.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
mempool.c
mmu.c kernel: mmu: fix potential running out of virtual memory space 2022-11-17 15:56:04 +00:00
msg_q.c kernel: k_msgq: add peek at function 2023-01-26 10:00:29 +00:00
mutex.c kernel: mutex: fix races when lock timeout 2022-08-12 17:40:20 +02:00
pipes.c kernel: pipes: ISRs use a private pipe descriptor 2023-02-11 06:45:13 +09:00
poll.c kernel: allow k_poll to wait on pipes 2022-08-24 17:49:20 +00:00
queue.c
sched.c sys/util: extend usage of DIV_ROUND_UP 2023-04-12 16:42:29 +02:00
sem.c
smp.c smp: Move for loops to use arch_num_cpus instead of CONFIG_MP_NUM_CPUS 2022-10-21 13:14:58 +02:00
stack.c
system_work_q.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
thread.c kernel: events: fix waitq timeout race condition 2023-03-09 09:22:21 +01:00
timeout.c kernel/sched: Use kernel timeouts for timeslice expirations 2023-03-09 09:21:12 +01:00
timer.c kernel/timer: fix period argument clamp handling 2023-02-20 09:52:53 +01:00
usage.c smp: Move for loops to use arch_num_cpus instead of CONFIG_MP_NUM_CPUS 2022-10-21 13:14:58 +02:00
userspace_handler.c
userspace.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
version.c
work.c kernel/work: Fix race under with delayed work item cancellation 2023-02-11 12:14:16 +09:00
xip.c