zephyr/samples/drivers
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
..
adc samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
audio/dmic samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
can samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
clock_control_litex samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
clock_control_xec samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
counter samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
crypto samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
current_sensing samples: drivers: removed old sample code for INA219 2021-08-23 10:32:07 -05:00
dac samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
display samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
eeprom samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
espi samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
flash_shell samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
fpga/fpga_controller samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
ht16k33 samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
i2s/echo samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
ipm samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
jesd216 samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
kscan samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
kscan_touch samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
lcd_cyclonev_socdk samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
lcd_hd44780 samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
led_apa102 samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
led_apa102c_bitbang samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
led_lp503x samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
led_lp3943 samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
led_lp5562 samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
led_lpd8806 samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
led_pca9633 samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
led_pwm samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
led_sx1509b_intensity samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
led_ws2812 samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
led_xec samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
lora samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
mbox samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
memc samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
misc samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peci samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
ps2 samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
smbus tests: smbus: Cleanup CMakeLists files 2023-03-30 09:45:02 +00:00
soc_flash_nrf samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
spi_bitbang samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
spi_flash samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
spi_flash_at45 samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
spi_fujitsu_fram samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
uart samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
virtualization/ivshmem/doorbell samples: drivers: virtualization: add ivshmem doorbell sample 2023-04-07 13:26:01 +02:00
w1/scanner samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
watchdog samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
drivers.rst samples: drivers: Change drivers.rst to find all samples readme file 2020-05-15 17:18:56 +02:00