zephyr/samples/bluetooth
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
..
beacon samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
broadcast_audio_sink samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
broadcast_audio_source samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
broadcaster samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
broadcaster_multiple samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
bthome_sensor_template samples: bluetooth: BTHome sensor template fix whitespace 2023-03-20 15:01:33 +01:00
central samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
central_gatt_write samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
central_hr samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
central_ht samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
central_iso samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
central_multilink samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
central_otc samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
central_past samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
direct_adv samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
direction_finding_central samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
direction_finding_connectionless_rx samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
direction_finding_connectionless_tx samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
direction_finding_peripheral samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
eddystone samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
handsfree samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
hap_ha samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
hci_pwr_ctrl samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
hci_rpmsg samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
hci_spi samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
hci_uart samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
hci_usb samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
hci_usb_h4 samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
ibeacon samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
ipsp samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
iso_broadcast samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
iso_broadcast_benchmark samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
iso_connected_benchmark samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
iso_receive samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
mesh samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
mesh_demo samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
mesh_provisioner samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
mtu_update samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
observer samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
periodic_adv samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
periodic_sync samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral_accept_list samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral_csc samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral_dis samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral_esp samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral_gatt_write samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral_hids samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral_hr samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral_ht samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral_identity samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral_iso samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral_ots samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral_past samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
peripheral_sc_only samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
scan_adv samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
st_ble_sensor samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
unicast_audio_client samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
unicast_audio_server samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
bluetooth.rst