From afbaf74007e89d016dbade4072bf2e7a3874139a Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Tue, 16 Jul 2019 16:33:30 +0700 Subject: [PATCH] tools: Mass fixing of empty prototypes (for -Wstrict-prototypes) --- components/app_trace/app_trace.c | 20 ++--- components/app_trace/gcov/gcov_rtio.c | 2 +- components/app_trace/heap_trace_tohost.c | 2 +- components/app_trace/include/esp_app_trace.h | 2 +- .../sys_view/Config/SEGGER_RTT_Conf.h | 4 +- .../sys_view/Config/SEGGER_SYSVIEW_Conf.h | 2 +- .../Config/SEGGER_SYSVIEW_Config_FreeRTOS.c | 10 +-- components/app_trace/test/test_trace.c | 6 +- components/app_update/esp_ota_ops.c | 6 +- components/app_update/include/esp_ota_ops.h | 6 +- components/app_update/test/test_switch_ota.c | 2 +- .../subproject/main/bootloader_start.c | 4 +- .../include/bootloader_common.h | 2 +- .../include/bootloader_flash_config.h | 4 +- .../include/esp_flash_encrypt.h | 4 +- .../include_bootloader/bootloader_flash.h | 2 +- .../include_bootloader/bootloader_init.h | 2 +- .../include_bootloader/bootloader_sha.h | 2 +- .../include_bootloader/flash_qio_mode.h | 2 +- .../bootloader_support/src/bootloader_clock.c | 2 +- .../src/bootloader_common.c | 2 +- .../bootloader_support/src/bootloader_flash.c | 4 +- .../src/bootloader_flash_config.c | 4 +- .../bootloader_support/src/bootloader_init.c | 8 +- .../src/esp32/bootloader_sha.c | 2 +- .../src/esp32/flash_encrypt.c | 4 +- .../src/esp32/secure_boot.c | 2 +- .../bootloader_support/src/flash_encrypt.c | 4 +- .../bootloader_support/src/flash_qio_mode.c | 18 ++--- .../src/idf/bootloader_sha.c | 2 +- .../bt/host/bluedroid/api/esp_spp_api.c | 4 +- .../bluedroid/api/include/api/esp_spp_api.h | 2 +- .../bt/host/bluedroid/bta/dm/bta_dm_main.c | 4 +- .../bt/host/bluedroid/bta/dm/bta_dm_pm.c | 4 +- .../bt/host/bluedroid/bta/gatt/bta_gattc_co.c | 2 +- .../bta/hf_client/bta_hf_client_at.c | 6 +- .../bta/hf_client/include/bta_hf_client_int.h | 2 +- .../bluedroid/bta/include/bta/bta_gatt_api.h | 2 +- .../bt/host/bluedroid/bta/jv/bta_jv_act.c | 2 +- .../bluedroid/btc/core/btc_profile_queue.c | 2 +- .../btc/profile/std/a2dp/btc_a2dp_source.c | 2 +- .../btc/profile/std/smp/esp_app_sec.c | 2 +- .../bluedroid/btc/profile/std/spp/btc_spp.c | 2 +- .../bt/host/bluedroid/device/controller.c | 2 +- .../device/include/device/controller.h | 2 +- components/bt/host/bluedroid/hci/hci_hal_h4.c | 4 +- components/bt/host/bluedroid/hci/hci_layer.c | 4 +- .../host/bluedroid/hci/hci_packet_factory.c | 2 +- .../bt/host/bluedroid/hci/hci_packet_parser.c | 2 +- .../bluedroid/hci/include/hci/hci_layer.h | 2 +- .../hci/include/hci/hci_packet_factory.h | 2 +- .../hci/include/hci/hci_packet_parser.h | 2 +- .../hci/include/hci/packet_fragmenter.h | 2 +- .../bt/host/bluedroid/hci/packet_fragmenter.c | 6 +- components/bt/host/bluedroid/main/bte_main.c | 4 +- .../bt/host/bluedroid/stack/avdt/avdt_api.c | 4 +- .../bluedroid/stack/btm/btm_ble_adv_filter.c | 2 +- .../host/bluedroid/stack/btm/btm_ble_bgconn.c | 6 +- .../bt/host/bluedroid/stack/btm/btm_ble_gap.c | 4 +- .../bluedroid/stack/btm/btm_ble_multi_adv.c | 2 +- .../stack/include/stack/btm_ble_api.h | 6 +- components/coap/port/coap_io.c | 2 +- components/console/commands.c | 4 +- components/console/esp_console.h | 4 +- components/console/linenoise/linenoise.c | 8 +- components/console/linenoise/linenoise.h | 2 +- components/cxx/cxx_guards.cpp | 4 +- components/driver/adc1_i2s_private.h | 8 +- components/driver/can.c | 28 +++---- components/driver/gpio.c | 2 +- components/driver/i2c.c | 2 +- components/driver/i2s.c | 2 +- components/driver/include/driver/adc.h | 8 +- .../include/driver/adc2_wifi_internal.h | 4 +- components/driver/include/driver/can.h | 12 +-- components/driver/include/driver/dac.h | 4 +- components/driver/include/driver/gpio.h | 2 +- components/driver/include/driver/i2c.h | 2 +- components/driver/include/driver/ledc.h | 2 +- components/driver/include/driver/rtc_io.h | 2 +- components/driver/include/driver/sdio_slave.h | 10 +-- components/driver/include/driver/sdmmc_host.h | 4 +- components/driver/include/driver/sdspi_host.h | 4 +- components/driver/include/driver/spi_common.h | 2 +- components/driver/include/driver/touch_pad.h | 18 ++--- .../driver/include/driver/uart_select.h | 2 +- components/driver/ledc.c | 2 +- components/driver/rmt.c | 2 +- components/driver/rtc_module.c | 50 ++++++------ components/driver/sdio_slave.c | 78 +++++++++---------- components/driver/sdmmc_host.c | 18 ++--- components/driver/sdmmc_private.h | 12 +-- components/driver/sdmmc_transaction.c | 12 +-- components/driver/sdspi_host.c | 4 +- components/driver/spi_common.c | 2 +- components/driver/test/test_i2c.c | 20 ++--- components/driver/test/test_rmt.c | 4 +- components/driver/test/test_spi_sio.c | 4 +- components/driver/test/test_spi_slave.c | 2 +- components/driver/test/test_timer.c | 4 +- components/driver/test/test_uart.c | 6 +- components/driver/uart.c | 2 +- components/efuse/include/esp_efuse.h | 2 +- components/efuse/src/esp_efuse_fields.c | 4 +- components/efuse/src/esp_efuse_utility.c | 10 +-- components/efuse/src/esp_efuse_utility.h | 8 +- components/esp-tls/esp_tls.c | 8 +- components/esp-tls/esp_tls.h | 8 +- components/esp32/brownout.c | 4 +- components/esp32/cache_err_int.c | 4 +- components/esp32/clk.c | 2 +- components/esp32/cpu_start.c | 8 +- components/esp32/crosscore_int.c | 4 +- components/esp32/esp_clk_internal.h | 2 +- components/esp32/esp_himem.c | 8 +- components/esp32/esp_timer_esp32.c | 14 ++-- components/esp32/include/esp32/brownout.h | 2 +- .../esp32/include/esp32/cache_err_int.h | 4 +- components/esp32/include/esp32/clk.h | 4 +- components/esp32/include/esp32/himem.h | 6 +- components/esp32/include/esp32/spiram.h | 14 ++-- components/esp32/include/esp_intr_alloc.h | 4 +- components/esp32/include/esp_sleep.h | 16 ++-- components/esp32/int_wdt.c | 4 +- components/esp32/intr_alloc.c | 4 +- components/esp32/panic.c | 16 ++-- components/esp32/pm_esp32.c | 18 ++--- components/esp32/pm_trace.c | 2 +- components/esp32/reset_reason.c | 4 +- components/esp32/sleep_modes.c | 38 ++++----- components/esp32/spiram.c | 20 ++--- components/esp32/spiram_psram.c | 2 +- components/esp32/spiram_psram.h | 2 +- components/esp32/system_api.c | 6 +- components/esp32/task_wdt.c | 8 +- components/esp32/test/test_4mpsram.c | 2 +- components/esp32/test/test_ahb_arb.c | 4 +- components/esp32/test/test_esp_timer.c | 8 +- components/esp32/test/test_intr_alloc.c | 2 +- components/esp32/test/test_pm.c | 4 +- components/esp32/test/test_reset_reason.c | 36 ++++----- components/esp32/test/test_sleep.c | 20 ++--- components/esp32/test/test_stack_check.c | 2 +- components/esp_adc_cal/esp_adc_cal.c | 6 +- components/esp_common/include/esp_int_wdt.h | 4 +- .../include/esp_private/crosscore_int.h | 2 +- .../include/esp_private/esp_timer_impl.h | 10 +-- .../esp_common/include/esp_private/pm_impl.h | 10 +-- .../esp_common/include/esp_private/pm_trace.h | 2 +- .../include/esp_private/system_internal.h | 2 +- components/esp_common/include/esp_task_wdt.h | 6 +- components/esp_common/include/esp_timer.h | 8 +- components/esp_common/src/dbg_stubs.c | 2 +- components/esp_common/src/esp_timer.c | 16 ++-- components/esp_common/src/freertos_hooks.c | 4 +- components/esp_common/src/ipc.c | 4 +- components/esp_event/default_event_loop.c | 4 +- components/esp_event/esp_event.c | 2 +- components/esp_event/event_loop_legacy.c | 2 +- components/esp_event/include/esp_event.h | 4 +- .../esp_event/include/esp_event_legacy.h | 4 +- .../private_include/esp_event_private.h | 2 +- components/esp_event/test/test_event.c | 8 +- components/esp_gdbstub/esp32/gdbstub_esp32.c | 4 +- .../private_include/esp_gdbstub_common.h | 8 +- components/esp_gdbstub/src/gdbstub.c | 12 +-- components/esp_gdbstub/src/packet.c | 4 +- components/esp_http_client/lib/http_header.c | 2 +- .../esp_http_client/lib/include/http_header.h | 2 +- components/esp_http_server/src/httpd_sess.c | 2 +- .../esp_http_server/src/port/esp32/osal.h | 4 +- .../esp_local_ctrl/include/esp_local_ctrl.h | 4 +- components/esp_ringbuf/test/test_ringbuf.c | 10 +-- .../esp_rom/include/esp32/rom/tbconsole.h | 2 +- .../esp_websocket_client.c | 2 +- components/esp_wifi/include/esp_phy_init.h | 2 +- components/esp_wifi/include/phy.h | 2 +- components/esp_wifi/src/phy_init.c | 4 +- components/esp_wifi/src/wifi_init.c | 4 +- components/esp_wifi/test/test_phy_rtc.c | 4 +- .../espcoredump/include/esp_core_dump.h | 2 +- .../include_core_dump/esp_core_dump_priv.h | 2 +- components/espcoredump/src/core_dump_common.c | 2 +- components/espcoredump/src/core_dump_flash.c | 2 +- components/espcoredump/src/core_dump_uart.c | 2 +- components/espcoredump/test/test_core_dump.c | 4 +- components/fatfs/test/test_fatfs_rawflash.c | 2 +- components/fatfs/test/test_fatfs_spiflash.c | 4 +- components/fatfs/vfs/esp_vfs_fat.h | 4 +- components/fatfs/vfs/vfs_fat.c | 4 +- components/fatfs/vfs/vfs_fat_sdmmc.c | 2 +- .../freemodbus/common/esp_modbus_master.c | 4 +- .../freemodbus/common/esp_modbus_slave.c | 4 +- components/freemodbus/port/port.c | 4 +- components/freemodbus/port/port.h | 4 +- components/freemodbus/port/portserial.c | 4 +- components/freemodbus/port/portserial_m.c | 4 +- components/freemodbus/port/porttimer.c | 6 +- components/freemodbus/port/porttimer_m.c | 10 +-- .../modbus_controller/mbc_serial_slave.c | 2 +- .../freertos/include/freertos/portable.h | 6 +- .../freertos/include/freertos/portmacro.h | 6 +- components/freertos/port.c | 6 +- components/freertos/tasks.c | 2 +- .../test/test_freertos_backported_functions.c | 2 +- .../freertos/test/test_freertos_eventgroups.c | 6 +- .../freertos/test/test_freertos_task_notify.c | 2 +- .../freertos/test/test_task_suspend_resume.c | 6 +- components/heap/heap_caps.c | 2 +- components/heap/heap_caps_init.c | 4 +- components/heap/include/esp_heap_caps.h | 2 +- components/heap/include/esp_heap_caps_init.h | 4 +- components/heap/test/test_malloc.c | 4 +- components/heap/test/test_malloc_caps.c | 2 +- components/libsodium/test/test_sodium.c | 14 ++-- components/log/log.c | 10 +-- components/lwip/apps/dhcpserver/dhcpserver.c | 2 +- .../lwip/include/apps/dhcpserver/dhcpserver.h | 2 +- .../lwip/port/esp32/include/arch/vfs_lwip.h | 2 +- components/lwip/port/esp32/vfs_lwip.c | 4 +- components/lwip/test_afl_host/dhcp_di.h | 2 +- components/lwip/test_afl_host/dhcpserver_di.h | 2 +- components/lwip/test_afl_host/dns_di.h | 2 +- .../lwip/test_afl_host/test_dhcp_client.c | 2 +- .../lwip/test_afl_host/test_dhcp_server.c | 2 +- components/lwip/test_afl_host/test_dns.c | 2 +- components/mbedtls/port/esp_bignum.c | 2 +- .../mbedtls/test/test_apb_dport_access.c | 8 +- .../mbedtls/test/test_apb_dport_access.h | 4 +- components/mdns/include/mdns.h | 6 +- components/mdns/include/mdns_console.h | 2 +- components/mdns/mdns.c | 30 +++---- components/mdns/mdns_console.c | 40 +++++----- components/mdns/mdns_networking.c | 6 +- .../mdns/test_afl_fuzz_host/esp32_compat.h | 2 +- .../mdns/test_afl_fuzz_host/esp32_mock.c | 4 +- .../mdns/test_afl_fuzz_host/esp32_mock.h | 2 +- components/mdns/test_afl_fuzz_host/mdns_di.h | 2 +- components/mdns/test_afl_fuzz_host/test.c | 4 +- components/newlib/heap.c | 6 +- components/newlib/locks.c | 2 +- .../newlib/platform_include/esp_newlib.h | 8 +- components/newlib/pthread.c | 2 +- components/newlib/reent_init.c | 6 +- components/newlib/syscall_table.c | 2 +- components/newlib/syscalls.c | 2 +- components/newlib/time.c | 16 ++-- components/nvs_flash/src/nvs_api.cpp | 2 +- .../openssl/include/internal/ssl_x509.h | 2 +- components/openssl/library/ssl_x509.c | 2 +- .../protocomm/include/common/protocomm.h | 2 +- components/protocomm/src/common/protocomm.c | 2 +- .../protocomm/src/simple_ble/simple_ble.c | 6 +- .../protocomm/src/simple_ble/simple_ble.h | 6 +- components/pthread/include/esp_pthread.h | 2 +- components/pthread/pthread.c | 6 +- components/pthread/pthread_cond_var.c | 2 +- components/pthread/pthread_internal.h | 2 +- components/pthread/pthread_local_storage.c | 4 +- components/sdmmc/test/test_sd.c | 4 +- components/sdmmc/test/test_sdio.c | 2 +- components/soc/esp32/cpu_util.c | 2 +- components/soc/esp32/include/soc/cpu.h | 8 +- components/soc/esp32/include/soc/rtc.h | 28 +++---- components/soc/esp32/rtc_clk.c | 36 ++++----- components/soc/esp32/rtc_clk_init.c | 4 +- components/soc/esp32/rtc_init.c | 2 +- components/soc/esp32/rtc_pm.c | 8 +- components/soc/esp32/rtc_time.c | 4 +- components/soc/esp32/rtc_wdt.c | 16 ++-- components/soc/esp32/test/test_rtc_clk.c | 2 +- components/soc/include/soc/rtc_wdt.h | 16 ++-- .../soc/include/soc/soc_memory_layout.h | 2 +- components/soc/src/memory_layout_utils.c | 4 +- components/spi_flash/cache_utils.c | 30 +++---- components/spi_flash/cache_utils.h | 14 ++-- components/spi_flash/esp_flash_api.c | 2 +- components/spi_flash/esp_flash_spi_init.c | 4 +- components/spi_flash/flash_mmap.c | 6 +- components/spi_flash/flash_ops.c | 24 +++--- components/spi_flash/include/esp_flash.h | 4 +- components/spi_flash/include/esp_spi_flash.h | 16 ++-- components/spi_flash/partition.c | 4 +- components/spi_flash/sim/flash_mock.cpp | 2 +- components/spi_flash/sim/flash_mock_util.c | 16 ++-- components/spi_flash/sim/stubs/log/log.c | 2 +- components/spi_flash/spi_flash_rom_patch.c | 6 +- components/spi_flash/test/test_esp_flash.c | 2 +- .../spi_flash/test/test_flash_encryption.c | 2 +- components/spi_flash/test/test_mmap.c | 2 +- components/spi_flash/test/test_read_write.c | 2 +- components/spiffs/test/test_spiffs.c | 4 +- .../tcp_transport/include/esp_transport.h | 4 +- .../tcp_transport/include/esp_transport_ssl.h | 2 +- .../tcp_transport/include/esp_transport_tcp.h | 2 +- components/tcp_transport/transport.c | 4 +- components/tcp_transport/transport_ssl.c | 2 +- components/tcp_transport/transport_tcp.c | 2 +- components/tcpip_adapter/event_handlers.c | 8 +- .../tcpip_adapter/include/tcpip_adapter.h | 8 +- components/unity/include/unity_test_runner.h | 4 +- components/unity/unity_port_esp32.c | 2 +- components/unity/unity_runner.c | 4 +- components/vfs/include/esp_vfs_dev.h | 2 +- components/vfs/test/test_vfs_access.c | 4 +- components/vfs/test/test_vfs_select.c | 6 +- components/vfs/test/test_vfs_uart.c | 2 +- components/vfs/vfs.c | 2 +- components/vfs/vfs_uart.c | 6 +- .../src/esp_supplicant/esp_wpa_main.c | 4 +- .../bluetooth/ble_ancs/main/ble_ancs_demo.c | 2 +- .../main/ble_compatibility_test.c | 2 +- .../ble_eddystone/main/esp_eddystone_demo.c | 2 +- .../main/ble_hidd_demo_main.c | 2 +- .../ble/ble_ibeacon/main/ibeacon_demo.c | 2 +- .../ble/ble_spp_client/main/spp_client_demo.c | 2 +- .../ble_spp_server/main/ble_spp_server_demo.c | 2 +- .../main/example_ble_client_throughput.c | 2 +- .../main/example_ble_server_throughput.c | 2 +- .../ble/blufi/main/blufi_example_main.c | 2 +- .../ble/gatt_client/main/gattc_demo.c | 2 +- .../main/example_ble_sec_gattc_demo.c | 2 +- .../main/example_ble_sec_gatts_demo.c | 2 +- .../ble/gatt_server/main/gatts_demo.c | 2 +- .../main/gatts_table_creat_demo.c | 2 +- .../main/gattc_multi_connect.c | 2 +- .../classic_bt/a2dp_sink/main/main.c | 2 +- .../classic_bt/a2dp_source/main/main.c | 2 +- .../bt_discovery/main/bt_discovery.c | 2 +- .../main/example_spp_acceptor_demo.c | 2 +- .../main/example_spp_initiator_demo.c | 2 +- .../main/example_spp_vfs_acceptor_demo.c | 2 +- .../main/example_spp_vfs_initiator_demo.c | 2 +- .../coex/a2dp_gatts_coex/main/main.c | 2 +- .../gattc_gatts_coex/main/gattc_gatts_coex.c | 2 +- .../main/controller_hci_uart_demo.c | 2 +- .../hci/controller_vhci_ble_adv/main/app_bt.c | 2 +- .../ble_mesh_node/main/ble_mesh_adapter.c | 6 +- .../ble_mesh_node/main/ble_mesh_adapter.h | 6 +- .../main/ble_mesh_console_decl.h | 10 +-- .../main/ble_mesh_console_main.c | 4 +- .../main/ble_mesh_console_system.c | 14 ++-- .../main/ble_mesh_register_node_cmd.c | 10 +-- .../main/ble_mesh_register_server_cmd.c | 6 +- .../ble_mesh_node/main/register_bluetooth.c | 8 +- .../main/ble_mesh_adapter.c | 8 +- .../main/ble_mesh_adapter.h | 8 +- .../main/ble_mesh_console_decl.h | 14 ++-- .../main/ble_mesh_console_main.c | 4 +- .../main/ble_mesh_console_system.c | 14 ++-- .../main/ble_mesh_reg_cfg_client_cmd.c | 6 +- .../main/ble_mesh_reg_gen_onoff_client_cmd.c | 6 +- .../main/ble_mesh_reg_test_perf_client_cmd.c | 6 +- .../main/ble_mesh_register_node_cmd.c | 8 +- .../main/ble_mesh_register_provisioner_cmd.c | 8 +- .../main/register_bluetooth.c | 6 +- .../components/iperf/cmd_wifi.c | 2 +- .../main/ble_mesh_demo_main.c | 2 +- .../bluetooth/nimble/blemesh/main/app_mesh.c | 2 +- examples/bluetooth/nimble/bleprph/main/scli.c | 4 +- examples/build_system/cmake/idf_as_lib/main.c | 2 +- .../cmake/idf_as_lib/stubs/esp32/cpu_start.c | 4 +- .../cmake/idf_as_lib/stubs/esp32/flash_ops.c | 2 +- .../stubs/spi_flash/esp_spi_flash.h | 2 +- .../protocol_examples_common/connect.c | 16 ++-- .../include/protocol_examples_common.h | 6 +- .../protocol_examples_common/stdin_out.c | 2 +- .../basic/main/ethernet_example_main.c | 2 +- .../eth2ap/main/ethernet_example_main.c | 2 +- examples/ethernet/iperf/main/cmd_ethernet.c | 2 +- examples/ethernet/iperf/main/cmd_ethernet.h | 2 +- .../iperf/main/ethernet_example_main.c | 8 +- examples/get-started/blink/main/blink.c | 2 +- .../hello_world/main/hello_world_main.c | 2 +- .../peripherals/adc/main/adc1_example_main.c | 4 +- .../can_alert_and_recovery_example_main.c | 2 +- .../can_network_example_listen_only_main.c | 2 +- .../main/can_network_example_master_main.c | 2 +- .../main/can_network_example_slave_main.c | 2 +- .../main/can_self_test_example_main.c | 2 +- .../peripherals/gpio/main/gpio_example_main.c | 2 +- .../i2c/i2c_self_test/main/i2c_example_main.c | 6 +- .../i2c/i2c_tools/main/cmd_i2ctools.c | 2 +- .../i2c_tools/main/i2ctools_example_main.c | 8 +- .../peripherals/i2s/main/i2s_example_main.c | 2 +- .../peripherals/i2s_adc_dac/main/app_main.c | 10 +-- .../peripherals/ledc/main/ledc_example_main.c | 2 +- .../main/mcpwm_basic_config_example.c | 6 +- .../mcpwm_bldc_control_hall_sensor_example.c | 6 +- .../main/mcpwm_brushed_dc_control_example.c | 4 +- .../main/mcpwm_servo_control_example.c | 4 +- .../peripherals/pcnt/main/pcnt_example_main.c | 2 +- .../rmt_nec_tx_rx/main/infrared_nec_main.c | 10 +-- .../peripherals/rmt_tx/main/rmt_tx_main.c | 2 +- .../peripherals/sdio/host/main/app_main.c | 6 +- .../peripherals/sdio/slave/main/app_main.c | 8 +- .../sigmadelta/main/sigmadelta_example_main.c | 2 +- .../spi_master/main/pretty_effect.c | 2 +- .../spi_master/main/pretty_effect.h | 2 +- .../spi_master/main/spi_master_example_main.c | 2 +- .../spi_slave/receiver/main/app_main.c | 2 +- .../spi_slave/sender/main/app_main.c | 2 +- .../main/timer_group_example_main.c | 2 +- .../main/tp_interrupt_main.c | 4 +- .../touch_pad_read/main/tp_read_main.c | 4 +- .../main/nmea_parser_example_main.c | 2 +- .../main/uart_async_rxtxtasks_main.c | 8 +- .../uart_echo/main/uart_echo_example_main.c | 4 +- .../uart/uart_echo_rs485/main/rs485_example.c | 4 +- .../main/uart_events_example_main.c | 2 +- .../main/uart_select_example_main.c | 4 +- .../asio/chat_client/main/chat_client.cpp | 2 +- .../asio/chat_server/main/chat_server.cpp | 2 +- .../asio/tcp_echo_server/main/echo_server.cpp | 2 +- .../udp_echo_server/main/udp_echo_server.cpp | 2 +- .../main/esp_http_client_example.c | 30 +++---- .../protocols/esp_local_ctrl/main/app_main.c | 4 +- .../main/http2_request_example_main.c | 2 +- .../main/http_request_example_main.c | 2 +- .../http_server/advanced_tests/main/main.c | 2 +- .../http_server/advanced_tests/main/tests.c | 4 +- .../http_server/file_serving/main/main.c | 2 +- .../persistent_sockets/main/main.c | 2 +- .../restful_server/main/esp_rest_main.c | 2 +- .../protocols/http_server/simple/main/main.c | 2 +- .../main/https_mbedtls_example_main.c | 2 +- .../main/https_request_example_main.c | 2 +- examples/protocols/https_server/main/main.c | 2 +- .../protocols/mdns/main/mdns_example_main.c | 6 +- .../modbus_master/main/include/sense_modbus.h | 2 +- .../protocols/modbus_master/main/sense_main.c | 4 +- .../modbus_master/main/sense_modbus.c | 4 +- .../protocols/modbus_slave/main/freemodbus.c | 4 +- .../mqtt/publish_test/main/publish_test.c | 2 +- examples/protocols/mqtt/ssl/main/app_main.c | 2 +- .../mqtt/ssl_mutual_auth/main/app_main.c | 2 +- examples/protocols/mqtt/tcp/main/app_main.c | 2 +- examples/protocols/mqtt/ws/main/app_main.c | 2 +- examples/protocols/mqtt/wss/main/app_main.c | 2 +- .../pppos_client/main/pppos_client_main.c | 2 +- .../protocols/sntp/main/sntp_example_main.c | 2 +- .../sockets/tcp_client/main/tcp_client.c | 2 +- .../sockets/tcp_server/main/tcp_server.c | 2 +- .../sockets/udp_client/main/udp_client.c | 2 +- .../main/udp_multicast_example_main.c | 6 +- .../sockets/udp_server/main/udp_server.c | 2 +- .../websocket/main/websocket_example.c | 2 +- .../provisioning/ble_prov/main/app_main.c | 8 +- .../provisioning/console_prov/main/app_main.c | 6 +- .../custom_config/main/app_main.c | 6 +- examples/provisioning/manager/main/app_main.c | 4 +- .../provisioning/softap_prov/main/app_main.c | 6 +- .../main/flash_encrypt_main.c | 2 +- .../main/ext_flash_fatfs_example_main.c | 4 +- .../nvs_rw_blob/main/nvs_blob_example_main.c | 2 +- .../main/nvs_value_example_main.c | 2 +- .../spiffsgen/main/spiffsgen_example_main.c | 4 +- .../main/app_trace_to_host_example_main.c | 2 +- .../main/base_mac_address_example_main.c | 2 +- .../console/components/cmd_nvs/cmd_nvs.c | 2 +- .../console/components/cmd_nvs/cmd_nvs.h | 2 +- .../components/cmd_system/cmd_system.c | 30 +++---- .../components/cmd_system/cmd_system.h | 2 +- examples/system/console/main/cmd_wifi.c | 2 +- examples/system/console/main/cmd_wifi.h | 2 +- .../console/main/console_example_main.c | 8 +- .../main/exception_example_main.cpp | 2 +- .../system/cpp_pthread/main/cpp_pthread.cpp | 2 +- .../deep_sleep/main/deep_sleep_example_main.c | 6 +- .../esp_timer/main/esp_timer_example_main.c | 2 +- .../freertos/real_time_stats/main/main.c | 2 +- examples/system/gcov/main/gcov_example.c | 2 +- examples/system/himem/main/himem_test_main.c | 2 +- .../main/light_sleep_example_main.c | 2 +- .../system/network_tests/main/net_suite.c | 2 +- .../main/advanced_https_ota_example.c | 2 +- .../main/native_ota_example.c | 4 +- .../system/ota/otatool/main/otatool_main.c | 2 +- .../main/simple_ota_example.c | 2 +- examples/system/select/main/select_example.c | 10 +-- .../sysview_tracing/main/sysview_tracing.c | 2 +- .../main/sysview_heap_log.c | 2 +- .../main/task_watchdog_example_main.c | 2 +- examples/system/ulp/main/ulp_example_main.c | 10 +-- .../ulp_adc/main/ulp_adc_example_main.c | 10 +-- .../test/main/example_unit_test_test.c | 2 +- .../wifi/espnow/main/espnow_example_main.c | 2 +- .../softAP/main/softap_example_main.c | 4 +- .../station/main/station_example_main.c | 4 +- examples/wifi/iperf/main/cmd_wifi.c | 2 +- examples/wifi/iperf/main/iperf_example_main.c | 2 +- examples/wifi/power_save/main/power_save.c | 2 +- examples/wifi/scan/main/scan.c | 2 +- .../wifi/simple_sniffer/main/cmd_sniffer.c | 4 +- .../wifi/simple_sniffer/main/cmd_sniffer.h | 2 +- .../main/simple_sniffer_example_main.c | 12 +-- .../wifi/smart_config/main/smartconfig_main.c | 2 +- .../main/wpa2_enterprise_main.c | 2 +- examples/wifi/wps/main/wps.c | 2 +- tools/esp_app_trace/test/sysview/blink.c | 2 +- tools/kconfig/nconf.gui.c | 2 +- .../test_utils/include/test_utils.h | 10 +-- .../components/test_utils/ref_clock.c | 6 +- .../components/test_utils/test_runner.c | 4 +- .../components/test_utils/test_utils.c | 4 +- tools/unit-test-app/main/app_main.c | 2 +- .../tool_setup/cmdlinerunner/cmdlinerunner.c | 4 +- 507 files changed, 1295 insertions(+), 1295 deletions(-) diff --git a/components/app_trace/app_trace.c b/components/app_trace/app_trace.c index 5a577a70d..c85ad6a2a 100644 --- a/components/app_trace/app_trace.c +++ b/components/app_trace/app_trace.c @@ -360,7 +360,7 @@ static esp_apptrace_hw_t s_trace_hw[ESP_APPTRACE_HW_MAX] = { } }; -static inline int esp_apptrace_log_lock() +static inline int esp_apptrace_log_lock(void) { #if ESP_APPTRACE_PRINT_LOCK esp_apptrace_tmo_t tmo; @@ -372,14 +372,14 @@ static inline int esp_apptrace_log_lock() #endif } -static inline void esp_apptrace_log_unlock() +static inline void esp_apptrace_log_unlock(void) { #if ESP_APPTRACE_PRINT_LOCK esp_apptrace_lock_give(&s_log_lock); #endif } -static inline esp_err_t esp_apptrace_lock_initialize() +static inline esp_err_t esp_apptrace_lock_initialize(void) { #if CONFIG_ESP32_APPTRACE_LOCK_ENABLE esp_apptrace_lock_init(&s_trace_buf.lock); @@ -387,7 +387,7 @@ static inline esp_err_t esp_apptrace_lock_initialize() return ESP_OK; } -static inline esp_err_t esp_apptrace_lock_cleanup() +static inline esp_err_t esp_apptrace_lock_cleanup(void) { return ESP_OK; } @@ -403,7 +403,7 @@ esp_err_t esp_apptrace_lock(esp_apptrace_tmo_t *tmo) return ESP_OK; } -esp_err_t esp_apptrace_unlock() +esp_err_t esp_apptrace_unlock(void) { esp_err_t ret = ESP_OK; #if CONFIG_ESP32_APPTRACE_LOCK_ENABLE @@ -413,7 +413,7 @@ esp_err_t esp_apptrace_unlock() } #if CONFIG_ESP32_APPTRACE_DEST_TRAX -static void esp_apptrace_trax_init() +static void esp_apptrace_trax_init(void) { // Stop trace, if any (on the current CPU) eri_write(ERI_TRAX_TRAXCTRL, TRAXCTRL_TRSTP); @@ -449,7 +449,7 @@ static void esp_apptrace_trax_pend_chunk_sz_update(uint16_t size) } } -static uint16_t esp_apptrace_trax_pend_chunk_sz_get() +static uint16_t esp_apptrace_trax_pend_chunk_sz_get(void) { uint16_t ch_sz; ESP_APPTRACE_LOGD("Get chunk enter %d w-r-s %d-%d-%d", s_trace_buf.trax.cur_pending_chunk_sz, @@ -467,7 +467,7 @@ static uint16_t esp_apptrace_trax_pend_chunk_sz_get() #endif // assumed to be protected by caller from multi-core/thread access -static esp_err_t esp_apptrace_trax_block_switch() +static esp_err_t esp_apptrace_trax_block_switch(void) { int prev_block_num = s_trace_buf.trax.state.in_block % 2; int new_block_num = prev_block_num ? (0) : (1); @@ -845,7 +845,7 @@ static esp_err_t esp_apptrace_trax_status_reg_get(uint32_t *val) return ESP_OK; } -static esp_err_t esp_apptrace_trax_dest_init() +static esp_err_t esp_apptrace_trax_dest_init(void) { for (int i = 0; i < ESP_APPTRACE_TRAX_BLOCKS_NUM; i++) { s_trace_buf.trax.blocks[i].start = (uint8_t *)s_trax_blocks[i]; @@ -874,7 +874,7 @@ static esp_err_t esp_apptrace_trax_dest_init() } #endif -esp_err_t esp_apptrace_init() +esp_err_t esp_apptrace_init(void) { int res; diff --git a/components/app_trace/gcov/gcov_rtio.c b/components/app_trace/gcov/gcov_rtio.c index 41306b288..d01d7c6b6 100644 --- a/components/app_trace/gcov/gcov_rtio.c +++ b/components/app_trace/gcov/gcov_rtio.c @@ -114,7 +114,7 @@ static int esp_dbg_stub_gcov_entry(void) #endif } -void esp_gcov_dump() +void esp_gcov_dump(void) { // disable IRQs on this CPU, other CPU is halted by OpenOCD unsigned irq_state = portENTER_CRITICAL_NESTED(); diff --git a/components/app_trace/heap_trace_tohost.c b/components/app_trace/heap_trace_tohost.c index 764022aba..41dd92a65 100644 --- a/components/app_trace/heap_trace_tohost.c +++ b/components/app_trace/heap_trace_tohost.c @@ -32,7 +32,7 @@ static bool s_tracing; -esp_err_t heap_trace_init_tohost() +esp_err_t heap_trace_init_tohost(void) { if (s_tracing) { return ESP_ERR_INVALID_STATE; diff --git a/components/app_trace/include/esp_app_trace.h b/components/app_trace/include/esp_app_trace.h index a623ada7f..822b698ee 100644 --- a/components/app_trace/include/esp_app_trace.h +++ b/components/app_trace/include/esp_app_trace.h @@ -33,7 +33,7 @@ typedef enum { * * @return ESP_OK on success, otherwise see esp_err_t */ -esp_err_t esp_apptrace_init(); +esp_err_t esp_apptrace_init(void); /** * @brief Configures down buffer. diff --git a/components/app_trace/sys_view/Config/SEGGER_RTT_Conf.h b/components/app_trace/sys_view/Config/SEGGER_RTT_Conf.h index 2325944e5..a46879780 100644 --- a/components/app_trace/sys_view/Config/SEGGER_RTT_Conf.h +++ b/components/app_trace/sys_view/Config/SEGGER_RTT_Conf.h @@ -285,12 +285,12 @@ Revision: $Rev: 5626 $ * RTT lock configuration fallback */ #ifndef SEGGER_RTT_LOCK - void SEGGER_SYSVIEW_X_RTT_Lock(); + void SEGGER_SYSVIEW_X_RTT_Lock(void); #define SEGGER_RTT_LOCK() SEGGER_SYSVIEW_X_RTT_Lock() // Lock RTT (nestable) (i.e. disable interrupts) #endif #ifndef SEGGER_RTT_UNLOCK - void SEGGER_SYSVIEW_X_RTT_Unlock(); + void SEGGER_SYSVIEW_X_RTT_Unlock(void); #define SEGGER_RTT_UNLOCK() SEGGER_SYSVIEW_X_RTT_Unlock() // Unlock RTT (nestable) (i.e. enable previous interrupt lock state) #endif diff --git a/components/app_trace/sys_view/Config/SEGGER_SYSVIEW_Conf.h b/components/app_trace/sys_view/Config/SEGGER_SYSVIEW_Conf.h index 2968c6e02..aee813a3b 100644 --- a/components/app_trace/sys_view/Config/SEGGER_SYSVIEW_Conf.h +++ b/components/app_trace/sys_view/Config/SEGGER_SYSVIEW_Conf.h @@ -166,7 +166,7 @@ Revision: $Rev: 5927 $ #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() SEGGER_SYSVIEW_X_GetInterruptId() // Get the currently active interrupt Id from the user-provided function. #endif -unsigned SEGGER_SYSVIEW_X_SysView_Lock(); +unsigned SEGGER_SYSVIEW_X_SysView_Lock(void); void SEGGER_SYSVIEW_X_SysView_Unlock(unsigned int_state); // to be recursive save IRQ status on the stack of the caller #define SEGGER_SYSVIEW_LOCK() unsigned _SYSVIEW_int_state = SEGGER_SYSVIEW_X_SysView_Lock() diff --git a/components/app_trace/sys_view/Sample/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c b/components/app_trace/sys_view/Sample/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c index 90db930d5..b1e9fc14e 100644 --- a/components/app_trace/sys_view/Sample/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c +++ b/components/app_trace/sys_view/Sample/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c @@ -244,7 +244,7 @@ static void _cbSendSystemDesc(void) { * ********************************************************************** */ -static void SEGGER_SYSVIEW_TS_Init() +static void SEGGER_SYSVIEW_TS_Init(void) { /* We only need to initialize something if we use Timer Group. * esp_timer and ccount can be used as is. @@ -316,7 +316,7 @@ void SEGGER_SYSVIEW_Conf(void) { SEGGER_SYSVIEW_DisableEvents(disable_evts); } -U32 SEGGER_SYSVIEW_X_GetTimestamp() +U32 SEGGER_SYSVIEW_X_GetTimestamp(void) { #if TS_USE_TIMERGROUP uint64_t ts = 0; @@ -329,15 +329,15 @@ U32 SEGGER_SYSVIEW_X_GetTimestamp() #endif } -void SEGGER_SYSVIEW_X_RTT_Lock() +void SEGGER_SYSVIEW_X_RTT_Lock(void) { } -void SEGGER_SYSVIEW_X_RTT_Unlock() +void SEGGER_SYSVIEW_X_RTT_Unlock(void) { } -unsigned SEGGER_SYSVIEW_X_SysView_Lock() +unsigned SEGGER_SYSVIEW_X_SysView_Lock(void) { esp_apptrace_tmo_t tmo; esp_apptrace_tmo_init(&tmo, SEGGER_LOCK_WAIT_TMO); diff --git a/components/app_trace/test/test_trace.c b/components/app_trace/test/test_trace.c index 6d95a87c5..3037ab431 100644 --- a/components/app_trace/test/test_trace.c +++ b/components/app_trace/test/test_trace.c @@ -125,7 +125,7 @@ typedef struct { static SemaphoreHandle_t s_print_lock; #endif -static uint64_t esp_apptrace_test_ts_get(); +static uint64_t esp_apptrace_test_ts_get(void); static void esp_apptrace_test_timer_isr(void *arg) { @@ -383,7 +383,7 @@ static void esp_apptrace_test_task_crash(void *p) static int s_ts_timer_group, s_ts_timer_idx; -static uint64_t esp_apptrace_test_ts_get() +static uint64_t esp_apptrace_test_ts_get(void) { uint64_t ts = 0; timer_get_counter_value(s_ts_timer_group, s_ts_timer_idx, &ts); @@ -413,7 +413,7 @@ static void esp_apptrace_test_ts_init(int timer_group, int timer_idx) timer_start(timer_group, timer_idx); } -static void esp_apptrace_test_ts_cleanup() +static void esp_apptrace_test_ts_cleanup(void) { timer_config_t config; diff --git a/components/app_update/esp_ota_ops.c b/components/app_update/esp_ota_ops.c index df6d8a906..7ef5c68c5 100644 --- a/components/app_update/esp_ota_ops.c +++ b/components/app_update/esp_ota_ops.c @@ -687,12 +687,12 @@ static esp_err_t esp_ota_current_ota_is_workable(bool valid) return ESP_OK; } -esp_err_t esp_ota_mark_app_valid_cancel_rollback() +esp_err_t esp_ota_mark_app_valid_cancel_rollback(void) { return esp_ota_current_ota_is_workable(true); } -esp_err_t esp_ota_mark_app_invalid_rollback_and_reboot() +esp_err_t esp_ota_mark_app_invalid_rollback_and_reboot(void) { return esp_ota_current_ota_is_workable(false); } @@ -715,7 +715,7 @@ static int get_last_invalid_otadata(const esp_ota_select_entry_t *two_otadata) return num_invalid_otadata; } -const esp_partition_t* esp_ota_get_last_invalid_partition() +const esp_partition_t* esp_ota_get_last_invalid_partition(void) { esp_ota_select_entry_t otadata[2]; if (read_otadata(otadata) == NULL) { diff --git a/components/app_update/include/esp_ota_ops.h b/components/app_update/include/esp_ota_ops.h index 73ca8a302..4dc2b80fe 100644 --- a/components/app_update/include/esp_ota_ops.h +++ b/components/app_update/include/esp_ota_ops.h @@ -221,7 +221,7 @@ esp_err_t esp_ota_get_partition_description(const esp_partition_t *partition, es * @return * - ESP_OK: if successful. */ -esp_err_t esp_ota_mark_app_valid_cancel_rollback(); +esp_err_t esp_ota_mark_app_valid_cancel_rollback(void); /** * @brief This function is called to roll back to the previously workable app with reboot. @@ -233,14 +233,14 @@ esp_err_t esp_ota_mark_app_valid_cancel_rollback(); * - ESP_FAIL: if not successful. * - ESP_ERR_OTA_ROLLBACK_FAILED: The rollback is not possible due to flash does not have any apps. */ -esp_err_t esp_ota_mark_app_invalid_rollback_and_reboot(); +esp_err_t esp_ota_mark_app_invalid_rollback_and_reboot(void); /** * @brief Returns last partition with invalid state (ESP_OTA_IMG_INVALID or ESP_OTA_IMG_ABORTED). * * @return partition. */ -const esp_partition_t* esp_ota_get_last_invalid_partition(); +const esp_partition_t* esp_ota_get_last_invalid_partition(void); /** * @brief Returns state for given partition. diff --git a/components/app_update/test/test_switch_ota.c b/components/app_update/test/test_switch_ota.c index bfa7b25be..232bfbc88 100644 --- a/components/app_update/test/test_switch_ota.c +++ b/components/app_update/test/test_switch_ota.c @@ -118,7 +118,7 @@ static void reboot_as_deep_sleep(void) /* @brief Copies a current app to next partition (OTA0-15), after that ESP is rebooting and run this (the next) OTAx. */ -static void copy_current_app_to_next_part_and_reboot() +static void copy_current_app_to_next_part_and_reboot(void) { const esp_partition_t *cur_app = esp_ota_get_running_partition(); copy_current_app_to_next_part(cur_app, get_next_update_partition()); diff --git a/components/bootloader/subproject/main/bootloader_start.c b/components/bootloader/subproject/main/bootloader_start.c index 7a7e76aa6..e9bd32d88 100644 --- a/components/bootloader/subproject/main/bootloader_start.c +++ b/components/bootloader/subproject/main/bootloader_start.c @@ -34,7 +34,7 @@ static int selected_boot_partition(const bootloader_state_t *bs); * The hardware is mostly uninitialized, flash cache is down and the app CPU is in reset. * We do have a stack, so we can do the initialization in C. */ -void __attribute__((noreturn)) call_start_cpu0() +void __attribute__((noreturn)) call_start_cpu0(void) { // 1. Hardware initialization if (bootloader_init() != ESP_OK) { @@ -113,7 +113,7 @@ static int selected_boot_partition(const bootloader_state_t *bs) } // Return global reent struct if any newlib functions are linked to bootloader -struct _reent* __getreent() { +struct _reent* __getreent(void) { return _GLOBAL_REENT; } diff --git a/components/bootloader_support/include/bootloader_common.h b/components/bootloader_support/include/bootloader_common.h index 2475d842a..4b887f55f 100644 --- a/components/bootloader_support/include/bootloader_common.h +++ b/components/bootloader_support/include/bootloader_common.h @@ -144,7 +144,7 @@ esp_err_t bootloader_common_get_partition_description(const esp_partition_pos_t /** * @brief Configure VDDSDIO, call this API to rise VDDSDIO to 1.9V when VDDSDIO regulator is enabled as 1.8V mode. */ -void bootloader_common_vddsdio_configure(); +void bootloader_common_vddsdio_configure(void); #ifdef __cplusplus } diff --git a/components/bootloader_support/include/bootloader_flash_config.h b/components/bootloader_support/include/bootloader_flash_config.h index 2f716cce2..98c169f48 100644 --- a/components/bootloader_support/include/bootloader_flash_config.h +++ b/components/bootloader_support/include/bootloader_flash_config.h @@ -25,7 +25,7 @@ extern "C" { * * @return None */ -void bootloader_flash_update_id(); +void bootloader_flash_update_id(void); /** * @brief Set the flash CS setup and hold time. @@ -35,7 +35,7 @@ void bootloader_flash_update_id(); * * @return None */ -void bootloader_flash_cs_timing_config(); +void bootloader_flash_cs_timing_config(void); /** * @brief Configure SPI flash clock. diff --git a/components/bootloader_support/include/esp_flash_encrypt.h b/components/bootloader_support/include/esp_flash_encrypt.h index c0de5ca17..028842d97 100644 --- a/components/bootloader_support/include/esp_flash_encrypt.h +++ b/components/bootloader_support/include/esp_flash_encrypt.h @@ -122,7 +122,7 @@ esp_err_t esp_flash_encrypt_region(uint32_t src_addr, size_t data_length); * serial re-flashing of an unauthorised code in absence of secure boot. * */ -void esp_flash_write_protect_crypt_cnt(); +void esp_flash_write_protect_crypt_cnt(void); /** @brief Return the flash encryption mode * @@ -131,7 +131,7 @@ void esp_flash_write_protect_crypt_cnt(); * * @return */ -esp_flash_enc_mode_t esp_get_flash_encryption_mode(); +esp_flash_enc_mode_t esp_get_flash_encryption_mode(void); #ifdef __cplusplus } diff --git a/components/bootloader_support/include_bootloader/bootloader_flash.h b/components/bootloader_support/include_bootloader/bootloader_flash.h index 6ac724646..18baad594 100644 --- a/components/bootloader_support/include_bootloader/bootloader_flash.h +++ b/components/bootloader_support/include_bootloader/bootloader_flash.h @@ -35,7 +35,7 @@ * * @return Number of free pages */ -uint32_t bootloader_mmap_get_free_pages(); +uint32_t bootloader_mmap_get_free_pages(void); /** * @brief Map a region of flash to data memory diff --git a/components/bootloader_support/include_bootloader/bootloader_init.h b/components/bootloader_support/include_bootloader/bootloader_init.h index 443a207cf..9c1f8719a 100644 --- a/components/bootloader_support/include_bootloader/bootloader_init.h +++ b/components/bootloader_support/include_bootloader/bootloader_init.h @@ -25,4 +25,4 @@ * @return ESP_OK - If the setting is successful. * ESP_FAIL - If the setting is not successful. */ -esp_err_t bootloader_init(); +esp_err_t bootloader_init(void); diff --git a/components/bootloader_support/include_bootloader/bootloader_sha.h b/components/bootloader_support/include_bootloader/bootloader_sha.h index 3bfefb9f5..99db64b99 100644 --- a/components/bootloader_support/include_bootloader/bootloader_sha.h +++ b/components/bootloader_support/include_bootloader/bootloader_sha.h @@ -26,7 +26,7 @@ typedef void *bootloader_sha256_handle_t; -bootloader_sha256_handle_t bootloader_sha256_start(); +bootloader_sha256_handle_t bootloader_sha256_start(void); void bootloader_sha256_data(bootloader_sha256_handle_t handle, const void *data, size_t data_len); diff --git a/components/bootloader_support/include_bootloader/flash_qio_mode.h b/components/bootloader_support/include_bootloader/flash_qio_mode.h index 98e2fd22a..7f70d5bb0 100644 --- a/components/bootloader_support/include_bootloader/flash_qio_mode.h +++ b/components/bootloader_support/include_bootloader/flash_qio_mode.h @@ -30,7 +30,7 @@ void bootloader_enable_qio_mode(void); * mfg_id = (ID >> 16) & 0xFF; flash_id = ID & 0xffff; */ -uint32_t bootloader_read_flash_id(); +uint32_t bootloader_read_flash_id(void); #ifdef __cplusplus } diff --git a/components/bootloader_support/src/bootloader_clock.c b/components/bootloader_support/src/bootloader_clock.c index fda86b207..3befda16d 100644 --- a/components/bootloader_support/src/bootloader_clock.c +++ b/components/bootloader_support/src/bootloader_clock.c @@ -18,7 +18,7 @@ #include "soc/dport_reg.h" #include "soc/efuse_periph.h" -void bootloader_clock_configure() +void bootloader_clock_configure(void) { // ROM bootloader may have put a lot of text into UART0 FIFO. // Wait for it to be printed. diff --git a/components/bootloader_support/src/bootloader_common.c b/components/bootloader_support/src/bootloader_common.c index ed0169a96..a10fb2f2a 100644 --- a/components/bootloader_support/src/bootloader_common.c +++ b/components/bootloader_support/src/bootloader_common.c @@ -256,7 +256,7 @@ esp_err_t bootloader_common_get_partition_description(const esp_partition_pos_t return ESP_OK; } -void bootloader_common_vddsdio_configure() +void bootloader_common_vddsdio_configure(void) { #if CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V rtc_vddsdio_config_t cfg = rtc_vddsdio_get_config(); diff --git a/components/bootloader_support/src/bootloader_flash.c b/components/bootloader_support/src/bootloader_flash.c index 6b25addf2..09ed73deb 100644 --- a/components/bootloader_support/src/bootloader_flash.c +++ b/components/bootloader_support/src/bootloader_flash.c @@ -25,7 +25,7 @@ static const char *TAG = "bootloader_mmap"; static spi_flash_mmap_handle_t map; -uint32_t bootloader_mmap_get_free_pages() +uint32_t bootloader_mmap_get_free_pages(void) { return spi_flash_mmap_get_free_pages(SPI_FLASH_MMAP_DATA); } @@ -103,7 +103,7 @@ static bool mapped; // Current bootloader mapping (ab)used for bootloader_read() static uint32_t current_read_mapping = UINT32_MAX; -uint32_t bootloader_mmap_get_free_pages() +uint32_t bootloader_mmap_get_free_pages(void) { /** * Allow mapping up to 50 of the 51 available MMU blocks (last one used for reads) diff --git a/components/bootloader_support/src/bootloader_flash_config.c b/components/bootloader_support/src/bootloader_flash_config.c index 53360848a..091727e33 100644 --- a/components/bootloader_support/src/bootloader_flash_config.c +++ b/components/bootloader_support/src/bootloader_flash_config.c @@ -27,12 +27,12 @@ #include "flash_qio_mode.h" #include "bootloader_flash_config.h" -void bootloader_flash_update_id() +void bootloader_flash_update_id(void) { g_rom_flashchip.device_id = bootloader_read_flash_id(); } -void IRAM_ATTR bootloader_flash_cs_timing_config() +void IRAM_ATTR bootloader_flash_cs_timing_config(void) { SET_PERI_REG_MASK(SPI_USER_REG(0), SPI_CS_HOLD_M | SPI_CS_SETUP_M); SET_PERI_REG_BITS(SPI_CTRL2_REG(0), SPI_HOLD_TIME_V, 1, SPI_HOLD_TIME_S); diff --git a/components/bootloader_support/src/bootloader_init.c b/components/bootloader_support/src/bootloader_init.c index 67ec3626c..26b8fd0b3 100644 --- a/components/bootloader_support/src/bootloader_init.c +++ b/components/bootloader_support/src/bootloader_init.c @@ -61,7 +61,7 @@ extern int _data_end; static const char* TAG = "boot"; -static esp_err_t bootloader_main(); +static esp_err_t bootloader_main(void); static void print_flash_info(const esp_image_header_t* pfhdr); static void update_flash_config(const esp_image_header_t* pfhdr); static void bootloader_init_flash_configure(const esp_image_header_t* pfhdr); @@ -69,7 +69,7 @@ static void uart_console_configure(void); static void wdt_reset_check(void); -esp_err_t bootloader_init() +esp_err_t bootloader_init(void) { cpu_configure_region_protection(); cpu_init_memctl(); @@ -117,7 +117,7 @@ esp_err_t bootloader_init() return ESP_OK; } -static esp_err_t bootloader_main() +static esp_err_t bootloader_main(void) { bootloader_common_vddsdio_configure(); /* Read and keep flash ID, for further use. */ @@ -434,7 +434,7 @@ void __assert_func(const char *file, int line, const char *func, const char *exp while(1) {} } -void abort() +void abort(void) { #if !CONFIG_ESP32_PANIC_SILENT_REBOOT ets_printf("abort() was called at PC 0x%08x\r\n", (intptr_t)__builtin_return_address(0) - 3); diff --git a/components/bootloader_support/src/esp32/bootloader_sha.c b/components/bootloader_support/src/esp32/bootloader_sha.c index f42c8b663..6ebbab875 100644 --- a/components/bootloader_support/src/esp32/bootloader_sha.c +++ b/components/bootloader_support/src/esp32/bootloader_sha.c @@ -27,7 +27,7 @@ static const size_t BLOCK_WORDS = (64 / sizeof(uint32_t)); // Words in final SHA256 digest static const size_t DIGEST_WORDS = (32 / sizeof(uint32_t)); -bootloader_sha256_handle_t bootloader_sha256_start() +bootloader_sha256_handle_t bootloader_sha256_start(void) { // Enable SHA hardware ets_sha_enable(); diff --git a/components/bootloader_support/src/esp32/flash_encrypt.c b/components/bootloader_support/src/esp32/flash_encrypt.c index 7b816e292..41925de27 100644 --- a/components/bootloader_support/src/esp32/flash_encrypt.c +++ b/components/bootloader_support/src/esp32/flash_encrypt.c @@ -38,7 +38,7 @@ static const char *TAG = "flash_encrypt"; /* Static functions for stages of flash encryption */ static esp_err_t initialise_flash_encryption(void); static esp_err_t encrypt_flash_contents(uint32_t flash_crypt_cnt, bool flash_crypt_wr_dis); -static esp_err_t encrypt_bootloader(); +static esp_err_t encrypt_bootloader(void); static esp_err_t encrypt_and_load_partition_table(esp_partition_info_t *partition_table, int *num_partitions); static esp_err_t encrypt_partition(int index, const esp_partition_info_t *partition); @@ -223,7 +223,7 @@ static esp_err_t encrypt_flash_contents(uint32_t flash_crypt_cnt, bool flash_cry return ESP_OK; } -static esp_err_t encrypt_bootloader() +static esp_err_t encrypt_bootloader(void) { esp_err_t err; uint32_t image_length; diff --git a/components/bootloader_support/src/esp32/secure_boot.c b/components/bootloader_support/src/esp32/secure_boot.c index 65fda0956..023d28142 100644 --- a/components/bootloader_support/src/esp32/secure_boot.c +++ b/components/bootloader_support/src/esp32/secure_boot.c @@ -95,7 +95,7 @@ static bool secure_boot_generate(uint32_t image_len){ } /* Burn values written to the efuse write registers */ -static inline void burn_efuses() +static inline void burn_efuses(void) { esp_efuse_burn_new_values(); } diff --git a/components/bootloader_support/src/flash_encrypt.c b/components/bootloader_support/src/flash_encrypt.c index 606cb79fb..d64d2fd9d 100644 --- a/components/bootloader_support/src/flash_encrypt.c +++ b/components/bootloader_support/src/flash_encrypt.c @@ -17,7 +17,7 @@ #include "esp_efuse_table.h" #include "esp_flash_encrypt.h" -void esp_flash_write_protect_crypt_cnt() +void esp_flash_write_protect_crypt_cnt(void) { uint8_t flash_crypt_cnt_wr_dis = 0; esp_efuse_read_field_blob(ESP_EFUSE_WR_DIS_FLASH_CRYPT_CNT, &flash_crypt_cnt_wr_dis, 1); @@ -26,7 +26,7 @@ void esp_flash_write_protect_crypt_cnt() } } -esp_flash_enc_mode_t esp_get_flash_encryption_mode() +esp_flash_enc_mode_t esp_get_flash_encryption_mode(void) { uint8_t efuse_flash_crypt_cnt_wr_protected = 0; uint8_t dis_dl_enc = 0, dis_dl_dec = 0, dis_dl_cache = 0; diff --git a/components/bootloader_support/src/flash_qio_mode.c b/components/bootloader_support/src/flash_qio_mode.c index db486c73e..06a8fcada 100644 --- a/components/bootloader_support/src/flash_qio_mode.c +++ b/components/bootloader_support/src/flash_qio_mode.c @@ -53,11 +53,11 @@ typedef struct __attribute__((packed)) { } qio_info_t; /* Read 8 bit status using RDSR command */ -static unsigned read_status_8b_rdsr(); +static unsigned read_status_8b_rdsr(void); /* Read 8 bit status (second byte) using RDSR2 command */ -static unsigned read_status_8b_rdsr2(); +static unsigned read_status_8b_rdsr2(void); /* read 16 bit status using RDSR & RDSR2 (low and high bytes) */ -static unsigned read_status_16b_rdsr_rdsr2(); +static unsigned read_status_16b_rdsr_rdsr2(void); /* Write 8 bit status using WRSR */ static void write_status_8b_wrsr(unsigned new_status); @@ -67,7 +67,7 @@ static void write_status_8b_wrsr2(unsigned new_status); static void write_status_16b_wrsr(unsigned new_status); /* Read 8 bit status of XM25QU64A */ -static unsigned read_status_8b_xmc25qu64a(); +static unsigned read_status_8b_xmc25qu64a(void); /* Write 8 bit status of XM25QU64A */ static void write_status_8b_xmc25qu64a(unsigned new_status); @@ -121,7 +121,7 @@ static uint32_t execute_flash_command(uint8_t command, uint32_t mosi_data, uint8 /* dummy_len_plus values defined in ROM for SPI flash configuration */ extern uint8_t g_rom_spiflash_dummy_len_plus[]; -uint32_t bootloader_read_flash_id() +uint32_t bootloader_read_flash_id(void) { uint32_t id = execute_flash_command(CMD_RDID, 0, 0, 24); id = ((id & 0xff) << 16) | ((id >> 16) & 0xff) | (id & 0xff00); @@ -223,17 +223,17 @@ static esp_err_t enable_qio_mode(read_status_fn_t read_status_fn, return ESP_OK; } -static unsigned read_status_8b_rdsr() +static unsigned read_status_8b_rdsr(void) { return execute_flash_command(CMD_RDSR, 0, 0, 8); } -static unsigned read_status_8b_rdsr2() +static unsigned read_status_8b_rdsr2(void) { return execute_flash_command(CMD_RDSR2, 0, 0, 8); } -static unsigned read_status_16b_rdsr_rdsr2() +static unsigned read_status_16b_rdsr_rdsr2(void) { return execute_flash_command(CMD_RDSR, 0, 0, 8) | (execute_flash_command(CMD_RDSR2, 0, 0, 8) << 8); } @@ -253,7 +253,7 @@ static void write_status_16b_wrsr(unsigned new_status) execute_flash_command(CMD_WRSR, new_status, 16, 0); } -static unsigned read_status_8b_xmc25qu64a() +static unsigned read_status_8b_xmc25qu64a(void) { execute_flash_command(CMD_OTPEN, 0, 0, 0); /* Enter OTP mode */ esp_rom_spiflash_wait_idle(&g_rom_flashchip); diff --git a/components/bootloader_support/src/idf/bootloader_sha.c b/components/bootloader_support/src/idf/bootloader_sha.c index 7dc4f7429..849c86b38 100644 --- a/components/bootloader_support/src/idf/bootloader_sha.c +++ b/components/bootloader_support/src/idf/bootloader_sha.c @@ -18,7 +18,7 @@ #include #include -bootloader_sha256_handle_t bootloader_sha256_start() +bootloader_sha256_handle_t bootloader_sha256_start(void) { mbedtls_sha256_context *ctx = (mbedtls_sha256_context *)malloc(sizeof(mbedtls_sha256_context)); if (!ctx) { diff --git a/components/bt/host/bluedroid/api/esp_spp_api.c b/components/bt/host/bluedroid/api/esp_spp_api.c index 57c2e317a..d68511cf4 100644 --- a/components/bt/host/bluedroid/api/esp_spp_api.c +++ b/components/bt/host/bluedroid/api/esp_spp_api.c @@ -54,7 +54,7 @@ esp_err_t esp_spp_init(esp_spp_mode_t mode) return (btc_transfer_context(&msg, &arg, sizeof(btc_spp_args_t), NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL); } -esp_err_t esp_spp_deinit() +esp_err_t esp_spp_deinit(void) { btc_msg_t msg; btc_spp_args_t arg; @@ -164,7 +164,7 @@ esp_err_t esp_spp_write(uint32_t handle, int len, uint8_t *p_data) return (btc_transfer_context(&msg, &arg, sizeof(btc_spp_args_t), btc_spp_arg_deep_copy) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL); } -esp_err_t esp_spp_vfs_register() +esp_err_t esp_spp_vfs_register(void) { ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED); diff --git a/components/bt/host/bluedroid/api/include/api/esp_spp_api.h b/components/bt/host/bluedroid/api/include/api/esp_spp_api.h index 31bcf1c68..1b96cbbe0 100644 --- a/components/bt/host/bluedroid/api/include/api/esp_spp_api.h +++ b/components/bt/host/bluedroid/api/include/api/esp_spp_api.h @@ -205,7 +205,7 @@ esp_err_t esp_spp_init(esp_spp_mode_t mode); * - ESP_OK: success * - other: failed */ -esp_err_t esp_spp_deinit(); +esp_err_t esp_spp_deinit(void); /** diff --git a/components/bt/host/bluedroid/bta/dm/bta_dm_main.c b/components/bt/host/bluedroid/bta/dm/bta_dm_main.c index d62974ea2..aa4b3250d 100644 --- a/components/bt/host/bluedroid/bta/dm/bta_dm_main.c +++ b/components/bt/host/bluedroid/bta/dm/bta_dm_main.c @@ -360,7 +360,7 @@ const tBTA_DM_ST_TBL bta_dm_search_st_tbl[] = { ** Returns void ** *******************************************************************************/ -void bta_dm_sm_disable( ) +void bta_dm_sm_disable(void) { bta_sys_deregister( BTA_ID_DM ); } @@ -412,7 +412,7 @@ BOOLEAN bta_dm_sm_execute(BT_HDR *p_msg) ** Returns void ** *******************************************************************************/ -void bta_dm_search_sm_disable( ) +void bta_dm_search_sm_disable(void) { bta_sys_deregister( BTA_ID_DM_SEARCH ); diff --git a/components/bt/host/bluedroid/bta/dm/bta_dm_pm.c b/components/bt/host/bluedroid/bta/dm/bta_dm_pm.c index 5b0978bf5..ff42a65a1 100644 --- a/components/bt/host/bluedroid/bta/dm/bta_dm_pm.c +++ b/components/bt/host/bluedroid/bta/dm/bta_dm_pm.c @@ -46,7 +46,7 @@ static void bta_dm_pm_timer_cback(void *p_tle); static void bta_dm_pm_btm_cback(BD_ADDR bd_addr, tBTM_PM_STATUS status, UINT16 value, UINT8 hci_status); static BOOLEAN bta_dm_pm_park(BD_ADDR peer_addr); static BOOLEAN bta_dm_pm_sniff(tBTA_DM_PEER_DEVICE *p_peer_dev, UINT8 index); -static BOOLEAN bta_dm_pm_is_sco_active (); +static BOOLEAN bta_dm_pm_is_sco_active (void); static void bta_dm_pm_hid_check(BOOLEAN bScoActive); static void bta_dm_pm_set_sniff_policy(tBTA_DM_PEER_DEVICE *p_dev, BOOLEAN bDisable); static void bta_dm_pm_stop_timer_by_index(tBTA_PM_TIMER *p_timer, @@ -1001,7 +1001,7 @@ void bta_dm_pm_timer(tBTA_DM_MSG *p_data) ** Returns BOOLEAN. TRUE if SCO active, else FALSE ** *******************************************************************************/ -static BOOLEAN bta_dm_pm_is_sco_active () +static BOOLEAN bta_dm_pm_is_sco_active (void) { int j; BOOLEAN bScoActive = FALSE; diff --git a/components/bt/host/bluedroid/bta/gatt/bta_gattc_co.c b/components/bt/host/bluedroid/bta/gatt/bta_gattc_co.c index a336c2314..0573b7bf7 100644 --- a/components/bt/host/bluedroid/bta/gatt/bta_gattc_co.c +++ b/components/bt/host/bluedroid/bta/gatt/bta_gattc_co.c @@ -48,7 +48,7 @@ static void getFilename(char *buffer, BD_ADDR bda) , bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]); } -static void cacheClose() +static void cacheClose(void) { if (sCacheFD != 0) { fclose(sCacheFD); diff --git a/components/bt/host/bluedroid/bta/hf_client/bta_hf_client_at.c b/components/bt/host/bluedroid/bta/hf_client/bta_hf_client_at.c index 33ae29348..43a2af6ab 100644 --- a/components/bt/host/bluedroid/bta/hf_client/bta_hf_client_at.c +++ b/components/bt/host/bluedroid/bta/hf_client/bta_hf_client_at.c @@ -94,7 +94,7 @@ UINT32 service_index = 0; BOOLEAN service_availability = TRUE; /* helper functions for handling AT commands queueing */ -static void bta_hf_client_handle_ok(); +static void bta_hf_client_handle_ok(void); static void bta_hf_client_clear_queued_at(void) { @@ -268,7 +268,7 @@ static void bta_hf_client_start_at_hold_timer(void) ** No buffer parsing is being done here. *******************************************************************************/ -static void bta_hf_client_handle_ok() +static void bta_hf_client_handle_ok(void) { APPL_TRACE_DEBUG("%s", __FUNCTION__); @@ -342,7 +342,7 @@ static void bta_hf_client_handle_error(tBTA_HF_CLIENT_AT_RESULT_TYPE type, UINT1 bta_hf_client_send_queued_at(); } -static void bta_hf_client_handle_ring() +static void bta_hf_client_handle_ring(void) { APPL_TRACE_DEBUG("%s", __FUNCTION__); bta_hf_client_evt_val(BTA_HF_CLIENT_RING_INDICATION, 0); diff --git a/components/bt/host/bluedroid/bta/hf_client/include/bta_hf_client_int.h b/components/bt/host/bluedroid/bta/hf_client/include/bta_hf_client_int.h index 60dfc759c..fd52b3aef 100644 --- a/components/bt/host/bluedroid/bta/hf_client/include/bta_hf_client_int.h +++ b/components/bt/host/bluedroid/bta/hf_client/include/bta_hf_client_int.h @@ -212,7 +212,7 @@ extern void bta_hf_client_sm_execute(UINT16 event, extern void bta_hf_client_slc_seq(BOOLEAN error); extern void bta_hf_client_collision_cback (tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id, BD_ADDR peer_addr); -extern void bta_hf_client_resume_open (); +extern void bta_hf_client_resume_open (void); /* SDP functions */ extern BOOLEAN bta_hf_client_add_record(char *p_service_name, diff --git a/components/bt/host/bluedroid/bta/include/bta/bta_gatt_api.h b/components/bt/host/bluedroid/bta/include/bta/bta_gatt_api.h index 664536ddd..d2d89f078 100644 --- a/components/bt/host/bluedroid/bta/include/bta/bta_gatt_api.h +++ b/components/bt/host/bluedroid/bta/include/bta/bta_gatt_api.h @@ -1205,7 +1205,7 @@ extern void BTA_GATTC_ConfigureMTU (UINT16 conn_id); ** Returns None ** *******************************************************************************/ -extern void BTA_GATTS_Init(); +extern void BTA_GATTS_Init(void); /******************************************************************************* ** diff --git a/components/bt/host/bluedroid/bta/jv/bta_jv_act.c b/components/bt/host/bluedroid/bta/jv/bta_jv_act.c index ecef90b12..eca76c9a4 100644 --- a/components/bt/host/bluedroid/bta/jv/bta_jv_act.c +++ b/components/bt/host/bluedroid/bta/jv/bta_jv_act.c @@ -683,7 +683,7 @@ void bta_jv_disable (tBTA_JV_MSG *p_data) * list. * If no free PSMs exist, 0 will be returned. */ -static UINT16 bta_jv_get_free_psm() +static UINT16 bta_jv_get_free_psm(void) { const int cnt = sizeof(bta_jv_cb.free_psm_list) / sizeof(bta_jv_cb.free_psm_list[0]); for (int i = 0; i < cnt; i++) { diff --git a/components/bt/host/bluedroid/btc/core/btc_profile_queue.c b/components/bt/host/bluedroid/btc/core/btc_profile_queue.c index 6d01b0d19..3e5603db8 100644 --- a/components/bt/host/bluedroid/btc/core/btc_profile_queue.c +++ b/components/bt/host/bluedroid/btc/core/btc_profile_queue.c @@ -60,7 +60,7 @@ static void queue_int_add(connect_node_t *p_param) list_append(connect_queue, p_node); } -static void queue_int_advance() +static void queue_int_advance(void) { if (connect_queue && !list_is_empty(connect_queue)) { list_remove(connect_queue, list_front(connect_queue)); diff --git a/components/bt/host/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c b/components/bt/host/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c index aff552113..9cf21b91a 100644 --- a/components/bt/host/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c +++ b/components/bt/host/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c @@ -424,7 +424,7 @@ static void btc_a2dp_source_data_post(void) osi_thread_post(a2dp_source_local_param.btc_aa_src_task_hdl, btc_a2dp_source_handle_timer, NULL, 2, OSI_THREAD_MAX_TIMEOUT); } -static UINT64 time_now_us() +static UINT64 time_now_us(void) { #if _POSIX_TIMERS struct timespec ts_now; diff --git a/components/bt/host/bluedroid/btc/profile/std/smp/esp_app_sec.c b/components/bt/host/bluedroid/btc/profile/std/smp/esp_app_sec.c index e1ec079b4..c6bbadea7 100644 --- a/components/bt/host/bluedroid/btc/profile/std/smp/esp_app_sec.c +++ b/components/bt/host/bluedroid/btc/profile/std/smp/esp_app_sec.c @@ -79,7 +79,7 @@ void app_ble_sec_gen_ltk(UINT8 key_size) ** Returns NULL ** *******************************************************************************/ -void app_ble_sec_init() +void app_ble_sec_init(void) { // Reset Security Environment memset(&app_sec_env, 0, sizeof(app_sec_env)); diff --git a/components/bt/host/bluedroid/btc/profile/std/spp/btc_spp.c b/components/bt/host/bluedroid/btc/profile/std/spp/btc_spp.c index 93636ef71..912c57035 100644 --- a/components/bt/host/bluedroid/btc/profile/std/spp/btc_spp.c +++ b/components/bt/host/bluedroid/btc/profile/std/spp/btc_spp.c @@ -837,7 +837,7 @@ static ssize_t spp_vfs_read(int fd, void * dst, size_t size) return item_size; } -esp_err_t btc_spp_vfs_register() +esp_err_t btc_spp_vfs_register(void) { esp_vfs_t vfs = { .flags = ESP_VFS_FLAG_DEFAULT, diff --git a/components/bt/host/bluedroid/device/controller.c b/components/bt/host/bluedroid/device/controller.c index 96c773ebe..2c2ac129f 100644 --- a/components/bt/host/bluedroid/device/controller.c +++ b/components/bt/host/bluedroid/device/controller.c @@ -544,7 +544,7 @@ static const controller_t interface = { #endif /* (BTM_SCO_HCI_INCLUDED == TRUE) */ }; -const controller_t *controller_get_interface() +const controller_t *controller_get_interface(void) { static bool loaded = false; if (!loaded) { diff --git a/components/bt/host/bluedroid/device/include/device/controller.h b/components/bt/host/bluedroid/device/include/device/controller.h index 704b456d7..bb0986352 100644 --- a/components/bt/host/bluedroid/device/include/device/controller.h +++ b/components/bt/host/bluedroid/device/include/device/controller.h @@ -86,6 +86,6 @@ typedef struct controller_t { #endif /* #if (BTM_SCO_HCI_INCLUDED == TRUE) */ } controller_t; -const controller_t *controller_get_interface(); +const controller_t *controller_get_interface(void); #endif /*_CONTROLLER_H_*/ diff --git a/components/bt/host/bluedroid/hci/hci_hal_h4.c b/components/bt/host/bluedroid/hci/hci_hal_h4.c index 031d2c028..85d3598dc 100644 --- a/components/bt/host/bluedroid/hci/hci_hal_h4.c +++ b/components/bt/host/bluedroid/hci/hci_hal_h4.c @@ -121,7 +121,7 @@ static bool hal_open(const hci_hal_callbacks_t *upper_callbacks, void *task_thre return true; } -static void hal_close() +static void hal_close(void) { hci_hal_env_deinit(); @@ -367,7 +367,7 @@ static const hci_hal_t interface = { transmit_data, }; -const hci_hal_t *hci_hal_h4_get_interface() +const hci_hal_t *hci_hal_h4_get_interface(void) { return &interface; } diff --git a/components/bt/host/bluedroid/hci/hci_layer.c b/components/bt/host/bluedroid/hci/hci_layer.c index 6c285339c..2068062bf 100644 --- a/components/bt/host/bluedroid/hci/hci_layer.c +++ b/components/bt/host/bluedroid/hci/hci_layer.c @@ -535,7 +535,7 @@ static waiting_command_t *get_waiting_command(command_opcode_t opcode) return NULL; } -static void init_layer_interface() +static void init_layer_interface(void) { if (!interface_created) { interface.transmit_command = transmit_command; @@ -555,7 +555,7 @@ static const packet_fragmenter_callbacks_t packet_fragmenter_callbacks = { fragmenter_transmit_finished }; -const hci_t *hci_layer_get_interface() +const hci_t *hci_layer_get_interface(void) { hal = hci_hal_h4_get_interface(); packet_fragmenter = packet_fragmenter_get_interface(); diff --git a/components/bt/host/bluedroid/hci/hci_packet_factory.c b/components/bt/host/bluedroid/hci/hci_packet_factory.c index 19641d104..0145a138b 100644 --- a/components/bt/host/bluedroid/hci/hci_packet_factory.c +++ b/components/bt/host/bluedroid/hci/hci_packet_factory.c @@ -273,7 +273,7 @@ static const hci_packet_factory_t interface = { make_write_default_erroneous_data_report, }; -const hci_packet_factory_t *hci_packet_factory_get_interface() +const hci_packet_factory_t *hci_packet_factory_get_interface(void) { return &interface; } diff --git a/components/bt/host/bluedroid/hci/hci_packet_parser.c b/components/bt/host/bluedroid/hci/hci_packet_parser.c index eb4dc72f0..a99ef8b0d 100644 --- a/components/bt/host/bluedroid/hci/hci_packet_parser.c +++ b/components/bt/host/bluedroid/hci/hci_packet_parser.c @@ -250,7 +250,7 @@ static const hci_packet_parser_t interface = { parse_ble_read_suggested_default_data_length_response }; -const hci_packet_parser_t *hci_packet_parser_get_interface() +const hci_packet_parser_t *hci_packet_parser_get_interface(void) { return &interface; } diff --git a/components/bt/host/bluedroid/hci/include/hci/hci_layer.h b/components/bt/host/bluedroid/hci/include/hci/hci_layer.h index 8fa5165e9..6bfacdff5 100644 --- a/components/bt/host/bluedroid/hci/include/hci/hci_layer.h +++ b/components/bt/host/bluedroid/hci/include/hci/hci_layer.h @@ -92,7 +92,7 @@ typedef struct hci_t { void (*transmit_downward)(uint16_t type, void *data); } hci_t; -const hci_t *hci_layer_get_interface(); +const hci_t *hci_layer_get_interface(void); int hci_start_up(void); void hci_shut_down(void); diff --git a/components/bt/host/bluedroid/hci/include/hci/hci_packet_factory.h b/components/bt/host/bluedroid/hci/include/hci/hci_packet_factory.h index fd8731fbc..37ced06be 100644 --- a/components/bt/host/bluedroid/hci/include/hci/hci_packet_factory.h +++ b/components/bt/host/bluedroid/hci/include/hci/hci_packet_factory.h @@ -48,6 +48,6 @@ typedef struct { BT_HDR *(*make_write_default_erroneous_data_report)(uint8_t enable); } hci_packet_factory_t; -const hci_packet_factory_t *hci_packet_factory_get_interface(); +const hci_packet_factory_t *hci_packet_factory_get_interface(void); #endif /*_HCI_PACKET_FACTORY_H_*/ diff --git a/components/bt/host/bluedroid/hci/include/hci/hci_packet_parser.h b/components/bt/host/bluedroid/hci/include/hci/hci_packet_parser.h index b0cc4b3b4..e20e52fb5 100644 --- a/components/bt/host/bluedroid/hci/include/hci/hci_packet_parser.h +++ b/components/bt/host/bluedroid/hci/include/hci/hci_packet_parser.h @@ -97,6 +97,6 @@ typedef struct { ); } hci_packet_parser_t; -const hci_packet_parser_t *hci_packet_parser_get_interface(); +const hci_packet_parser_t *hci_packet_parser_get_interface(void); #endif /*_HCI_PACKET_PARSER_H_*/ diff --git a/components/bt/host/bluedroid/hci/include/hci/packet_fragmenter.h b/components/bt/host/bluedroid/hci/include/hci/packet_fragmenter.h index 285555427..02a13fb95 100644 --- a/components/bt/host/bluedroid/hci/include/hci/packet_fragmenter.h +++ b/components/bt/host/bluedroid/hci/include/hci/packet_fragmenter.h @@ -57,6 +57,6 @@ typedef struct packet_fragmenter_t { void (*reassemble_and_dispatch)(BT_HDR *packet); } packet_fragmenter_t; -const packet_fragmenter_t *packet_fragmenter_get_interface(); +const packet_fragmenter_t *packet_fragmenter_get_interface(void); #endif /* _PACKET_FRAGMENTER_H_ */ diff --git a/components/bt/host/bluedroid/hci/packet_fragmenter.c b/components/bt/host/bluedroid/hci/packet_fragmenter.c index 87cb99c74..53c6b7721 100644 --- a/components/bt/host/bluedroid/hci/packet_fragmenter.c +++ b/components/bt/host/bluedroid/hci/packet_fragmenter.c @@ -55,14 +55,14 @@ static void init(const packet_fragmenter_callbacks_t *result_callbacks) partial_packets = hash_map_new(NUMBER_OF_BUCKETS, hash_function_naive, NULL, NULL, NULL); } -static void cleanup() +static void cleanup(void) { if (partial_packets) { hash_map_free(partial_packets); } } -static BT_HDR *fragment_get_current_packet() +static BT_HDR *fragment_get_current_packet(void) { return current_fragment_packet; } @@ -224,7 +224,7 @@ static const packet_fragmenter_t interface = { reassemble_and_dispatch }; -const packet_fragmenter_t *packet_fragmenter_get_interface() +const packet_fragmenter_t *packet_fragmenter_get_interface(void) { controller = controller_get_interface(); return &interface; diff --git a/components/bt/host/bluedroid/main/bte_main.c b/components/bt/host/bluedroid/main/bte_main.c index 61c30e282..c47bdc15f 100644 --- a/components/bt/host/bluedroid/main/bte_main.c +++ b/components/bt/host/bluedroid/main/bte_main.c @@ -195,7 +195,7 @@ void bte_main_enable_lpm(BOOLEAN enable) ** Returns None ** ******************************************************************************/ -void bte_main_lpm_allow_bt_device_sleep() +void bte_main_lpm_allow_bt_device_sleep(void) { /**/ //hci->send_low_power_command(LPM_WAKE_DEASSERT); @@ -210,7 +210,7 @@ void bte_main_lpm_allow_bt_device_sleep() ** Returns None ** ******************************************************************************/ -void bte_main_lpm_wake_bt_device() +void bte_main_lpm_wake_bt_device(void) { //hci->send_low_power_command(LPM_WAKE_ASSERT); } diff --git a/components/bt/host/bluedroid/stack/avdt/avdt_api.c b/components/bt/host/bluedroid/stack/avdt/avdt_api.c index 88d374130..c0adc07e6 100644 --- a/components/bt/host/bluedroid/stack/avdt/avdt_api.c +++ b/components/bt/host/bluedroid/stack/avdt/avdt_api.c @@ -171,7 +171,7 @@ void AVDT_Deregister(void) ** Returns void. ** *******************************************************************************/ -void AVDT_SINK_Activate() +void AVDT_SINK_Activate(void) { tAVDT_SCB *p_scb = &avdt_cb.scb[0]; int i; @@ -200,7 +200,7 @@ void AVDT_SINK_Activate() ** Returns void. ** *******************************************************************************/ -void AVDT_SINK_Deactivate() +void AVDT_SINK_Deactivate(void) { tAVDT_SCB *p_scb = &avdt_cb.scb[0]; int i; diff --git a/components/bt/host/bluedroid/stack/btm/btm_ble_adv_filter.c b/components/bt/host/bluedroid/stack/btm/btm_ble_adv_filter.c index 438485359..54cdc189f 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_ble_adv_filter.c +++ b/components/bt/host/bluedroid/stack/btm/btm_ble_adv_filter.c @@ -90,7 +90,7 @@ static UINT8 btm_ble_cs_update_pf_counter(tBTM_BLE_SCAN_COND_OP action, ** Returns status ** *******************************************************************************/ -tBTM_STATUS btm_ble_obtain_vsc_details() +tBTM_STATUS btm_ble_obtain_vsc_details(void) { tBTM_STATUS st = BTM_SUCCESS; diff --git a/components/bt/host/bluedroid/stack/btm/btm_ble_bgconn.c b/components/bt/host/bluedroid/stack/btm/btm_ble_bgconn.c index 3721471f8..9fd3bd26f 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_ble_bgconn.c +++ b/components/bt/host/bluedroid/stack/btm/btm_ble_bgconn.c @@ -60,7 +60,7 @@ static bool bdaddr_equality_fn(const void *x, const void *y) return bdaddr_equals((bt_bdaddr_t *)x, (bt_bdaddr_t *)y); } -static void background_connections_lazy_init() +static void background_connections_lazy_init(void) { if (!background_connections) { background_connections = hash_map_new(background_connection_buckets, @@ -91,7 +91,7 @@ static BOOLEAN background_connection_remove(bt_bdaddr_t *address) return FALSE; } -static void background_connections_clear() +static void background_connections_clear(void) { if (background_connections) { hash_map_clear(background_connections); @@ -110,7 +110,7 @@ static bool background_connections_pending_cb(hash_map_entry_t *hash_entry, void return true; } -static bool background_connections_pending() +static bool background_connections_pending(void) { bool pending_connections = false; if (background_connections) { diff --git a/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c b/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c index caacad51c..c18d941a1 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c +++ b/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c @@ -2017,7 +2017,7 @@ UINT8 *BTM_CheckAdvData( UINT8 *p_adv, UINT8 type, UINT8 *p_length) ** BTM_BLE_GENRAL_DISCOVERABLE ** *******************************************************************************/ -UINT16 BTM_BleReadDiscoverability() +UINT16 BTM_BleReadDiscoverability(void) { BTM_TRACE_API("%s\n", __FUNCTION__); @@ -2034,7 +2034,7 @@ UINT16 BTM_BleReadDiscoverability() ** Returns BTM_BLE_NON_CONNECTABLE or BTM_BLE_CONNECTABLE ** *******************************************************************************/ -UINT16 BTM_BleReadConnectability() +UINT16 BTM_BleReadConnectability(void) { BTM_TRACE_API ("%s\n", __FUNCTION__); diff --git a/components/bt/host/bluedroid/stack/btm/btm_ble_multi_adv.c b/components/bt/host/bluedroid/stack/btm/btm_ble_multi_adv.c index a3ad60443..b18d68e39 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_ble_multi_adv.c +++ b/components/bt/host/bluedroid/stack/btm/btm_ble_multi_adv.c @@ -769,7 +769,7 @@ void btm_ble_multi_adv_vse_cback(UINT8 len, UINT8 *p) ** Returns void ** *******************************************************************************/ -void btm_ble_multi_adv_init() +void btm_ble_multi_adv_init(void) { #if BTM_DYNAMIC_MEMORY == TRUE btm_multi_adv_cb_ptr = (tBTM_BLE_MULTI_ADV_CB *)osi_malloc(sizeof(tBTM_BLE_MULTI_ADV_CB)); diff --git a/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h b/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h index 2ac01ea2e..a8900ec32 100644 --- a/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h +++ b/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h @@ -1626,7 +1626,7 @@ BOOLEAN BTM_BleGetCurrentAddress(BD_ADDR addr, uint8_t *addr_type); ** BTM_BLE_GENRAL_DISCOVERABLE ** *******************************************************************************/ -UINT16 BTM_BleReadDiscoverability(); +UINT16 BTM_BleReadDiscoverability(void); /******************************************************************************* ** @@ -1639,7 +1639,7 @@ UINT16 BTM_BleReadDiscoverability(); ** *******************************************************************************/ //extern -UINT16 BTM_BleReadConnectability (); +UINT16 BTM_BleReadConnectability (void); void BTM_Recovery_Pre_State(void); @@ -1755,7 +1755,7 @@ void BTM_BleEnableMixedPrivacyMode(BOOLEAN mixed_on); ** *******************************************************************************/ //extern -UINT8 BTM_BleMaxMultiAdvInstanceCount(); +UINT8 BTM_BleMaxMultiAdvInstanceCount(void); /******************************************************************************* ** diff --git a/components/coap/port/coap_io.c b/components/coap/port/coap_io.c index a8f35c180..00c0ad1d3 100644 --- a/components/coap/port/coap_io.c +++ b/components/coap/port/coap_io.c @@ -80,7 +80,7 @@ void coap_free_endpoint(coap_endpoint_t *ep); static int ep_initialized = 0; struct coap_endpoint_t * - coap_malloc_endpoint() { + coap_malloc_endpoint(void) { static struct coap_endpoint_t ep; if (ep_initialized) { diff --git a/components/console/commands.c b/components/console/commands.c index 52d1675a1..de5cf8edb 100644 --- a/components/console/commands.c +++ b/components/console/commands.c @@ -70,7 +70,7 @@ esp_err_t esp_console_init(const esp_console_config_t *config) return ESP_OK; } -esp_err_t esp_console_deinit() +esp_err_t esp_console_deinit(void) { if (!s_tmp_line_buf) { return ESP_ERR_INVALID_STATE; @@ -232,7 +232,7 @@ static int help_command(int argc, char **argv) } -esp_err_t esp_console_register_help_command() +esp_err_t esp_console_register_help_command(void) { esp_console_cmd_t command = { .command = "help", diff --git a/components/console/esp_console.h b/components/console/esp_console.h index 45a10b7a2..e4865d29f 100644 --- a/components/console/esp_console.h +++ b/components/console/esp_console.h @@ -52,7 +52,7 @@ esp_err_t esp_console_init(const esp_console_config_t* config); * - ESP_OK on success * - ESP_ERR_INVALID_STATE if not initialized yet */ -esp_err_t esp_console_deinit(); +esp_err_t esp_console_deinit(void); /** @@ -185,7 +185,7 @@ const char *esp_console_get_hint(const char *buf, int *color, int *bold); * - ESP_OK on success * - ESP_ERR_INVALID_STATE, if esp_console_init wasn't called */ -esp_err_t esp_console_register_help_command(); +esp_err_t esp_console_register_help_command(void); #ifdef __cplusplus } diff --git a/components/console/linenoise/linenoise.c b/components/console/linenoise/linenoise.c index f88a24620..f78e238af 100644 --- a/components/console/linenoise/linenoise.c +++ b/components/console/linenoise/linenoise.c @@ -205,7 +205,7 @@ void linenoiseSetDumbMode(int set) { /* Use the ESC [6n escape sequence to query the horizontal cursor position * and return it. On error -1 is returned, on success the position of the * cursor. */ -static int getCursorPosition() { +static int getCursorPosition(void) { char buf[32]; int cols, rows; unsigned int i = 0; @@ -228,7 +228,7 @@ static int getCursorPosition() { /* Try to get the number of columns in the current terminal, or assume 80 * if it fails. */ -static int getColumns() { +static int getColumns(void) { int start, cols; /* Get the initial position so we can restore it later. */ @@ -887,7 +887,7 @@ static int linenoiseEdit(char *buf, size_t buflen, const char *prompt) return l.len; } -int linenoiseProbe() { +int linenoiseProbe(void) { /* Switch to non-blocking mode */ int flags = fcntl(STDIN_FILENO, F_GETFL); flags |= O_NONBLOCK; @@ -1000,7 +1000,7 @@ void linenoiseFree(void *ptr) { /* ================================ History ================================= */ -void linenoiseHistoryFree() { +void linenoiseHistoryFree(void) { if (history) { for (int j = 0; j < history_len; j++) { free(history[j]); diff --git a/components/console/linenoise/linenoise.h b/components/console/linenoise/linenoise.h index a82701f83..04c6f8b0c 100644 --- a/components/console/linenoise/linenoise.h +++ b/components/console/linenoise/linenoise.h @@ -63,7 +63,7 @@ int linenoiseHistoryAdd(const char *line); int linenoiseHistorySetMaxLen(int len); int linenoiseHistorySave(const char *filename); int linenoiseHistoryLoad(const char *filename); -void linenoiseHistoryFree(); +void linenoiseHistoryFree(void); void linenoiseClearScreen(void); void linenoiseSetMultiLine(int ml); void linenoiseSetDumbMode(int set); diff --git a/components/cxx/cxx_guards.cpp b/components/cxx/cxx_guards.cpp index 48819a7ab..640cf1775 100644 --- a/components/cxx/cxx_guards.cpp +++ b/components/cxx/cxx_guards.cpp @@ -36,7 +36,7 @@ static size_t s_static_init_max_waiting_count = 0; //!< maximum ever va extern "C" int __cxa_guard_acquire(__guard* pg); extern "C" void __cxa_guard_release(__guard* pg); extern "C" void __cxa_guard_abort(__guard* pg); -extern "C" void __cxa_guard_dummy(); +extern "C" void __cxa_guard_dummy(void); /** * Layout of the guard object (defined by the ABI). @@ -215,6 +215,6 @@ extern "C" void __cxa_guard_abort(__guard* pg) * Dummy function used to force linking this file instead of the same one in libstdc++. * This works via -u __cxa_guard_dummy flag in component.mk */ -extern "C" void __cxa_guard_dummy() +extern "C" void __cxa_guard_dummy(void) { } diff --git a/components/driver/adc1_i2s_private.h b/components/driver/adc1_i2s_private.h index cc592ffe1..76da3da02 100644 --- a/components/driver/adc1_i2s_private.h +++ b/components/driver/adc1_i2s_private.h @@ -29,7 +29,7 @@ extern "C" { * This is an internal API for I2S module to call to enable I2S-ADC function. * Note that adc_power_off() can still power down ADC. */ -void adc_power_always_on(); +void adc_power_always_on(void); /** * @brief For I2S dma to claim the usage of ADC1. @@ -41,7 +41,7 @@ void adc_power_always_on(); * - ESP_OK success * - ESP_ERR_TIMEOUT reserved for future use. Currently the function will wait until success. */ -esp_err_t adc1_i2s_mode_acquire(); +esp_err_t adc1_i2s_mode_acquire(void); /** * @brief For ADC1 to claim the usage of ADC1. @@ -53,7 +53,7 @@ esp_err_t adc1_i2s_mode_acquire(); * - ESP_OK success * - ESP_ERR_TIMEOUT reserved for future use. Currently the function will wait until success. */ -esp_err_t adc1_adc_mode_acquire(); +esp_err_t adc1_adc_mode_acquire(void); /** * @brief to let other tasks use the ADC1 when I2S is not work. @@ -63,7 +63,7 @@ esp_err_t adc1_adc_mode_acquire(); * * @return always return ESP_OK. */ -esp_err_t adc1_lock_release(); +esp_err_t adc1_lock_release(void); #ifdef __cplusplus } diff --git a/components/driver/can.c b/components/driver/can.c index 0ddf89296..ec843e492 100644 --- a/components/driver/can.c +++ b/components/driver/can.c @@ -141,7 +141,7 @@ static portMUX_TYPE can_spinlock = portMUX_INITIALIZER_UNLOCKED; /* ------------------- Configuration Register Functions---------------------- */ -static inline esp_err_t can_enter_reset_mode() +static inline esp_err_t can_enter_reset_mode(void) { /* Enter reset mode (required to write to configuration registers). Reset mode also prevents all CAN activity on the current module and is automatically @@ -151,7 +151,7 @@ static inline esp_err_t can_enter_reset_mode() return ESP_OK; } -static inline esp_err_t can_exit_reset_mode() +static inline esp_err_t can_exit_reset_mode(void) { /* Exiting reset mode will return the CAN module to operating mode. Reset mode must also be exited in order to trigger BUS-OFF recovery sequence. */ @@ -160,7 +160,7 @@ static inline esp_err_t can_exit_reset_mode() return ESP_OK; } -static inline void can_config_pelican() +static inline void can_config_pelican(void) { //Use PeliCAN address layout. Exposes extra registers CAN.clock_divider_reg.can_mode = 1; @@ -286,23 +286,23 @@ static void can_set_tx_buffer_and_transmit(can_frame_t *frame) can_set_command(command); } -static inline uint32_t can_get_status() +static inline uint32_t can_get_status(void) { return CAN.status_reg.val; } -static inline uint32_t can_get_interrupt_reason() +static inline uint32_t can_get_interrupt_reason(void) { return CAN.interrupt_reg.val; } -static inline uint32_t can_get_arbitration_lost_capture() +static inline uint32_t can_get_arbitration_lost_capture(void) { return CAN.arbitration_lost_captue_reg.val; //Todo: ALC read only to re-arm arb lost interrupt. Add function to decode ALC } -static inline uint32_t can_get_error_code_capture() +static inline uint32_t can_get_error_code_capture(void) { return CAN.error_code_capture_reg.val; //Todo: ECC read only to re-arm bus error interrupt. Add function to decode ECC @@ -328,7 +328,7 @@ static inline void can_get_rx_buffer_and_clear(can_frame_t *frame) can_set_command(CMD_RELEASE_RX_BUFF); } -static inline uint32_t can_get_rx_message_counter() +static inline uint32_t can_get_rx_message_counter(void) { return CAN.rx_message_counter_reg.val; } @@ -725,7 +725,7 @@ esp_err_t can_driver_install(const can_general_config_t *g_config, const can_tim return ret; } -esp_err_t can_driver_uninstall() +esp_err_t can_driver_uninstall(void) { can_obj_t *p_can_obj_dummy; @@ -761,7 +761,7 @@ esp_err_t can_driver_uninstall() return ESP_OK; } -esp_err_t can_start() +esp_err_t can_start(void) { //Check state CAN_ENTER_CRITICAL(); @@ -791,7 +791,7 @@ esp_err_t can_start() return ESP_OK; } -esp_err_t can_stop() +esp_err_t can_stop(void) { //Check state CAN_ENTER_CRITICAL(); @@ -928,7 +928,7 @@ esp_err_t can_reconfigure_alerts(uint32_t alerts_enabled, uint32_t *current_aler return ESP_OK; } -esp_err_t can_initiate_recovery() +esp_err_t can_initiate_recovery(void) { CAN_ENTER_CRITICAL(); //Check state @@ -982,7 +982,7 @@ esp_err_t can_get_status_info(can_status_info_t *status_info) return ESP_OK; } -esp_err_t can_clear_transmit_queue() +esp_err_t can_clear_transmit_queue(void) { //Check State CAN_CHECK(p_can_obj != NULL, ESP_ERR_INVALID_STATE); @@ -997,7 +997,7 @@ esp_err_t can_clear_transmit_queue() return ESP_OK; } -esp_err_t can_clear_receive_queue() +esp_err_t can_clear_receive_queue(void) { //Check State CAN_CHECK(p_can_obj != NULL, ESP_ERR_INVALID_STATE); diff --git a/components/driver/gpio.c b/components/driver/gpio.c index f9ae07c37..96fc7a665 100644 --- a/components/driver/gpio.c +++ b/components/driver/gpio.c @@ -419,7 +419,7 @@ esp_err_t gpio_install_isr_service(int intr_alloc_flags) return ret; } -void gpio_uninstall_isr_service() +void gpio_uninstall_isr_service(void) { if (gpio_isr_func == NULL) { return; diff --git a/components/driver/i2c.c b/components/driver/i2c.c index aeadfaada..556dcdf1f 100644 --- a/components/driver/i2c.c +++ b/components/driver/i2c.c @@ -942,7 +942,7 @@ esp_err_t i2c_set_pin(i2c_port_t i2c_num, int sda_io_num, int scl_io_num, gpio_p return ESP_OK; } -i2c_cmd_handle_t i2c_cmd_link_create() +i2c_cmd_handle_t i2c_cmd_link_create(void) { #if !CONFIG_SPIRAM_USE_MALLOC i2c_cmd_desc_t* cmd_desc = (i2c_cmd_desc_t*) calloc(1, sizeof(i2c_cmd_desc_t)); diff --git a/components/driver/i2s.c b/components/driver/i2s.c index d0c9831b8..fe90c9c78 100644 --- a/components/driver/i2s.c +++ b/components/driver/i2s.c @@ -740,7 +740,7 @@ esp_err_t i2s_set_dac_mode(i2s_dac_mode_t dac_mode) return ESP_OK; } -static esp_err_t _i2s_adc_mode_recover() +static esp_err_t _i2s_adc_mode_recover(void) { I2S_CHECK(((_i2s_adc_unit != -1) && (_i2s_adc_channel != -1)), "i2s ADC recover error, not initialized...", ESP_ERR_INVALID_ARG); return adc_i2s_mode_init(_i2s_adc_unit, _i2s_adc_channel); diff --git a/components/driver/include/driver/adc.h b/components/driver/include/driver/adc.h index 91eb18fd2..df166b1c8 100644 --- a/components/driver/include/driver/adc.h +++ b/components/driver/include/driver/adc.h @@ -229,13 +229,13 @@ int adc1_get_voltage(adc1_channel_t channel) __attribute__((deprecated)); /** * @brief Enable ADC power */ -void adc_power_on(); +void adc_power_on(void); /** * @brief Power off SAR ADC * This function will force power down for ADC */ -void adc_power_off(); +void adc_power_off(void); /** * @brief Initialize ADC pad @@ -292,7 +292,7 @@ esp_err_t adc_i2s_mode_init(adc_unit_t adc_unit, adc_channel_t channel); * Note that adc1_config_channel_atten, adc1_config_width functions need * to be called to configure ADC1 channels, before ADC1 is used by the ULP. */ -void adc1_ulp_enable(); +void adc1_ulp_enable(void); /** * @brief Read Hall Sensor @@ -313,7 +313,7 @@ void adc1_ulp_enable(); * * @return The hall sensor reading. */ -int hall_sensor_read(); +int hall_sensor_read(void); /** * @brief Get the gpio number of a specific ADC2 channel. diff --git a/components/driver/include/driver/adc2_wifi_internal.h b/components/driver/include/driver/adc2_wifi_internal.h index ba5c32ead..833d97d96 100644 --- a/components/driver/include/driver/adc2_wifi_internal.h +++ b/components/driver/include/driver/adc2_wifi_internal.h @@ -31,7 +31,7 @@ extern "C" { * - ESP_OK success * - ESP_ERR_TIMEOUT reserved for future use. Currently the function will wait until success. */ -esp_err_t adc2_wifi_acquire(); +esp_err_t adc2_wifi_acquire(void); /** @@ -42,7 +42,7 @@ esp_err_t adc2_wifi_acquire(); * * @return always return ESP_OK. */ -esp_err_t adc2_wifi_release(); +esp_err_t adc2_wifi_release(void); #ifdef __cplusplus } diff --git a/components/driver/include/driver/can.h b/components/driver/include/driver/can.h index 8c1d4200f..074ead380 100644 --- a/components/driver/include/driver/can.h +++ b/components/driver/include/driver/can.h @@ -238,7 +238,7 @@ esp_err_t can_driver_install(const can_general_config_t *g_config, const can_tim * - ESP_OK: Successfully uninstalled CAN driver * - ESP_ERR_INVALID_STATE: Driver is not in stopped/bus-off state, or is not installed */ -esp_err_t can_driver_uninstall(); +esp_err_t can_driver_uninstall(void); /** * @brief Start the CAN driver @@ -253,7 +253,7 @@ esp_err_t can_driver_uninstall(); * - ESP_OK: CAN driver is now running * - ESP_ERR_INVALID_STATE: Driver is not in stopped state, or is not installed */ -esp_err_t can_start(); +esp_err_t can_start(void); /** * @brief Stop the CAN driver @@ -272,7 +272,7 @@ esp_err_t can_start(); * - ESP_OK: CAN driver is now Stopped * - ESP_ERR_INVALID_STATE: Driver is not in running state, or is not installed */ -esp_err_t can_stop(); +esp_err_t can_stop(void); /** * @brief Transmit a CAN message @@ -379,7 +379,7 @@ esp_err_t can_reconfigure_alerts(uint32_t alerts_enabled, uint32_t *current_aler * - ESP_OK: Bus recovery started * - ESP_ERR_INVALID_STATE: CAN driver is not in the bus-off state, or is not installed */ -esp_err_t can_initiate_recovery(); +esp_err_t can_initiate_recovery(void); /** * @brief Get current status information of the CAN driver @@ -405,7 +405,7 @@ esp_err_t can_get_status_info(can_status_info_t *status_info); * - ESP_OK: Transmit queue cleared * - ESP_ERR_INVALID_STATE: CAN driver is not installed or TX queue is disabled */ -esp_err_t can_clear_transmit_queue(); +esp_err_t can_clear_transmit_queue(void); /** * @brief Clear the receive queue @@ -419,7 +419,7 @@ esp_err_t can_clear_transmit_queue(); * - ESP_OK: Transmit queue cleared * - ESP_ERR_INVALID_STATE: CAN driver is not installed */ -esp_err_t can_clear_receive_queue(); +esp_err_t can_clear_receive_queue(void); #ifdef __cplusplus } diff --git a/components/driver/include/driver/dac.h b/components/driver/include/driver/dac.h index 1e60263c2..5ed96e201 100644 --- a/components/driver/include/driver/dac.h +++ b/components/driver/include/driver/dac.h @@ -99,12 +99,12 @@ esp_err_t dac_output_disable(dac_channel_t channel); /** * @brief Enable DAC output data from I2S */ -esp_err_t dac_i2s_enable(); +esp_err_t dac_i2s_enable(void); /** * @brief Disable DAC output data from I2S */ -esp_err_t dac_i2s_disable(); +esp_err_t dac_i2s_disable(void); #ifdef __cplusplus } #endif diff --git a/components/driver/include/driver/gpio.h b/components/driver/include/driver/gpio.h index 9933cba81..11425201d 100644 --- a/components/driver/include/driver/gpio.h +++ b/components/driver/include/driver/gpio.h @@ -475,7 +475,7 @@ esp_err_t gpio_install_isr_service(int intr_alloc_flags); /** * @brief Uninstall the driver's GPIO ISR service, freeing related resources. */ -void gpio_uninstall_isr_service(); +void gpio_uninstall_isr_service(void); /** * @brief Add ISR handler for the corresponding GPIO pin. diff --git a/components/driver/include/driver/i2c.h b/components/driver/include/driver/i2c.h index 0bd0e2aae..57204cc60 100644 --- a/components/driver/include/driver/i2c.h +++ b/components/driver/include/driver/i2c.h @@ -224,7 +224,7 @@ esp_err_t i2c_set_pin(i2c_port_t i2c_num, int sda_io_num, int scl_io_num, * * @return i2c command link handler */ -i2c_cmd_handle_t i2c_cmd_link_create(); +i2c_cmd_handle_t i2c_cmd_link_create(void); /** * @brief Free I2C command link diff --git a/components/driver/include/driver/ledc.h b/components/driver/include/driver/ledc.h index 6a82c19a2..17875783f 100644 --- a/components/driver/include/driver/ledc.h +++ b/components/driver/include/driver/ledc.h @@ -435,7 +435,7 @@ esp_err_t ledc_fade_func_install(int intr_alloc_flags); * @brief Uninstall LEDC fade function. * */ -void ledc_fade_func_uninstall(); +void ledc_fade_func_uninstall(void); /** * @brief Start LEDC fading. diff --git a/components/driver/include/driver/rtc_io.h b/components/driver/include/driver/rtc_io.h index c636f61cc..a2f37a3e7 100644 --- a/components/driver/include/driver/rtc_io.h +++ b/components/driver/include/driver/rtc_io.h @@ -219,7 +219,7 @@ esp_err_t rtc_gpio_isolate(gpio_num_t gpio_num); * Force hold signal is enabled before going into deep sleep for pins which * are used for EXT1 wakeup. */ -void rtc_gpio_force_hold_dis_all(); +void rtc_gpio_force_hold_dis_all(void); /** * @brief Set RTC GPIO pad drive capability diff --git a/components/driver/include/driver/sdio_slave.h b/components/driver/include/driver/sdio_slave.h index 93f08d94a..005e469cd 100644 --- a/components/driver/include/driver/sdio_slave.h +++ b/components/driver/include/driver/sdio_slave.h @@ -111,7 +111,7 @@ esp_err_t sdio_slave_initialize(sdio_slave_config_t *config); /** De-initialize the sdio slave driver to release the resources. */ -void sdio_slave_deinit(); +void sdio_slave_deinit(void); /** Start hardware for sending and receiving, as well as set the IOREADY1 to 1. * @@ -122,19 +122,19 @@ void sdio_slave_deinit(); * - ESP_ERR_INVALID_STATE if already started. * - ESP_OK otherwise. */ -esp_err_t sdio_slave_start(); +esp_err_t sdio_slave_start(void); /** Stop hardware from sending and receiving, also set IOREADY1 to 0. * * @note this will not clear the data already in the driver, and also not reset the PKT_LEN and TOKEN1 counting. Call ``sdio_slave_reset`` to do that. */ -void sdio_slave_stop(); +void sdio_slave_stop(void); /** Clear the data still in the driver, as well as reset the PKT_LEN and TOKEN1 counting. * * @return always return ESP_OK. */ -esp_err_t sdio_slave_reset(); +esp_err_t sdio_slave_reset(void); /*--------------------------------------------------------------------------- * Receive @@ -263,7 +263,7 @@ esp_err_t sdio_slave_write_reg(int pos, uint8_t reg); * * @return the interrupt mask. */ -sdio_slave_hostint_t sdio_slave_get_host_intena(); +sdio_slave_hostint_t sdio_slave_get_host_intena(void); /** Set the interrupt enable for host. * diff --git a/components/driver/include/driver/sdmmc_host.h b/components/driver/include/driver/sdmmc_host.h index 4e2db0994..8cd403d85 100644 --- a/components/driver/include/driver/sdmmc_host.h +++ b/components/driver/include/driver/sdmmc_host.h @@ -91,7 +91,7 @@ typedef struct { * - ESP_ERR_INVALID_STATE if sdmmc_host_init was already called * - ESP_ERR_NO_MEM if memory can not be allocated */ -esp_err_t sdmmc_host_init(); +esp_err_t sdmmc_host_init(void); /** * @brief Initialize given slot of SDMMC peripheral @@ -218,7 +218,7 @@ esp_err_t sdmmc_host_io_int_wait(int slot, TickType_t timeout_ticks); * - ESP_OK on success * - ESP_ERR_INVALID_STATE if sdmmc_host_init function has not been called */ -esp_err_t sdmmc_host_deinit(); +esp_err_t sdmmc_host_deinit(void); /** * @brief Enable the pull-ups of sd pins. diff --git a/components/driver/include/driver/sdspi_host.h b/components/driver/include/driver/sdspi_host.h index 605cd7624..8cb922803 100644 --- a/components/driver/include/driver/sdspi_host.h +++ b/components/driver/include/driver/sdspi_host.h @@ -91,7 +91,7 @@ typedef struct { * - ESP_OK on success * - other error codes may be returned in future versions */ -esp_err_t sdspi_host_init(); +esp_err_t sdspi_host_init(void); /** * @brief Initialize SD SPI driver for the specific SPI controller @@ -159,7 +159,7 @@ esp_err_t sdspi_host_set_card_clk(int slot, uint32_t freq_khz); * - ESP_OK on success * - ESP_ERR_INVALID_STATE if sdspi_host_init function has not been called */ -esp_err_t sdspi_host_deinit(); +esp_err_t sdspi_host_deinit(void); /** * @brief Enable SDIO interrupt. diff --git a/components/driver/include/driver/spi_common.h b/components/driver/include/driver/spi_common.h index b44159546..8f7c97f3d 100644 --- a/components/driver/include/driver/spi_common.h +++ b/components/driver/include/driver/spi_common.h @@ -381,7 +381,7 @@ bool spicommon_dmaworkaround_req_reset(int dmachan, dmaworkaround_cb_t cb, void * * @return True when a DMA reset is requested but hasn't completed yet. False otherwise. */ -bool spicommon_dmaworkaround_reset_in_progress(); +bool spicommon_dmaworkaround_reset_in_progress(void); /** diff --git a/components/driver/include/driver/touch_pad.h b/components/driver/include/driver/touch_pad.h index 0c3884ded..53d5b3738 100644 --- a/components/driver/include/driver/touch_pad.h +++ b/components/driver/include/driver/touch_pad.h @@ -117,7 +117,7 @@ typedef intr_handle_t touch_isr_handle_t; * - ESP_OK Success * - ESP_FAIL Touch pad init error */ -esp_err_t touch_pad_init(); +esp_err_t touch_pad_init(void); /** * @brief Un-install touch pad driver. @@ -126,7 +126,7 @@ esp_err_t touch_pad_init(); * - ESP_OK Success * - ESP_FAIL Touch pad driver not initialized */ -esp_err_t touch_pad_deinit(); +esp_err_t touch_pad_deinit(void); /** * @brief Configure touch pad interrupt threshold. @@ -364,7 +364,7 @@ esp_err_t touch_pad_get_fsm_mode(touch_fsm_mode_t *mode); * @return * - ESP_OK on success */ -esp_err_t touch_pad_sw_start(); +esp_err_t touch_pad_sw_start(void); /** * @brief Set touch sensor interrupt threshold @@ -468,28 +468,28 @@ esp_err_t touch_pad_clear_group_mask(uint16_t set1_mask, uint16_t set2_mask, uin * @return * - ESP_OK on success */ -esp_err_t touch_pad_clear_status(); +esp_err_t touch_pad_clear_status(void); /** * @brief Get the touch sensor status, usually used in ISR to decide which pads are 'touched'. * @return * - touch status */ -uint32_t touch_pad_get_status(); +uint32_t touch_pad_get_status(void); /** * @brief To enable touch pad interrupt * @return * - ESP_OK on success */ -esp_err_t touch_pad_intr_enable(); +esp_err_t touch_pad_intr_enable(void); /** * @brief To disable touch pad interrupt * @return * - ESP_OK on success */ -esp_err_t touch_pad_intr_disable(); +esp_err_t touch_pad_intr_disable(void); /** * @brief set touch pad filter calibration period, in ms. @@ -539,7 +539,7 @@ esp_err_t touch_pad_filter_start(uint32_t filter_period_ms); * - ESP_OK Success * - ESP_ERR_INVALID_STATE driver state error */ -esp_err_t touch_pad_filter_stop(); +esp_err_t touch_pad_filter_stop(void); /** * @brief delete touch pad filter driver and release the memory @@ -548,7 +548,7 @@ esp_err_t touch_pad_filter_stop(); * - ESP_OK Success * - ESP_ERR_INVALID_STATE driver state error */ -esp_err_t touch_pad_filter_delete(); +esp_err_t touch_pad_filter_delete(void); /** * @brief Get the touch pad which caused wakeup from sleep diff --git a/components/driver/include/driver/uart_select.h b/components/driver/include/driver/uart_select.h index 24f06c1de..f7a21a315 100644 --- a/components/driver/include/driver/uart_select.h +++ b/components/driver/include/driver/uart_select.h @@ -40,7 +40,7 @@ void uart_set_select_notif_callback(uart_port_t uart_num, uart_select_notif_call /** * @brief Get mutex guarding select() notifications */ -portMUX_TYPE *uart_get_selectlock(); +portMUX_TYPE *uart_get_selectlock(void); #ifdef __cplusplus } diff --git a/components/driver/ledc.c b/components/driver/ledc.c index 92a055cbc..ff992d147 100644 --- a/components/driver/ledc.c +++ b/components/driver/ledc.c @@ -712,7 +712,7 @@ esp_err_t ledc_fade_func_install(int intr_alloc_flags) return ledc_isr_register(ledc_fade_isr, NULL, intr_alloc_flags | ESP_INTR_FLAG_IRAM, &s_ledc_fade_isr_handle); } -void ledc_fade_func_uninstall() +void ledc_fade_func_uninstall(void) { if (s_ledc_fade_rec == NULL) { return; diff --git a/components/driver/rmt.c b/components/driver/rmt.c index 10605d2e2..38380da30 100644 --- a/components/driver/rmt.c +++ b/components/driver/rmt.c @@ -321,7 +321,7 @@ esp_err_t rmt_get_status(rmt_channel_t channel, uint32_t* status) return ESP_OK; } -rmt_data_mode_t rmt_get_data_mode() +rmt_data_mode_t rmt_get_data_mode(void) { return (rmt_data_mode_t) (RMT.apb_conf.fifo_mask); } diff --git a/components/driver/rtc_module.c b/components/driver/rtc_module.c index 1be5c645c..d5954c9e6 100644 --- a/components/driver/rtc_module.c +++ b/components/driver/rtc_module.c @@ -368,7 +368,7 @@ esp_err_t rtc_gpio_isolate(gpio_num_t gpio_num) return ESP_OK; } -void rtc_gpio_force_hold_dis_all() +void rtc_gpio_force_hold_dis_all(void) { for (int gpio = 0; gpio < GPIO_PIN_COUNT; ++gpio) { const rtc_gpio_desc_t* desc = &rtc_gpio_desc[gpio]; @@ -657,7 +657,7 @@ esp_err_t touch_pad_get_fsm_mode(touch_fsm_mode_t *mode) return ESP_OK; } -esp_err_t touch_pad_sw_start() +esp_err_t touch_pad_sw_start(void) { portENTER_CRITICAL(&rtc_spinlock); SENS.sar_touch_ctrl2.touch_start_en = 0; @@ -772,13 +772,13 @@ esp_err_t touch_pad_clear_group_mask(uint16_t set1_mask, uint16_t set2_mask, uin return ESP_OK; } -uint32_t IRAM_ATTR touch_pad_get_status() +uint32_t IRAM_ATTR touch_pad_get_status(void) { uint32_t status = SENS.sar_touch_ctrl2.touch_meas_en; return TOUCH_BITS_SWAP(status); } -esp_err_t IRAM_ATTR touch_pad_clear_status() +esp_err_t IRAM_ATTR touch_pad_clear_status(void) { portENTER_CRITICAL(&rtc_spinlock); SENS.sar_touch_ctrl2.touch_meas_en_clr = 1; @@ -786,7 +786,7 @@ esp_err_t IRAM_ATTR touch_pad_clear_status() return ESP_OK; } -esp_err_t touch_pad_intr_enable() +esp_err_t touch_pad_intr_enable(void) { portENTER_CRITICAL(&rtc_spinlock); RTCCNTL.int_ena.rtc_touch = 1; @@ -794,7 +794,7 @@ esp_err_t touch_pad_intr_enable() return ESP_OK; } -esp_err_t touch_pad_intr_disable() +esp_err_t touch_pad_intr_disable(void) { portENTER_CRITICAL(&rtc_spinlock); RTCCNTL.int_ena.rtc_touch = 0; @@ -834,7 +834,7 @@ esp_err_t touch_pad_config(touch_pad_t touch_num, uint16_t threshold) return ESP_OK; } -esp_err_t touch_pad_init() +esp_err_t touch_pad_init(void) { if (rtc_touch_mux == NULL) { rtc_touch_mux = xSemaphoreCreateMutex(); @@ -852,7 +852,7 @@ esp_err_t touch_pad_init() return ESP_OK; } -esp_err_t touch_pad_deinit() +esp_err_t touch_pad_deinit(void) { RTC_MODULE_CHECK(rtc_touch_mux != NULL, "Touch pad not initialized", ESP_FAIL); if (s_touch_pad_filter != NULL) { @@ -1006,7 +1006,7 @@ err_no_mem: return ESP_ERR_NO_MEM; } -esp_err_t touch_pad_filter_stop() +esp_err_t touch_pad_filter_stop(void) { RTC_MODULE_CHECK(s_touch_pad_filter != NULL, "Touch pad filter not initialized", ESP_ERR_INVALID_STATE); RTC_MODULE_CHECK(rtc_touch_mux != NULL, "Touch pad not initialized", ESP_ERR_INVALID_STATE); @@ -1022,7 +1022,7 @@ esp_err_t touch_pad_filter_stop() return ret; } -esp_err_t touch_pad_filter_delete() +esp_err_t touch_pad_filter_delete(void) { RTC_MODULE_CHECK(s_touch_pad_filter != NULL, "Touch pad filter not initialized", ESP_ERR_INVALID_STATE); RTC_MODULE_CHECK(rtc_touch_mux != NULL, "Touch pad not initialized", ESP_ERR_INVALID_STATE); @@ -1143,14 +1143,14 @@ static esp_err_t adc_set_atten(adc_unit_t adc_unit, adc_channel_t channel, adc_a return ESP_OK; } -void adc_power_always_on() +void adc_power_always_on(void) { portENTER_CRITICAL(&rtc_spinlock); SENS.sar_meas_wait2.force_xpd_sar = SENS_FORCE_XPD_SAR_PU; portEXIT_CRITICAL(&rtc_spinlock); } -void adc_power_on() +void adc_power_on(void) { portENTER_CRITICAL(&rtc_spinlock); //The power FSM controlled mode saves more power, while the ADC noise may get increased. @@ -1168,7 +1168,7 @@ void adc_power_on() portEXIT_CRITICAL(&rtc_spinlock); } -void adc_power_off() +void adc_power_off(void) { portENTER_CRITICAL(&rtc_spinlock); //Bit1 0:Fsm 1: SW mode @@ -1474,7 +1474,7 @@ esp_err_t adc1_config_width(adc_bits_width_t width_bit) return ESP_OK; } -static inline void adc1_fsm_disable() +static inline void adc1_fsm_disable(void) { //channel is set in the convert function SENS.sar_meas_wait2.force_xpd_amp = SENS_FORCE_XPD_AMP_PD; @@ -1487,7 +1487,7 @@ static inline void adc1_fsm_disable() SENS.sar_meas_wait2.sar_amp_wait3 = 1; } -esp_err_t adc1_i2s_mode_acquire() +esp_err_t adc1_i2s_mode_acquire(void) { //lazy initialization //for i2s, block until acquire the lock @@ -1501,7 +1501,7 @@ esp_err_t adc1_i2s_mode_acquire() return ESP_OK; } -esp_err_t adc1_adc_mode_acquire() +esp_err_t adc1_adc_mode_acquire(void) { //lazy initialization //for adc1, block until acquire the lock @@ -1517,7 +1517,7 @@ esp_err_t adc1_adc_mode_acquire() return ESP_OK; } -esp_err_t adc1_lock_release() +esp_err_t adc1_lock_release(void) { RTC_MODULE_CHECK((uint32_t*)adc1_i2s_lock != NULL, "adc1 lock release called before acquire", ESP_ERR_INVALID_STATE ); // for now the WiFi would use ADC2 and set xpd_sar force on. @@ -1548,7 +1548,7 @@ int adc1_get_raw(adc1_channel_t channel) return adc_value; } -int adc1_get_voltage(adc1_channel_t channel) //Deprecated. Use adc1_get_raw() instead +int adc1_get_voltage(adc1_channel_t channel) //Deprecated. Use adc1_get_raw(void) instead { return adc1_get_raw(channel); } @@ -1611,7 +1611,7 @@ esp_err_t adc2_pad_get_io_num(adc2_channel_t channel, gpio_num_t *gpio_num) return ESP_OK; } -esp_err_t adc2_wifi_acquire() +esp_err_t adc2_wifi_acquire(void) { //lazy initialization //for wifi, block until acquire the lock @@ -1620,7 +1620,7 @@ esp_err_t adc2_wifi_acquire() return ESP_OK; } -esp_err_t adc2_wifi_release() +esp_err_t adc2_wifi_release(void) { RTC_MODULE_CHECK((uint32_t*)adc2_wifi_lock != NULL, "wifi release called before acquire", ESP_ERR_INVALID_STATE ); @@ -1878,7 +1878,7 @@ esp_err_t dac_out_voltage(dac_channel_t channel, uint8_t dac_value) return ESP_OK; } -esp_err_t dac_i2s_enable() +esp_err_t dac_i2s_enable(void) { portENTER_CRITICAL(&rtc_spinlock); SET_PERI_REG_MASK(SENS_SAR_DAC_CTRL1_REG, SENS_DAC_DIG_FORCE_M | SENS_DAC_CLK_INV_M); @@ -1886,7 +1886,7 @@ esp_err_t dac_i2s_enable() return ESP_OK; } -esp_err_t dac_i2s_disable() +esp_err_t dac_i2s_disable(void) { portENTER_CRITICAL(&rtc_spinlock); CLEAR_PERI_REG_MASK(SENS_SAR_DAC_CTRL1_REG, SENS_DAC_DIG_FORCE_M | SENS_DAC_CLK_INV_M); @@ -1903,7 +1903,7 @@ static inline void adc1_hall_enable(bool enable) RTCIO.hall_sens.xpd_hall = enable; } -static int hall_sensor_get_value() //hall sensor without LNA +static int hall_sensor_get_value(void) //hall sensor without LNA { int Sens_Vp0; int Sens_Vn0; @@ -1932,7 +1932,7 @@ static int hall_sensor_get_value() //hall sensor without LNA return hall_value; } -int hall_sensor_read() +int hall_sensor_read(void) { adc_gpio_init(ADC_UNIT_1, ADC1_CHANNEL_0); adc_gpio_init(ADC_UNIT_1, ADC1_CHANNEL_3); @@ -1974,7 +1974,7 @@ static void rtc_isr(void* arg) REG_WRITE(RTC_CNTL_INT_CLR_REG, status); } -static esp_err_t rtc_isr_ensure_installed() +static esp_err_t rtc_isr_ensure_installed(void) { esp_err_t err = ESP_OK; portENTER_CRITICAL(&s_rtc_isr_handler_list_lock); diff --git a/components/driver/sdio_slave.c b/components/driver/sdio_slave.c index 12d106ae5..0d639d802 100644 --- a/components/driver/sdio_slave.c +++ b/components/driver/sdio_slave.c @@ -215,17 +215,17 @@ static void sdio_intr_host(void*); static void sdio_intr_send(void*); static void sdio_intr_recv(void*); -static esp_err_t send_flush_data(); -static esp_err_t send_reset_counter(); -static void recv_flush_data(); -static void recv_reset_counter(); +static esp_err_t send_flush_data(void); +static esp_err_t send_reset_counter(void); +static void recv_flush_data(void); +static void recv_reset_counter(void); -static esp_err_t send_start(); -static void send_stop(); -static esp_err_t recv_start(); -static void recv_stop(); +static esp_err_t send_start(void); +static void send_stop(void); +static esp_err_t recv_start(void); +static void recv_stop(void); -static void deinit_context(); +static void deinit_context(void); /**************** Ring buffer for SDIO use *****************/ @@ -395,7 +395,7 @@ static void __attribute((unused)) dump_ll(lldesc_t *queue) ESP_EARLY_LOGI(TAG, "total: %d", cnt); } -static inline void deinit_context() +static inline void deinit_context(void) { context.config = (sdio_slave_config_t){}; for(int i = 0; i < 9; i++) { @@ -417,7 +417,7 @@ esp_err_t link_desc_to_last(uint8_t* desc, void* arg) return ESP_OK; } -static esp_err_t init_ringbuf() +static esp_err_t init_ringbuf(void) { esp_err_t ret = sdio_ringbuf_init(&context.sendbuf, sizeof(buf_desc_t), context.config.send_queue_size); if (ret != ESP_OK) return ret; @@ -591,7 +591,7 @@ esp_err_t sdio_slave_initialize(sdio_slave_config_t *config) return ESP_OK; } -void sdio_slave_deinit() +void sdio_slave_deinit(void) { esp_err_t ret = esp_intr_free(context.intr_handle); assert(ret==ESP_OK); @@ -599,7 +599,7 @@ void sdio_slave_deinit() deinit_context(); } -esp_err_t sdio_slave_start() +esp_err_t sdio_slave_start(void) { esp_err_t ret; HOST.slc0_int_clr.val = UINT32_MAX;//clear all interrupts @@ -611,7 +611,7 @@ esp_err_t sdio_slave_start() return ESP_OK; } -esp_err_t sdio_slave_reset() +esp_err_t sdio_slave_reset(void) { send_flush_data(); send_reset_counter(); @@ -620,7 +620,7 @@ esp_err_t sdio_slave_reset() return ESP_OK; } -void sdio_slave_stop() +void sdio_slave_stop(void) { HINF.cfg_data1.sdio_ioready1 = 0; //set IO ready to 1 to stop host from using send_stop(); @@ -696,7 +696,7 @@ esp_err_t sdio_slave_write_reg(int pos, uint8_t reg) return ESP_OK; } -sdio_slave_hostint_t sdio_slave_get_host_intena() +sdio_slave_hostint_t sdio_slave_get_host_intena(void) { return HOST.slc0_func1_int_ena.val; } @@ -742,12 +742,12 @@ static inline void send_start_transmission(const void* desc) SLC.slc0_rx_link.start = 1; } -static inline void send_stop_ll_operation() +static inline void send_stop_ll_operation(void) { SLC.slc0_rx_link.stop = 1; } -static inline uint32_t send_length_read() +static inline uint32_t send_length_read(void) { return HOST.pkt_len.reg_slc0_len; } @@ -760,7 +760,7 @@ DMA_ATTR static const buf_desc_t start_desc = { .eof = 1, }; -static inline void send_isr_invoker_enable() +static inline void send_isr_invoker_enable(void) { //force trigger rx_done interrupt. the interrupt is abused to invoke ISR from the app by the enable bit and never cleared. send_start_transmission(&start_desc); @@ -770,29 +770,29 @@ static inline void send_isr_invoker_enable() send_stop_ll_operation(); } -static inline void send_isr_invoker_disable() +static inline void send_isr_invoker_disable(void) { SLC.slc0_int_clr.rx_done = 1; } -static inline void send_intr_enable() +static inline void send_intr_enable(void) { SLC.slc0_int_ena.rx_eof = 1; send_isr_invoker_enable(); } -static inline void send_intr_disable() +static inline void send_intr_disable(void) { send_isr_invoker_disable(); SLC.slc0_int_ena.rx_eof = 0; } -static inline void send_isr_invoke() +static inline void send_isr_invoke(void) { SLC.slc0_int_ena.rx_done = 1; } -static inline send_state_t send_get_state() +static inline send_state_t send_get_state(void) { return context.send_state; } @@ -803,7 +803,7 @@ static inline void send_set_state(send_state_t state) } //start hw operation with existing data (if exist) -static esp_err_t send_start() +static esp_err_t send_start(void) { SDIO_SLAVE_CHECK(send_get_state() == STATE_IDLE, "already started", ESP_ERR_INVALID_STATE); @@ -814,7 +814,7 @@ static esp_err_t send_start() } //only stop hw operations, no touch to data as well as counter -static void send_stop() +static void send_stop(void) { SLC.slc0_rx_link.stop = 1; send_intr_disable(); @@ -866,7 +866,7 @@ static inline esp_err_t send_isr_check_new_pkt(portBASE_TYPE *yield) return ESP_OK; } -static inline esp_err_t send_isr_new_packet() +static inline esp_err_t send_isr_new_packet(void) { // since eof is changed, we have to stop and reset the link list, // and restart new link list operation @@ -973,7 +973,7 @@ esp_err_t sdio_slave_transmit(uint8_t* addr, size_t len) } //clear data but keep counter -static esp_err_t send_flush_data() +static esp_err_t send_flush_data(void) { //only works in idle state / wait to send state SDIO_SLAVE_CHECK(send_get_state() == STATE_IDLE, @@ -1019,7 +1019,7 @@ static esp_err_t send_flush_data() } //clear counter but keep data -static esp_err_t send_reset_counter() +static esp_err_t send_reset_counter(void) { SDIO_SLAVE_CHECK(send_get_state() == STATE_IDLE, "reset counter when transmission started", ESP_ERR_INVALID_STATE); @@ -1061,28 +1061,28 @@ static esp_err_t send_reset_counter() #define CHECK_HANDLE_IDLE(desc) do { if (desc == NULL || !desc->not_receiving) {\ return ESP_ERR_INVALID_ARG; } } while(0) -static inline void critical_enter_recv() +static inline void critical_enter_recv(void) { portENTER_CRITICAL(&context.recv_spinlock); } -static inline void critical_exit_recv() +static inline void critical_exit_recv(void) { portEXIT_CRITICAL(&context.recv_spinlock); } -static inline void recv_size_inc() +static inline void recv_size_inc(void) { // fields wdata and inc_more should be written by the same instruction. SLC.slc0_token1.val = FIELD_TO_VALUE2(SLC_SLC0_TOKEN1_WDATA, 1) | FIELD_TO_VALUE2(SLC_SLC0_TOKEN1_INC_MORE, 1); } -static inline void recv_size_reset() +static inline void recv_size_reset(void) { SLC.slc0_token1.val = FIELD_TO_VALUE2(SLC_SLC0_TOKEN1_WDATA, 0) | FIELD_TO_VALUE2(SLC_SLC0_TOKEN1_WR, 1); } -static inline buf_desc_t* recv_get_first_empty_buf() +static inline buf_desc_t* recv_get_first_empty_buf(void) { buf_stailq_t *const queue = &context.recv_link_list; buf_desc_t *desc = STAILQ_FIRST(queue); @@ -1092,7 +1092,7 @@ static inline buf_desc_t* recv_get_first_empty_buf() return desc; } -static esp_err_t recv_start() +static esp_err_t recv_start(void) { SLC.conf0.slc0_tx_rst = 1; SLC.conf0.slc0_tx_rst = 0; @@ -1113,14 +1113,14 @@ static esp_err_t recv_start() return ESP_OK; } -static void recv_stop() +static void recv_stop(void) { SLC.slc0_tx_link.stop = 1; SLC.slc0_int_ena.tx_done = 0; } // reset the counter, but keep the data -static void recv_reset_counter() +static void recv_reset_counter(void) { recv_size_reset(); @@ -1135,7 +1135,7 @@ static void recv_reset_counter() } // remove data, still increase the counter -static void recv_flush_data() +static void recv_flush_data(void) { buf_stailq_t *const queue = &context.recv_link_list; @@ -1276,7 +1276,7 @@ uint8_t* sdio_slave_recv_get_buf(sdio_slave_buf_handle_t handle, size_t *len_o) return desc->buf; } -static void __attribute((unused)) sdio_slave_recv_get_loaded_buffer_num() +static void __attribute((unused)) sdio_slave_recv_get_loaded_buffer_num(void) { buf_stailq_t *const queue = &context.recv_link_list; dump_queue(queue); diff --git a/components/driver/sdmmc_host.c b/components/driver/sdmmc_host.c index 7a8969fd2..c1361829b 100644 --- a/components/driver/sdmmc_host.c +++ b/components/driver/sdmmc_host.c @@ -30,7 +30,7 @@ static void sdmmc_isr(void* arg); -static void sdmmc_host_dma_init(); +static void sdmmc_host_dma_init(void); static const char* TAG = "sdmmc_periph"; @@ -40,7 +40,7 @@ static SemaphoreHandle_t s_io_intr_event; size_t s_slot_width[2] = {1,1}; -void sdmmc_host_reset() +void sdmmc_host_reset(void) { // Set reset bits SDMMC.ctrl.controller_reset = 1; @@ -97,7 +97,7 @@ static void sdmmc_host_set_clk_div(int div) ets_delay_us(10); } -static void sdmmc_host_input_clk_disable() +static void sdmmc_host_input_clk_disable(void) { SDMMC.clock.val = 0; } @@ -216,7 +216,7 @@ esp_err_t sdmmc_host_start_command(int slot, sdmmc_hw_cmd_t cmd, uint32_t arg) { return ESP_OK; } -esp_err_t sdmmc_host_init() +esp_err_t sdmmc_host_init(void) { if (s_intr_handle) { return ESP_ERR_INVALID_STATE; @@ -402,7 +402,7 @@ esp_err_t sdmmc_host_init_slot(int slot, const sdmmc_slot_config_t* slot_config) return ESP_OK; } -esp_err_t sdmmc_host_deinit() +esp_err_t sdmmc_host_deinit(void) { if (!s_intr_handle) { return ESP_ERR_INVALID_STATE; @@ -490,7 +490,7 @@ esp_err_t sdmmc_host_set_bus_ddr_mode(int slot, bool ddr_enabled) return ESP_OK; } -static void sdmmc_host_dma_init() +static void sdmmc_host_dma_init(void) { SDMMC.ctrl.dma_enable = 1; SDMMC.bmod.val = 0; @@ -501,7 +501,7 @@ static void sdmmc_host_dma_init() } -void sdmmc_host_dma_stop() +void sdmmc_host_dma_stop(void) { SDMMC.ctrl.use_internal_dma = 0; SDMMC.ctrl.dma_reset = 1; @@ -524,12 +524,12 @@ void sdmmc_host_dma_prepare(sdmmc_desc_t* desc, size_t block_size, size_t data_s sdmmc_host_dma_resume(); } -void sdmmc_host_dma_resume() +void sdmmc_host_dma_resume(void) { SDMMC.pldmnd = 1; } -bool sdmmc_host_card_busy() +bool sdmmc_host_card_busy(void) { return SDMMC.status.data_busy == 1; } diff --git a/components/driver/sdmmc_private.h b/components/driver/sdmmc_private.h index 9223dce31..94cea52d1 100644 --- a/components/driver/sdmmc_private.h +++ b/components/driver/sdmmc_private.h @@ -26,7 +26,7 @@ typedef struct { uint32_t dma_status; ///< masked DMA interrupt status } sdmmc_event_t; -void sdmmc_host_reset(); +void sdmmc_host_reset(void); esp_err_t sdmmc_host_start_command(int slot, sdmmc_hw_cmd_t cmd, uint32_t arg); @@ -34,13 +34,13 @@ esp_err_t sdmmc_host_wait_for_event(int tick_count, sdmmc_event_t* out_event); void sdmmc_host_dma_prepare(sdmmc_desc_t* desc, size_t block_size, size_t data_size); -void sdmmc_host_dma_stop(); +void sdmmc_host_dma_stop(void); -void sdmmc_host_dma_resume(); +void sdmmc_host_dma_resume(void); -bool sdmmc_host_card_busy(); +bool sdmmc_host_card_busy(void); -esp_err_t sdmmc_host_transaction_handler_init(); +esp_err_t sdmmc_host_transaction_handler_init(void); -void sdmmc_host_transaction_handler_deinit(); +void sdmmc_host_transaction_handler_deinit(void); diff --git a/components/driver/sdmmc_transaction.c b/components/driver/sdmmc_transaction.c index 6cddd4b8e..b2f0874b3 100644 --- a/components/driver/sdmmc_transaction.c +++ b/components/driver/sdmmc_transaction.c @@ -72,7 +72,7 @@ static bool s_is_app_cmd; // This flag is set if the next command is an APP co static esp_pm_lock_handle_t s_pm_lock; #endif -static esp_err_t handle_idle_state_events(); +static esp_err_t handle_idle_state_events(void); static sdmmc_hw_cmd_t make_hw_cmd(sdmmc_command_t* cmd); static esp_err_t handle_event(sdmmc_command_t* cmd, sdmmc_req_state_t* state, sdmmc_event_t* unhandled_events); @@ -80,10 +80,10 @@ static esp_err_t process_events(sdmmc_event_t evt, sdmmc_command_t* cmd, sdmmc_req_state_t* pstate, sdmmc_event_t* unhandled_events); static void process_command_response(uint32_t status, sdmmc_command_t* cmd); static void fill_dma_descriptors(size_t num_desc); -static size_t get_free_descriptors_count(); +static size_t get_free_descriptors_count(void); static bool wait_for_busy_cleared(int timeout_ms); -esp_err_t sdmmc_host_transaction_handler_init() +esp_err_t sdmmc_host_transaction_handler_init(void) { assert(s_request_mutex == NULL); s_request_mutex = xSemaphoreCreateMutex(); @@ -102,7 +102,7 @@ esp_err_t sdmmc_host_transaction_handler_init() return ESP_OK; } -void sdmmc_host_transaction_handler_deinit() +void sdmmc_host_transaction_handler_deinit(void) { assert(s_request_mutex); #ifdef CONFIG_PM_ENABLE @@ -182,7 +182,7 @@ out: return ret; } -static size_t get_free_descriptors_count() +static size_t get_free_descriptors_count(void) { const size_t next = s_cur_transfer.next_desc; size_t count = 0; @@ -234,7 +234,7 @@ static void fill_dma_descriptors(size_t num_desc) } } -static esp_err_t handle_idle_state_events() +static esp_err_t handle_idle_state_events(void) { /* Handle any events which have happened in between transfers. * Under current assumptions (no SDIO support) only card detect events diff --git a/components/driver/sdspi_host.c b/components/driver/sdspi_host.c index 3a36ed769..d3e37489f 100644 --- a/components/driver/sdspi_host.c +++ b/components/driver/sdspi_host.c @@ -225,12 +225,12 @@ static esp_err_t init_spi_dev(int slot, int clock_speed_hz) return spi_bus_add_device((spi_host_device_t) slot, &devcfg, &s_slots[slot].handle); } -esp_err_t sdspi_host_init() +esp_err_t sdspi_host_init(void) { return ESP_OK; } -esp_err_t sdspi_host_deinit() +esp_err_t sdspi_host_deinit(void) { for (size_t i = 0; i < sizeof(s_slots)/sizeof(s_slots[0]); ++i) { if (s_slots[i].handle) { diff --git a/components/driver/spi_common.c b/components/driver/spi_common.c index ff7501eaf..a8954d07c 100644 --- a/components/driver/spi_common.c +++ b/components/driver/spi_common.c @@ -394,7 +394,7 @@ bool IRAM_ATTR spicommon_dmaworkaround_req_reset(int dmachan, dmaworkaround_cb_t return ret; } -bool IRAM_ATTR spicommon_dmaworkaround_reset_in_progress() +bool IRAM_ATTR spicommon_dmaworkaround_reset_in_progress(void) { return (dmaworkaround_waiting_for_chan != 0); } diff --git a/components/driver/test/test_i2c.c b/components/driver/test/test_i2c.c index 2d8bb922f..bde591cb3 100644 --- a/components/driver/test/test_i2c.c +++ b/components/driver/test/test_i2c.c @@ -75,7 +75,7 @@ static void disp_buf(uint8_t *buf, int len) printf("\n"); } -static i2c_config_t i2c_master_init() +static i2c_config_t i2c_master_init(void) { i2c_config_t conf_master = { .mode = I2C_MODE_MASTER, @@ -88,7 +88,7 @@ static i2c_config_t i2c_master_init() return conf_master; } -static i2c_config_t i2c_slave_init() +static i2c_config_t i2c_slave_init(void) { i2c_config_t conf_slave = { .mode = I2C_MODE_SLAVE, @@ -252,7 +252,7 @@ TEST_CASE("I2C driver memory leaking check", "[i2c]") TEST_ASSERT_INT_WITHIN(100, size, esp_get_free_heap_size()); } -static void i2c_master_write_test() +static void i2c_master_write_test(void) { uint8_t *data_wr = (uint8_t *) malloc(DATA_LENGTH); int i; @@ -276,7 +276,7 @@ static void i2c_master_write_test() TEST_ESP_OK(i2c_driver_delete(I2C_MASTER_NUM)); } -static void i2c_slave_read_test() +static void i2c_slave_read_test(void) { uint8_t *data_rd = (uint8_t *) malloc(DATA_LENGTH); int size_rd = 0; @@ -308,7 +308,7 @@ static void i2c_slave_read_test() TEST_CASE_MULTIPLE_DEVICES("I2C master write slave test", "[i2c][test_env=UT_T2_I2C][timeout=150]", i2c_master_write_test, i2c_slave_read_test); -static void master_read_slave_test() +static void master_read_slave_test(void) { uint8_t *data_rd = (uint8_t *) malloc(DATA_LENGTH); memset(data_rd, 0, DATA_LENGTH); @@ -340,7 +340,7 @@ static void master_read_slave_test() i2c_driver_delete(I2C_MASTER_NUM); } -static void slave_write_buffer_test() +static void slave_write_buffer_test(void) { uint8_t *data_wr = (uint8_t *) malloc(DATA_LENGTH); int size_rd; @@ -367,7 +367,7 @@ static void slave_write_buffer_test() TEST_CASE_MULTIPLE_DEVICES("I2C master read slave test", "[i2c][test_env=UT_T2_I2C][timeout=150]", master_read_slave_test, slave_write_buffer_test); -static void i2c_master_write_read_test() +static void i2c_master_write_read_test(void) { uint8_t *data_rd = (uint8_t *) malloc(DATA_LENGTH); memset(data_rd, 0, DATA_LENGTH); @@ -409,7 +409,7 @@ static void i2c_master_write_read_test() i2c_driver_delete(I2C_MASTER_NUM); } -static void i2c_slave_read_write_test() +static void i2c_slave_read_write_test(void) { uint8_t *data_rd = (uint8_t *) malloc(DATA_LENGTH); memset(data_rd, 0, DATA_LENGTH); @@ -445,7 +445,7 @@ static void i2c_slave_read_write_test() TEST_CASE_MULTIPLE_DEVICES("I2C read and write test", "[i2c][test_env=UT_T2_I2C][timeout=150]", i2c_master_write_read_test, i2c_slave_read_write_test); -static void i2c_master_repeat_write() +static void i2c_master_repeat_write(void) { uint8_t *data_wr = (uint8_t *) malloc(DATA_LENGTH); int times = 3; @@ -471,7 +471,7 @@ static void i2c_master_repeat_write() i2c_driver_delete(I2C_MASTER_NUM); } -static void i2c_slave_repeat_read() +static void i2c_slave_repeat_read(void) { int size_rd = 0; int times = 3; diff --git a/components/driver/test/test_rmt.c b/components/driver/test/test_rmt.c index 7b186b2c5..a3014401c 100644 --- a/components/driver/test/test_rmt.c +++ b/components/driver/test/test_rmt.c @@ -262,7 +262,7 @@ static int get_rx_data(RingbufHandle_t rb) /** * @brief RMT transmitter initialization */ -static void tx_init() +static void tx_init(void) { // the sender once it send something, its frq is 38kHz, and the duty cycle is 50% rmt_tx_config_t tx_cfg = { @@ -289,7 +289,7 @@ static void tx_init() /** * @brief RMT receiver initialization */ -static void rx_init() +static void rx_init(void) { rmt_rx_config_t rx_cfg = { .filter_en = true, diff --git a/components/driver/test/test_spi_sio.c b/components/driver/test/test_spi_sio.c index 37d4065df..cb6964f6b 100644 --- a/components/driver/test/test_spi_sio.c +++ b/components/driver/test/test_spi_sio.c @@ -154,7 +154,7 @@ void test_sio_master_round(bool test_mosi) master_free_device_bus(spi); } -void test_sio_master() +void test_sio_master(void) { test_sio_master_round(true); unity_send_signal("master ready"); @@ -210,7 +210,7 @@ void test_sio_slave_round(bool test_mosi) spi_slave_free(TEST_SLAVE_HOST); } -void test_sio_slave() +void test_sio_slave(void) { test_sio_slave_round(true); unity_wait_for_signal("master ready"); diff --git a/components/driver/test/test_spi_slave.c b/components/driver/test/test_spi_slave.c index 668b78d29..c1e913c48 100644 --- a/components/driver/test/test_spi_slave.c +++ b/components/driver/test/test_spi_slave.c @@ -51,7 +51,7 @@ static void master_init_nodma( spi_device_handle_t* spi) TEST_ASSERT(ret==ESP_OK); } -static void slave_init() +static void slave_init(void) { //Configuration for the SPI bus spi_bus_config_t buscfg={ diff --git a/components/driver/test/test_timer.c b/components/driver/test/test_timer.c index 7f1d3c37f..bc5f3ae75 100644 --- a/components/driver/test/test_timer.c +++ b/components/driver/test/test_timer.c @@ -127,7 +127,7 @@ static void all_timer_init(timer_config_t config, bool flag) } // start all of timer -static void all_timer_start() +static void all_timer_start(void) { esp_err_t ret; ret = timer_start(TIMER_GROUP_0, TIMER_0); @@ -153,7 +153,7 @@ static void all_timer_set_counter_value(uint64_t set_timer_val) TEST_ASSERT(ret == ESP_OK); } -static void all_timer_pause() +static void all_timer_pause(void) { esp_err_t ret; ret = timer_pause(TIMER_GROUP_0, TIMER_0); diff --git a/components/driver/test/test_uart.c b/components/driver/test/test_uart.c index 8ef579c80..019604403 100644 --- a/components/driver/test/test_uart.c +++ b/components/driver/test/test_uart.c @@ -244,7 +244,7 @@ static uint16_t buffer_fill_random(uint8_t *buffer, size_t length) return crc; } -static void rs485_init() +static void rs485_init(void) { uart_config_t uart_config = { .baud_rate = UART_BAUD_115200, @@ -288,7 +288,7 @@ static esp_err_t print_packet_data(const char *str, uint8_t *buffer, uint16_t bu } // Slave test case for multi device -static void rs485_slave() +static void rs485_slave(void) { rs485_init(); uint8_t* slave_data = (uint8_t*) malloc(BUF_SIZE); @@ -327,7 +327,7 @@ static void rs485_slave() // Master test of multi device test case. // It forms packet with random data, apply generated CRC16 and sends to slave. // If response recieved correctly from slave means RS485 channel works. -static void rs485_master() +static void rs485_master(void) { uint16_t err_count = 0, good_count = 0; rs485_init(); diff --git a/components/driver/uart.c b/components/driver/uart.c index 20306c128..3367d1d04 100644 --- a/components/driver/uart.c +++ b/components/driver/uart.c @@ -1484,7 +1484,7 @@ void uart_set_select_notif_callback(uart_port_t uart_num, uart_select_notif_call } } -portMUX_TYPE *uart_get_selectlock() +portMUX_TYPE *uart_get_selectlock(void) { return &uart_selectlock; } diff --git a/components/efuse/include/esp_efuse.h b/components/efuse/include/esp_efuse.h index b2afdbd9a..0d7ed8373 100644 --- a/components/efuse/include/esp_efuse.h +++ b/components/efuse/include/esp_efuse.h @@ -322,7 +322,7 @@ void esp_efuse_write_random_key(uint32_t blk_wdata0_reg); /* @brief Return secure_version from efuse field. * @return Secure version from efuse field */ -uint32_t esp_efuse_read_secure_version(); +uint32_t esp_efuse_read_secure_version(void); /* @brief Check secure_version from app and secure_version and from efuse field. * diff --git a/components/efuse/src/esp_efuse_fields.c b/components/efuse/src/esp_efuse_fields.c index 5d440f383..01ed585d8 100644 --- a/components/efuse/src/esp_efuse_fields.c +++ b/components/efuse/src/esp_efuse_fields.c @@ -130,7 +130,7 @@ void esp_efuse_init(uint32_t offset, uint32_t size) esp_efuse_flash_size = size; } -static uint32_t emulate_secure_version_read() +static uint32_t emulate_secure_version_read(void) { uint32_t secure_version; uint32_t offset = esp_efuse_flash_offset; @@ -170,7 +170,7 @@ static void emulate_secure_version_write(uint32_t secure_version) #define EFUSE_BLK_RD_ANTI_ROLLBACK EFUSE_BLK3_RDATA4_REG #define EFUSE_BLK_WR_ANTI_ROLLBACK EFUSE_BLK3_WDATA4_REG -uint32_t esp_efuse_read_secure_version() +uint32_t esp_efuse_read_secure_version(void) { #ifdef CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK uint32_t secure_version; diff --git a/components/efuse/src/esp_efuse_utility.c b/components/efuse/src/esp_efuse_utility.c index 03ea26084..e3154b188 100644 --- a/components/efuse/src/esp_efuse_utility.c +++ b/components/efuse/src/esp_efuse_utility.c @@ -34,7 +34,7 @@ static const char *TAG = "efuse"; static uint32_t virt_blocks[COUNT_EFUSE_BLOCKS][COUNT_EFUSE_REG_PER_BLOCK]; /* Call the update function to seed virtual efuses during initialization */ -__attribute__((constructor)) void esp_efuse_utility_update_virt_blocks(); +__attribute__((constructor)) void esp_efuse_utility_update_virt_blocks(void); #endif @@ -222,7 +222,7 @@ void esp_efuse_utility_burn_efuses(void) // Erase the virt_blocks array. -void esp_efuse_utility_erase_virt_blocks() +void esp_efuse_utility_erase_virt_blocks(void) { #ifdef CONFIG_EFUSE_VIRTUAL memset(virt_blocks, 0, sizeof(virt_blocks)); @@ -230,7 +230,7 @@ void esp_efuse_utility_erase_virt_blocks() } // Fills the virt_blocks array by values from efuse_Rdata. -void esp_efuse_utility_update_virt_blocks() +void esp_efuse_utility_update_virt_blocks(void) { #ifdef CONFIG_EFUSE_VIRTUAL ESP_LOGI(TAG, "Loading virtual efuse blocks from real efuses"); @@ -247,7 +247,7 @@ void esp_efuse_utility_update_virt_blocks() } // Prints efuse values for all registers. -void esp_efuse_utility_debug_dump_blocks() +void esp_efuse_utility_debug_dump_blocks(void) { printf("EFUSE_BLKx:\n"); #ifdef CONFIG_EFUSE_VIRTUAL @@ -454,7 +454,7 @@ static void read_r_data(esp_efuse_block_t num_block, uint32_t* buf_r_data) // After esp_efuse_write.. functions EFUSE_BLKx_WDATAx_REG were filled is not coded values. // This function reads EFUSE_BLKx_WDATAx_REG registers, applies coding scheme and writes encoded values back to EFUSE_BLKx_WDATAx_REG. -esp_err_t esp_efuse_utility_apply_new_coding_scheme() +esp_err_t esp_efuse_utility_apply_new_coding_scheme(void) { uint8_t buf_w_data[COUNT_EFUSE_REG_PER_BLOCK * 4]; uint8_t buf_r_data[COUNT_EFUSE_REG_PER_BLOCK * 4]; diff --git a/components/efuse/src/esp_efuse_utility.h b/components/efuse/src/esp_efuse_utility.h index 18d8b5886..eadd80e02 100644 --- a/components/efuse/src/esp_efuse_utility.h +++ b/components/efuse/src/esp_efuse_utility.h @@ -112,17 +112,17 @@ void esp_efuse_utility_reset(void); /** * @brief Fills the virt_blocks array by values from efuse_Rdata. */ -void esp_efuse_utility_update_virt_blocks(); +void esp_efuse_utility_update_virt_blocks(void); /** * @brief Prints efuse values for all registers. */ -void esp_efuse_utility_debug_dump_blocks(); +void esp_efuse_utility_debug_dump_blocks(void); /** * @brief Erase the virt_blocks array. */ -void esp_efuse_utility_erase_virt_blocks(); +void esp_efuse_utility_erase_virt_blocks(void); /** * @brief Apply coding_scheme to write registers. @@ -131,7 +131,7 @@ void esp_efuse_utility_erase_virt_blocks(); * - ESP_OK: The operation was successfully completed. * - ESP_ERR_CODING: Error range of data does not match the coding scheme. */ -esp_err_t esp_efuse_utility_apply_new_coding_scheme(); +esp_err_t esp_efuse_utility_apply_new_coding_scheme(void); #ifdef __cplusplus } diff --git a/components/esp-tls/esp_tls.c b/components/esp-tls/esp_tls.c index 65cd789f3..cd9bd0257 100644 --- a/components/esp-tls/esp_tls.c +++ b/components/esp-tls/esp_tls.c @@ -158,7 +158,7 @@ err_freeaddr: return ret; } -esp_err_t esp_tls_init_global_ca_store() +esp_err_t esp_tls_init_global_ca_store(void) { if (global_cacert == NULL) { global_cacert = (mbedtls_x509_crt *)calloc(1, sizeof(mbedtls_x509_crt)); @@ -197,12 +197,12 @@ esp_err_t esp_tls_set_global_ca_store(const unsigned char *cacert_pem_buf, const return ESP_OK; } -mbedtls_x509_crt *esp_tls_get_global_ca_store() +mbedtls_x509_crt *esp_tls_get_global_ca_store(void) { return global_cacert; } -void esp_tls_free_global_ca_store() +void esp_tls_free_global_ca_store(void) { if (global_cacert) { mbedtls_x509_crt_free(global_cacert); @@ -797,7 +797,7 @@ void esp_tls_server_session_delete(esp_tls_t *tls) }; #endif /* ! CONFIG_ESP_TLS_SERVER */ -esp_tls_t *esp_tls_init() +esp_tls_t *esp_tls_init(void) { esp_tls_t *tls = (esp_tls_t *)calloc(1, sizeof(esp_tls_t)); if (!tls) { diff --git a/components/esp-tls/esp_tls.h b/components/esp-tls/esp_tls.h index 1c2f785ea..0c4caabaa 100644 --- a/components/esp-tls/esp_tls.h +++ b/components/esp-tls/esp_tls.h @@ -229,7 +229,7 @@ typedef struct esp_tls { * @return tls Pointer to esp-tls as esp-tls handle if successfully initialized, * NULL if allocation error */ -esp_tls_t *esp_tls_init(); +esp_tls_t *esp_tls_init(void); @@ -402,7 +402,7 @@ ssize_t esp_tls_get_bytes_avail(esp_tls_t *tls); * - ESP_OK if creating global CA store was successful. * - ESP_ERR_NO_MEM if an error occured when allocating the mbedTLS resources. */ -esp_err_t esp_tls_init_global_ca_store(); +esp_err_t esp_tls_init_global_ca_store(void); /** * @brief Set the global CA store with the buffer provided in pem format. @@ -435,7 +435,7 @@ esp_err_t esp_tls_set_global_ca_store(const unsigned char *cacert_pem_buf, const * - Pointer to the global CA store currently being used if successful. * - NULL if there is no global CA store set. */ -mbedtls_x509_crt *esp_tls_get_global_ca_store(); +mbedtls_x509_crt *esp_tls_get_global_ca_store(void); /** * @brief Free the global CA store currently being used. @@ -443,7 +443,7 @@ mbedtls_x509_crt *esp_tls_get_global_ca_store(); * The memory being used by the global CA store to store all the parsed certificates is * freed up. The application can call this API if it no longer needs the global CA store. */ -void esp_tls_free_global_ca_store(); +void esp_tls_free_global_ca_store(void); /** * @brief Returns last error in esp_tls with detailed mbedtls related error codes. diff --git a/components/esp32/brownout.c b/components/esp32/brownout.c index 35589330f..89f821c50 100644 --- a/components/esp32/brownout.c +++ b/components/esp32/brownout.c @@ -31,7 +31,7 @@ #define BROWNOUT_DET_LVL 0 #endif //CONFIG_ESP32_BROWNOUT_DET_LVL -static void rtc_brownout_isr_handler() +static void rtc_brownout_isr_handler(void) { /* Normally RTC ISR clears the interrupt flag after the application-supplied * handler returns. Since restart is called here, the flag needs to be @@ -47,7 +47,7 @@ static void rtc_brownout_isr_handler() esp_restart_noos(); } -void esp_brownout_init() +void esp_brownout_init(void) { REG_WRITE(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ENA /* Enable BOD */ diff --git a/components/esp32/cache_err_int.c b/components/esp32/cache_err_int.c index 079812023..30b294848 100644 --- a/components/esp32/cache_err_int.c +++ b/components/esp32/cache_err_int.c @@ -30,7 +30,7 @@ #include "soc/dport_reg.h" #include "sdkconfig.h" -void esp_cache_err_int_init() +void esp_cache_err_int_init(void) { uint32_t core_id = xPortGetCoreID(); ESP_INTR_DISABLE(ETS_CACHEERR_INUM); @@ -70,7 +70,7 @@ void esp_cache_err_int_init() ESP_INTR_ENABLE(ETS_CACHEERR_INUM); } -int IRAM_ATTR esp_cache_err_get_cpuid() +int IRAM_ATTR esp_cache_err_get_cpuid(void) { esp_dport_access_int_pause(); const uint32_t pro_mask = diff --git a/components/esp32/clk.c b/components/esp32/clk.c index 69f6057b4..fd5c47761 100644 --- a/components/esp32/clk.c +++ b/components/esp32/clk.c @@ -210,7 +210,7 @@ static void select_rtc_slow_clk(slow_clk_sel_t slow_clk) esp_clk_slowclk_cal_set(cal_val); } -void rtc_clk_select_rtc_slow_clk() +void rtc_clk_select_rtc_slow_clk(void) { select_rtc_slow_clk(RTC_SLOW_FREQ_32K_XTAL); } diff --git a/components/esp32/cpu_start.c b/components/esp32/cpu_start.c index f93e4cdf0..1dfa5c246 100644 --- a/components/esp32/cpu_start.c +++ b/components/esp32/cpu_start.c @@ -79,7 +79,7 @@ void start_cpu0(void) __attribute__((weak, alias("start_cpu0_default"))) __attribute__((noreturn)); void start_cpu0_default(void) IRAM_ATTR __attribute__((noreturn)); #if !CONFIG_FREERTOS_UNICORE -static void IRAM_ATTR call_start_cpu1() __attribute__((noreturn)); +static void IRAM_ATTR call_start_cpu1(void) __attribute__((noreturn)); void start_cpu1(void) __attribute__((weak, alias("start_cpu1_default"))) __attribute__((noreturn)); void start_cpu1_default(void) IRAM_ATTR __attribute__((noreturn)); static bool app_cpu_started = false; @@ -117,7 +117,7 @@ static bool s_spiram_okay=true; * and the app CPU is in reset. We do have a stack, so we can do the initialization in C. */ -void IRAM_ATTR call_start_cpu0() +void IRAM_ATTR call_start_cpu0(void) { #if CONFIG_FREERTOS_UNICORE RESET_REASON rst_reas[1]; @@ -277,7 +277,7 @@ static void wdt_reset_cpu1_info_enable(void) DPORT_REG_CLR_BIT(DPORT_APP_CPU_RECORD_CTRL_REG, DPORT_APP_CPU_RECORD_ENABLE); } -void IRAM_ATTR call_start_cpu1() +void IRAM_ATTR call_start_cpu1(void) { asm volatile (\ "wsr %0, vecbase\n" \ @@ -484,7 +484,7 @@ void start_cpu1_default(void) #endif //!CONFIG_FREERTOS_UNICORE #ifdef CONFIG_COMPILER_CXX_EXCEPTIONS -size_t __cxx_eh_arena_size_get() +size_t __cxx_eh_arena_size_get(void) { return CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE; } diff --git a/components/esp32/crosscore_int.c b/components/esp32/crosscore_int.c index 746060e44..24bb3fb26 100644 --- a/components/esp32/crosscore_int.c +++ b/components/esp32/crosscore_int.c @@ -43,7 +43,7 @@ static volatile uint32_t reason[ portNUM_PROCESSORS ]; ToDo: There is a small chance the CPU already has yielded when this ISR is serviced. In that case, it's running the intended task but the ISR will cause it to switch _away_ from it. portYIELD_FROM_ISR will probably just schedule the task again, but have to check that. */ -static inline void IRAM_ATTR esp_crosscore_isr_handle_yield() +static inline void IRAM_ATTR esp_crosscore_isr_handle_yield(void) { portYIELD_FROM_ISR(); } @@ -79,7 +79,7 @@ static void IRAM_ATTR esp_crosscore_isr(void *arg) { //Initialize the crosscore interrupt on this core. Call this once //on each active core. -void esp_crosscore_int_init() { +void esp_crosscore_int_init(void) { portENTER_CRITICAL(&reason_spinlock); reason[xPortGetCoreID()]=0; portEXIT_CRITICAL(&reason_spinlock); diff --git a/components/esp32/esp_clk_internal.h b/components/esp32/esp_clk_internal.h index 53af81c28..f1f896457 100644 --- a/components/esp32/esp_clk_internal.h +++ b/components/esp32/esp_clk_internal.h @@ -41,4 +41,4 @@ void esp_perip_clk_init(void); /* Selects an external clock source (32 kHz) for RTC. * Only internal use in unit test. */ -void rtc_clk_select_rtc_slow_clk(); +void rtc_clk_select_rtc_slow_clk(void); diff --git a/components/esp32/esp_himem.c b/components/esp32/esp_himem.c index 7053af341..c9c6a2631 100644 --- a/components/esp32/esp_himem.c +++ b/components/esp32/esp_himem.c @@ -117,13 +117,13 @@ static void set_bank(int virt_bank, int phys_bank, int ct) assert(r == 0); } -size_t esp_himem_get_phys_size() +size_t esp_himem_get_phys_size(void) { int paddr_start = (4096 * 1024) - (CACHE_BLOCKSIZE * SPIRAM_BANKSWITCH_RESERVE); return esp_spiram_get_size()-paddr_start; } -size_t esp_himem_get_free_size() +size_t esp_himem_get_free_size(void) { size_t ret=0; for (int i = 0; i < s_ramblockcnt; i++) { @@ -132,12 +132,12 @@ size_t esp_himem_get_free_size() return ret; } -size_t esp_himem_reserved_area_size() { +size_t esp_himem_reserved_area_size(void) { return CACHE_BLOCKSIZE * SPIRAM_BANKSWITCH_RESERVE; } -void __attribute__((constructor)) esp_himem_init() +void __attribute__((constructor)) esp_himem_init(void) { if (SPIRAM_BANKSWITCH_RESERVE == 0) return; int maxram=esp_spiram_get_size(); diff --git a/components/esp32/esp_timer_esp32.c b/components/esp32/esp_timer_esp32.c index cac4b819b..541ddc740 100644 --- a/components/esp32/esp_timer_esp32.c +++ b/components/esp32/esp_timer_esp32.c @@ -150,7 +150,7 @@ portMUX_TYPE s_time_update_lock = portMUX_INITIALIZER_UNLOCKED; #define TIMER_IS_AFTER_OVERFLOW(a) (ALARM_OVERFLOW_VAL < (a) && (a) <= FRC_TIMER_LOAD_VALUE(1)) // Check if timer overflow has happened (but was not handled by ISR yet) -static inline bool IRAM_ATTR timer_overflow_happened() +static inline bool IRAM_ATTR timer_overflow_happened(void) { if (s_overflow_happened) { return true; @@ -176,17 +176,17 @@ static inline void IRAM_ATTR timer_count_reload(void) REG_WRITE(FRC_TIMER_LOAD_REG(1), REG_READ(FRC_TIMER_COUNT_REG(1)) - ALARM_OVERFLOW_VAL); } -void esp_timer_impl_lock() +void esp_timer_impl_lock(void) { portENTER_CRITICAL(&s_time_update_lock); } -void esp_timer_impl_unlock() +void esp_timer_impl_unlock(void) { portEXIT_CRITICAL(&s_time_update_lock); } -uint64_t IRAM_ATTR esp_timer_impl_get_time() +uint64_t IRAM_ATTR esp_timer_impl_get_time(void) { uint32_t timer_val; uint64_t time_base; @@ -371,7 +371,7 @@ esp_err_t esp_timer_impl_init(intr_handler_t alarm_handler) return ESP_OK; } -void esp_timer_impl_deinit() +void esp_timer_impl_deinit(void) { esp_intr_disable(s_timer_interrupt_handle); @@ -386,13 +386,13 @@ void esp_timer_impl_deinit() // FIXME: This value is safe for 80MHz APB frequency. // Should be modified to depend on clock frequency. -uint64_t IRAM_ATTR esp_timer_impl_get_min_period_us() +uint64_t IRAM_ATTR esp_timer_impl_get_min_period_us(void) { return 50; } #ifdef ESP_TIMER_DYNAMIC_OVERFLOW_VAL -uint32_t esp_timer_impl_get_overflow_val() +uint32_t esp_timer_impl_get_overflow_val(void) { return s_alarm_overflow_val; } diff --git a/components/esp32/include/esp32/brownout.h b/components/esp32/include/esp32/brownout.h index 5a0b1aec0..dafba8dd7 100644 --- a/components/esp32/include/esp32/brownout.h +++ b/components/esp32/include/esp32/brownout.h @@ -16,6 +16,6 @@ #ifndef __ESP_BROWNOUT_H #define __ESP_BROWNOUT_H -void esp_brownout_init(); +void esp_brownout_init(void); #endif \ No newline at end of file diff --git a/components/esp32/include/esp32/cache_err_int.h b/components/esp32/include/esp32/cache_err_int.h index bcbd63e79..8881291a2 100644 --- a/components/esp32/include/esp32/cache_err_int.h +++ b/components/esp32/include/esp32/cache_err_int.h @@ -20,7 +20,7 @@ * to interrupt input number ETS_CACHEERR_INUM (see soc/soc.h). It is called * from the startup code. */ -void esp_cache_err_int_init(); +void esp_cache_err_int_init(void); /** @@ -30,4 +30,4 @@ void esp_cache_err_int_init(); * - APP_CPU_NUM, if APP_CPU has caused cache IA interrupt * - (-1) otherwise */ -int esp_cache_err_get_cpuid(); +int esp_cache_err_get_cpuid(void); diff --git a/components/esp32/include/esp32/clk.h b/components/esp32/include/esp32/clk.h index 9393fc1f5..4e32fd16e 100644 --- a/components/esp32/include/esp32/clk.h +++ b/components/esp32/include/esp32/clk.h @@ -29,7 +29,7 @@ * * @return the calibration value obtained using rtc_clk_cal, at startup time */ -uint32_t esp_clk_slowclk_cal_get(); +uint32_t esp_clk_slowclk_cal_get(void); /** * @brief Update the calibration value of RTC slow clock @@ -84,4 +84,4 @@ int esp_clk_xtal_freq(void); * * @return Value or RTC counter, expressed in microseconds */ -uint64_t esp_clk_rtc_time(); +uint64_t esp_clk_rtc_time(void); diff --git a/components/esp32/include/esp32/himem.h b/components/esp32/include/esp32/himem.h index 099d92601..0297725a1 100644 --- a/components/esp32/include/esp32/himem.h +++ b/components/esp32/include/esp32/himem.h @@ -125,14 +125,14 @@ esp_err_t esp_himem_unmap(esp_himem_rangehandle_t range, void *ptr, size_t len); * * @returns Amount of memory, in bytes */ -size_t esp_himem_get_phys_size(); +size_t esp_himem_get_phys_size(void); /** * @brief Get free amount of memory under control of himem API * * @returns Amount of free memory, in bytes */ -size_t esp_himem_get_free_size(); +size_t esp_himem_get_free_size(void); /** @@ -143,7 +143,7 @@ size_t esp_himem_get_free_size(); * * @returns Amount of reserved area, in bytes */ -size_t esp_himem_reserved_area_size(); +size_t esp_himem_reserved_area_size(void); #ifdef __cplusplus diff --git a/components/esp32/include/esp32/spiram.h b/components/esp32/include/esp32/spiram.h index a55872cd4..ccbca2c0b 100644 --- a/components/esp32/include/esp32/spiram.h +++ b/components/esp32/include/esp32/spiram.h @@ -34,14 +34,14 @@ typedef enum { * - ESP_SPIRAM_SIZE_INVALID if SPI RAM not enabled or not valid * - SPI RAM size */ -esp_spiram_size_t esp_spiram_get_chip_size(); +esp_spiram_size_t esp_spiram_get_chip_size(void); /** * @brief Initialize spiram interface/hardware. Normally called from cpu_start.c. * * @return ESP_OK on success */ -esp_err_t esp_spiram_init(); +esp_err_t esp_spiram_init(void); /** * @brief Configure Cache/MMU for access to external SPI RAM. @@ -52,7 +52,7 @@ esp_err_t esp_spiram_init(); * * @attention this function must be called with flash cache disabled. */ -void esp_spiram_init_cache(); +void esp_spiram_init_cache(void); /** @@ -63,13 +63,13 @@ void esp_spiram_init_cache(); * * @return true on success, false on failed memory test */ -bool esp_spiram_test(); +bool esp_spiram_test(void); /** * @brief Add the initialized SPI RAM to the heap allocator. */ -esp_err_t esp_spiram_add_to_heapalloc(); +esp_err_t esp_spiram_add_to_heapalloc(void); /** @@ -77,7 +77,7 @@ esp_err_t esp_spiram_add_to_heapalloc(); * * @return Size in bytes, or 0 if no external RAM chip support compiled in. */ -size_t esp_spiram_get_size(); +size_t esp_spiram_get_size(void); /** @@ -87,7 +87,7 @@ size_t esp_spiram_get_size(); * * This is meant for use from within the SPI flash code. */ -void esp_spiram_writeback_cache(); +void esp_spiram_writeback_cache(void); diff --git a/components/esp32/include/esp_intr_alloc.h b/components/esp32/include/esp_intr_alloc.h index d6893a07a..cafc178bf 100644 --- a/components/esp32/include/esp_intr_alloc.h +++ b/components/esp32/include/esp_intr_alloc.h @@ -282,13 +282,13 @@ esp_err_t esp_intr_set_in_iram(intr_handle_t handle, bool is_in_iram); /** * @brief Disable interrupts that aren't specifically marked as running from IRAM */ -void esp_intr_noniram_disable(); +void esp_intr_noniram_disable(void); /** * @brief Re-enable interrupts disabled by esp_intr_noniram_disable */ -void esp_intr_noniram_enable(); +void esp_intr_noniram_enable(void); /**@}*/ diff --git a/components/esp32/include/esp_sleep.h b/components/esp32/include/esp_sleep.h index 7791de6f7..7101bda07 100644 --- a/components/esp32/include/esp_sleep.h +++ b/components/esp32/include/esp_sleep.h @@ -98,7 +98,7 @@ esp_err_t esp_sleep_disable_wakeup_source(esp_sleep_source_t source); * - ESP_ERR_NOT_SUPPORTED if additional current by touch (CONFIG_ESP32_RTC_EXT_CRYST_ADDIT_CURRENT) is enabled. * - ESP_ERR_INVALID_STATE if ULP co-processor is not enabled or if wakeup triggers conflict */ -esp_err_t esp_sleep_enable_ulp_wakeup(); +esp_err_t esp_sleep_enable_ulp_wakeup(void); /** * @brief Enable wakeup by timer @@ -125,7 +125,7 @@ esp_err_t esp_sleep_enable_timer_wakeup(uint64_t time_in_us); * - ESP_ERR_NOT_SUPPORTED if additional current by touch (CONFIG_ESP32_RTC_EXT_CRYST_ADDIT_CURRENT) is enabled. * - ESP_ERR_INVALID_STATE if wakeup triggers conflict */ -esp_err_t esp_sleep_enable_touchpad_wakeup(); +esp_err_t esp_sleep_enable_touchpad_wakeup(void); /** * @brief Get the touch pad which caused wakeup @@ -134,7 +134,7 @@ esp_err_t esp_sleep_enable_touchpad_wakeup(); * * @return touch pad which caused wakeup */ -touch_pad_t esp_sleep_get_touchpad_wakeup_status(); +touch_pad_t esp_sleep_get_touchpad_wakeup_status(void); /** * @brief Enable wakeup using a pin @@ -213,7 +213,7 @@ esp_err_t esp_sleep_enable_ext1_wakeup(uint64_t mask, esp_sleep_ext1_wakeup_mode * - ESP_OK on success * - ESP_ERR_INVALID_STATE if wakeup triggers conflict */ -esp_err_t esp_sleep_enable_gpio_wakeup(); +esp_err_t esp_sleep_enable_gpio_wakeup(void); /** * @brief Enable wakeup from light sleep using UART @@ -239,7 +239,7 @@ esp_err_t esp_sleep_enable_uart_wakeup(int uart_num); * * @return bit mask, if GPIOn caused wakeup, BIT(n) will be set */ -uint64_t esp_sleep_get_ext1_wakeup_status(); +uint64_t esp_sleep_get_ext1_wakeup_status(void); /** * @brief Set power down mode for an RTC power domain in sleep mode @@ -260,7 +260,7 @@ esp_err_t esp_sleep_pd_config(esp_sleep_pd_domain_t domain, * * This function does not return. */ -void esp_deep_sleep_start() __attribute__((noreturn)); +void esp_deep_sleep_start(void) __attribute__((noreturn)); /** * @brief Enter light sleep with the configured wakeup options @@ -269,7 +269,7 @@ void esp_deep_sleep_start() __attribute__((noreturn)); * - ESP_OK on success (returned after wakeup) * - ESP_ERR_INVALID_STATE if WiFi or BT is not stopped */ -esp_err_t esp_light_sleep_start(); +esp_err_t esp_light_sleep_start(void); /** * @brief Enter deep-sleep mode @@ -311,7 +311,7 @@ void system_deep_sleep(uint64_t time_in_us) __attribute__((noreturn, deprecated) * * @return cause of wake up from last sleep (deep sleep or light sleep) */ -esp_sleep_wakeup_cause_t esp_sleep_get_wakeup_cause(); +esp_sleep_wakeup_cause_t esp_sleep_get_wakeup_cause(void); /** diff --git a/components/esp32/int_wdt.c b/components/esp32/int_wdt.c index f42b98773..8f18f7157 100644 --- a/components/esp32/int_wdt.c +++ b/components/esp32/int_wdt.c @@ -69,7 +69,7 @@ static void IRAM_ATTR tick_hook(void) { #endif -void esp_int_wdt_init() { +void esp_int_wdt_init(void) { periph_module_enable(PERIPH_TIMG1_MODULE); TIMERG1.wdt_wprotect=TIMG_WDT_WKEY_VALUE; TIMERG1.wdt_config0.sys_reset_length=7; //3.2uS @@ -89,7 +89,7 @@ void esp_int_wdt_init() { timer_group_intr_enable(TIMER_GROUP_1, TIMG_WDT_INT_ENA_M); } -void esp_int_wdt_cpu_init() +void esp_int_wdt_cpu_init(void) { esp_register_freertos_tick_hook_for_cpu(tick_hook, xPortGetCoreID()); ESP_INTR_DISABLE(WDT_INT_NUM); diff --git a/components/esp32/intr_alloc.c b/components/esp32/intr_alloc.c index b74c4f929..6256f6a8b 100644 --- a/components/esp32/intr_alloc.c +++ b/components/esp32/intr_alloc.c @@ -854,7 +854,7 @@ esp_err_t IRAM_ATTR esp_intr_disable(intr_handle_t handle) } -void IRAM_ATTR esp_intr_noniram_disable() +void IRAM_ATTR esp_intr_noniram_disable(void) { int oldint; int cpu=xPortGetCoreID(); @@ -873,7 +873,7 @@ void IRAM_ATTR esp_intr_noniram_disable() non_iram_int_disabled[cpu]=oldint&non_iram_int_mask[cpu]; } -void IRAM_ATTR esp_intr_noniram_enable() +void IRAM_ATTR esp_intr_noniram_enable(void) { int cpu=xPortGetCoreID(); int intmask=non_iram_int_disabled[cpu]; diff --git a/components/esp32/panic.c b/components/esp32/panic.c index e7ed6540e..4a104f029 100644 --- a/components/esp32/panic.c +++ b/components/esp32/panic.c @@ -139,7 +139,7 @@ esp_reset_reason_t __attribute__((weak)) esp_reset_reason_get_hint(void) static bool abort_called; -static __attribute__((noreturn)) inline void invoke_abort() +static __attribute__((noreturn)) inline void invoke_abort(void) { abort_called = true; #if CONFIG_ESP32_APPTRACE_ENABLE @@ -158,7 +158,7 @@ static __attribute__((noreturn)) inline void invoke_abort() } } -void abort() +void abort(void) { #if !CONFIG_ESP32_PANIC_SILENT_REBOOT ets_printf("abort() was called at PC 0x%08x on core %d\r\n", (intptr_t)__builtin_return_address(0) - 3, xPortGetCoreID()); @@ -189,12 +189,12 @@ static const char *edesc[] = { #define NUM_EDESCS (sizeof(edesc) / sizeof(char *)) static void commonErrorHandler(XtExcFrame *frame); -static inline void disableAllWdts(); +static inline void disableAllWdts(void); static void illegal_instruction_helper(XtExcFrame *frame); //The fact that we've panic'ed probably means the other CPU is now running wild, possibly //messing up the serial output, so we stall it here. -static void haltOtherCore() +static void haltOtherCore(void) { esp_cpu_stall( xPortGetCoreID() == 0 ? 1 : 0 ); } @@ -399,7 +399,7 @@ static void illegal_instruction_helper(XtExcFrame *frame) all watchdogs except the timer group 0 watchdog, and it reconfigures that to reset the chip after one second. */ -static void reconfigureAllWdts() +static void reconfigureAllWdts(void) { TIMERG0.wdt_wprotect = TIMG_WDT_WKEY_VALUE; TIMERG0.wdt_feed = 1; @@ -419,7 +419,7 @@ static void reconfigureAllWdts() /* This disables all the watchdogs for when we call the gdbstub. */ -static inline void disableAllWdts() +static inline void disableAllWdts(void) { TIMERG0.wdt_wprotect = TIMG_WDT_WKEY_VALUE; TIMERG0.wdt_config0.en = 0; @@ -429,9 +429,9 @@ static inline void disableAllWdts() TIMERG1.wdt_wprotect = 0; } -static void esp_panic_dig_reset() __attribute__((noreturn)); +static void esp_panic_dig_reset(void) __attribute__((noreturn)); -static void esp_panic_dig_reset() +static void esp_panic_dig_reset(void) { // make sure all the panic handler output is sent from UART FIFO uart_tx_wait_idle(CONFIG_ESP_CONSOLE_UART_NUM); diff --git a/components/esp32/pm_esp32.c b/components/esp32/pm_esp32.c index 746a1ca40..f1b29189a 100644 --- a/components/esp32/pm_esp32.c +++ b/components/esp32/pm_esp32.c @@ -145,9 +145,9 @@ static const char* s_mode_names[] = { static const char* TAG = "pm_esp32"; -static void update_ccompare(); +static void update_ccompare(void); static void do_switch(pm_mode_t new_mode); -static void leave_idle(); +static void leave_idle(void); static void on_freq_update(uint32_t old_ticks_per_us, uint32_t ticks_per_us); @@ -246,7 +246,7 @@ esp_err_t esp_pm_configure(const void* vconfig) return ESP_OK; } -static pm_mode_t IRAM_ATTR get_lowest_allowed_mode() +static pm_mode_t IRAM_ATTR get_lowest_allowed_mode(void) { /* TODO: optimize using ffs/clz */ if (s_mode_mask >= BIT(PM_MODE_CPU_MAX)) { @@ -418,7 +418,7 @@ static void IRAM_ATTR do_switch(pm_mode_t new_mode) * would happen without the frequency change. * Assumes that the new_frequency = old_frequency * s_ccount_mul / s_ccount_div. */ -static void IRAM_ATTR update_ccompare() +static void IRAM_ATTR update_ccompare(void) { uint32_t ccount = XTHAL_GET_CCOUNT(); uint32_t ccompare = XTHAL_GET_CCOMPARE(XT_TIMER_INDEX); @@ -432,7 +432,7 @@ static void IRAM_ATTR update_ccompare() } } -static void IRAM_ATTR leave_idle() +static void IRAM_ATTR leave_idle(void) { int core_id = xPortGetCoreID(); if (s_core_idle[core_id]) { @@ -442,7 +442,7 @@ static void IRAM_ATTR leave_idle() } } -void esp_pm_impl_idle_hook() +void esp_pm_impl_idle_hook(void) { int core_id = xPortGetCoreID(); uint32_t state = portENTER_CRITICAL_NESTED(); @@ -454,7 +454,7 @@ void esp_pm_impl_idle_hook() ESP_PM_TRACE_ENTER(IDLE, core_id); } -void IRAM_ATTR esp_pm_impl_isr_hook() +void IRAM_ATTR esp_pm_impl_isr_hook(void) { int core_id = xPortGetCoreID(); ESP_PM_TRACE_ENTER(ISR_HOOK, core_id); @@ -476,7 +476,7 @@ void IRAM_ATTR esp_pm_impl_isr_hook() ESP_PM_TRACE_EXIT(ISR_HOOK, core_id); } -void esp_pm_impl_waiti() +void esp_pm_impl_waiti(void) { #if CONFIG_FREERTOS_USE_TICKLESS_IDLE int core_id = xPortGetCoreID(); @@ -595,7 +595,7 @@ void esp_pm_impl_dump_stats(FILE* out) } #endif // WITH_PROFILING -void esp_pm_impl_init() +void esp_pm_impl_init(void) { #ifdef CONFIG_PM_TRACE esp_pm_trace_init(); diff --git a/components/esp32/pm_trace.c b/components/esp32/pm_trace.c index 02a636211..5cdb666d6 100644 --- a/components/esp32/pm_trace.c +++ b/components/esp32/pm_trace.c @@ -29,7 +29,7 @@ static const int DRAM_ATTR s_trace_io[] = { BIT(27), BIT(27), // ESP_PM_TRACE_SLEEP }; -void esp_pm_trace_init() +void esp_pm_trace_init(void) { for (size_t i = 0; i < sizeof(s_trace_io)/sizeof(s_trace_io[0]); ++i) { int io = __builtin_ffs(s_trace_io[i]); diff --git a/components/esp32/reset_reason.c b/components/esp32/reset_reason.c index 0b291b12c..a0667b6c1 100644 --- a/components/esp32/reset_reason.c +++ b/components/esp32/reset_reason.c @@ -17,7 +17,7 @@ #include "esp_private/system_internal.h" #include "soc/rtc_periph.h" -static void esp_reset_reason_clear_hint(); +static void esp_reset_reason_clear_hint(void); static esp_reset_reason_t s_reset_reason; @@ -119,7 +119,7 @@ esp_reset_reason_t IRAM_ATTR esp_reset_reason_get_hint(void) } return (esp_reset_reason_t) low; } -static void esp_reset_reason_clear_hint() +static void esp_reset_reason_clear_hint(void) { REG_WRITE(RTC_RESET_CAUSE_REG, 0); } diff --git a/components/esp32/sleep_modes.c b/components/esp32/sleep_modes.c index 04179d379..6e6011989 100644 --- a/components/esp32/sleep_modes.c +++ b/components/esp32/sleep_modes.c @@ -89,10 +89,10 @@ static _lock_t lock_rtc_memory_crc; static const char* TAG = "sleep"; -static uint32_t get_power_down_flags(); -static void ext0_wakeup_prepare(); -static void ext1_wakeup_prepare(); -static void timer_wakeup_prepare(); +static uint32_t get_power_down_flags(void); +static void ext0_wakeup_prepare(void); +static void ext1_wakeup_prepare(void); +static void timer_wakeup_prepare(void); /* Wake from deep sleep stub See esp_deepsleep.h esp_wake_deep_sleep() comments for details. @@ -148,14 +148,14 @@ void esp_deep_sleep(uint64_t time_in_us) esp_deep_sleep_start(); } -static void IRAM_ATTR flush_uarts() +static void IRAM_ATTR flush_uarts(void) { for (int i = 0; i < 3; ++i) { uart_tx_wait_idle(i); } } -static void IRAM_ATTR suspend_uarts() +static void IRAM_ATTR suspend_uarts(void) { for (int i = 0; i < 3; ++i) { REG_SET_BIT(UART_FLOW_CONF_REG(i), UART_FORCE_XOFF); @@ -165,7 +165,7 @@ static void IRAM_ATTR suspend_uarts() } } -static void IRAM_ATTR resume_uarts() +static void IRAM_ATTR resume_uarts(void) { for (int i = 0; i < 3; ++i) { REG_CLR_BIT(UART_FLOW_CONF_REG(i), UART_FORCE_XOFF); @@ -222,7 +222,7 @@ static uint32_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags) return result; } -void IRAM_ATTR esp_deep_sleep_start() +void IRAM_ATTR esp_deep_sleep_start(void) { // record current RTC time s_config.rtc_ticks_at_sleep_start = rtc_time_get(); @@ -277,7 +277,7 @@ static esp_err_t esp_light_sleep_inner(uint32_t pd_flags, return err; } -esp_err_t esp_light_sleep_start() +esp_err_t esp_light_sleep_start(void) { static portMUX_TYPE light_sleep_lock = portMUX_INITIALIZER_UNLOCKED; portENTER_CRITICAL(&light_sleep_lock); @@ -399,7 +399,7 @@ esp_err_t esp_sleep_disable_wakeup_source(esp_sleep_source_t source) return ESP_OK; } -esp_err_t esp_sleep_enable_ulp_wakeup() +esp_err_t esp_sleep_enable_ulp_wakeup(void) { #ifdef CONFIG_ESP32_RTC_EXT_CRYST_ADDIT_CURRENT return ESP_ERR_NOT_SUPPORTED; @@ -423,7 +423,7 @@ esp_err_t esp_sleep_enable_timer_wakeup(uint64_t time_in_us) return ESP_OK; } -static void timer_wakeup_prepare() +static void timer_wakeup_prepare(void) { uint32_t period = esp_clk_slowclk_cal_get(); int64_t sleep_duration = (int64_t) s_config.sleep_duration - (int64_t) s_config.sleep_time_adjustment; @@ -435,7 +435,7 @@ static void timer_wakeup_prepare() rtc_sleep_set_wakeup_time(s_config.rtc_ticks_at_sleep_start + rtc_count_delta); } -esp_err_t esp_sleep_enable_touchpad_wakeup() +esp_err_t esp_sleep_enable_touchpad_wakeup(void) { #ifdef CONFIG_ESP32_RTC_EXT_CRYST_ADDIT_CURRENT return ESP_ERR_NOT_SUPPORTED; @@ -448,7 +448,7 @@ esp_err_t esp_sleep_enable_touchpad_wakeup() return ESP_OK; } -touch_pad_t esp_sleep_get_touchpad_wakeup_status() +touch_pad_t esp_sleep_get_touchpad_wakeup_status(void) { if (esp_sleep_get_wakeup_cause() != ESP_SLEEP_WAKEUP_TOUCHPAD) { return TOUCH_PAD_MAX; @@ -477,7 +477,7 @@ esp_err_t esp_sleep_enable_ext0_wakeup(gpio_num_t gpio_num, int level) return ESP_OK; } -static void ext0_wakeup_prepare() +static void ext0_wakeup_prepare(void) { int rtc_gpio_num = s_config.ext0_rtc_gpio_num; // Set GPIO to be used for wakeup @@ -520,7 +520,7 @@ esp_err_t esp_sleep_enable_ext1_wakeup(uint64_t mask, esp_sleep_ext1_wakeup_mode return ESP_OK; } -static void ext1_wakeup_prepare() +static void ext1_wakeup_prepare(void) { // Configure all RTC IOs selected as ext1 wakeup inputs uint32_t rtc_gpio_mask = s_config.ext1_rtc_gpio_mask; @@ -556,7 +556,7 @@ static void ext1_wakeup_prepare() s_config.ext1_trigger_mode, RTC_CNTL_EXT_WAKEUP1_LV_S); } -uint64_t esp_sleep_get_ext1_wakeup_status() +uint64_t esp_sleep_get_ext1_wakeup_status(void) { if (esp_sleep_get_wakeup_cause() != ESP_SLEEP_WAKEUP_EXT1) { return 0; @@ -577,7 +577,7 @@ uint64_t esp_sleep_get_ext1_wakeup_status() return gpio_mask; } -esp_err_t esp_sleep_enable_gpio_wakeup() +esp_err_t esp_sleep_enable_gpio_wakeup(void) { if (s_config.wakeup_triggers & (RTC_TOUCH_TRIG_EN | RTC_ULP_TRIG_EN)) { ESP_LOGE(TAG, "Conflicting wake-up triggers: touch / ULP"); @@ -600,7 +600,7 @@ esp_err_t esp_sleep_enable_uart_wakeup(int uart_num) return ESP_OK; } -esp_sleep_wakeup_cause_t esp_sleep_get_wakeup_cause() +esp_sleep_wakeup_cause_t esp_sleep_get_wakeup_cause(void) { if (rtc_get_reset_reason(0) != DEEPSLEEP_RESET && !s_light_sleep_wakeup) { return ESP_SLEEP_WAKEUP_UNDEFINED; @@ -636,7 +636,7 @@ esp_err_t esp_sleep_pd_config(esp_sleep_pd_domain_t domain, return ESP_OK; } -static uint32_t get_power_down_flags() +static uint32_t get_power_down_flags(void) { // Where needed, convert AUTO options to ON. Later interpret AUTO as OFF. diff --git a/components/esp32/spiram.c b/components/esp32/spiram.c index fc4a9a619..37ae07e2c 100644 --- a/components/esp32/spiram.c +++ b/components/esp32/spiram.c @@ -69,12 +69,12 @@ static bool spiram_inited=false; //If no function in esp_himem.c is used, this function will be linked into the //binary instead of the one in esp_himem.c, automatically making sure no memory //is reserved if no himem function is used. -size_t __attribute__((weak)) esp_himem_reserved_area_size() { +size_t __attribute__((weak)) esp_himem_reserved_area_size(void) { return 0; } -static int spiram_size_usable_for_malloc() +static int spiram_size_usable_for_malloc(void) { int s=esp_spiram_get_size(); if (s>4*1024*1024) s=4*1024*1024; //we can map at most 4MiB @@ -87,7 +87,7 @@ static int spiram_size_usable_for_malloc() true when RAM seems OK, false when test fails. WARNING: Do not run this before the 2nd cpu has been initialized (in a two-core system) or after the heap allocator has taken ownership of the memory. */ -bool esp_spiram_test() +bool esp_spiram_test(void) { volatile int *spiram=(volatile int*)SOC_EXTRAM_DATA_LOW; size_t p; @@ -112,7 +112,7 @@ bool esp_spiram_test() } } -void IRAM_ATTR esp_spiram_init_cache() +void IRAM_ATTR esp_spiram_init_cache(void) { //Enable external RAM in MMU cache_sram_mmu_set( 0, 0, SOC_EXTRAM_DATA_LOW, 0, 32, 128 ); @@ -123,7 +123,7 @@ void IRAM_ATTR esp_spiram_init_cache() #endif } -esp_spiram_size_t esp_spiram_get_chip_size() +esp_spiram_size_t esp_spiram_get_chip_size(void) { if (!spiram_inited) { ESP_EARLY_LOGE(TAG, "SPI RAM not initialized"); @@ -142,7 +142,7 @@ esp_spiram_size_t esp_spiram_get_chip_size() } } -esp_err_t esp_spiram_init() +esp_err_t esp_spiram_init(void) { esp_err_t r; r = psram_enable(PSRAM_SPEED, PSRAM_MODE); @@ -174,7 +174,7 @@ esp_err_t esp_spiram_init() } -esp_err_t esp_spiram_add_to_heapalloc() +esp_err_t esp_spiram_add_to_heapalloc(void) { //Add entire external RAM region to heap allocator. Heap allocator knows the capabilities of this type of memory, so there's //no need to explicitly specify them. @@ -213,7 +213,7 @@ esp_err_t esp_spiram_reserve_dma_pool(size_t size) { return ESP_OK; } -size_t esp_spiram_get_size() +size_t esp_spiram_get_size(void) { psram_size_t size=esp_spiram_get_chip_size(); if (size==PSRAM_SIZE_16MBITS) return 2*1024*1024; @@ -228,7 +228,7 @@ size_t esp_spiram_get_size() Note that this routine assumes some unique mapping for the first 2 banks of the PSRAM memory range, as well as the 2 banks after the 2 MiB mark. */ -void IRAM_ATTR esp_spiram_writeback_cache() +void IRAM_ATTR esp_spiram_writeback_cache(void) { int x; volatile int i=0; @@ -289,7 +289,7 @@ void IRAM_ATTR esp_spiram_writeback_cache() * @return true SPI RAM has been initialized successfully * @return false SPI RAM hasn't been initialized or initialized failed */ -bool esp_spiram_is_initialized() +bool esp_spiram_is_initialized(void) { return spiram_inited; } diff --git a/components/esp32/spiram_psram.c b/components/esp32/spiram_psram.c index ee393618a..1ac19a97d 100644 --- a/components/esp32/spiram_psram.c +++ b/components/esp32/spiram_psram.c @@ -596,7 +596,7 @@ static void IRAM_ATTR psram_gpio_config(psram_io_t *psram_io, psram_cache_mode_t } } -psram_size_t psram_get_size() +psram_size_t psram_get_size(void) { if ((PSRAM_SIZE_ID(s_psram_id) == PSRAM_EID_SIZE_64MBITS) || PSRAM_IS_64MBIT_TRIAL(s_psram_id)) { return PSRAM_SIZE_64MBITS; diff --git a/components/esp32/spiram_psram.h b/components/esp32/spiram_psram.h index 5a5f147bf..14f06cb41 100644 --- a/components/esp32/spiram_psram.h +++ b/components/esp32/spiram_psram.h @@ -53,7 +53,7 @@ typedef enum { * - PSRAM_SIZE_MAX if psram not enabled or not valid * - PSRAM size */ -psram_size_t psram_get_size(); +psram_size_t psram_get_size(void); /** * @brief psram cache enable function diff --git a/components/esp32/system_api.c b/components/esp32/system_api.c index bd81a82db..570c0997a 100644 --- a/components/esp32/system_api.c +++ b/components/esp32/system_api.c @@ -46,7 +46,7 @@ static uint8_t base_mac_addr[6] = { 0 }; #define SHUTDOWN_HANDLERS_NO 2 static shutdown_handler_t shutdown_handlers[SHUTDOWN_HANDLERS_NO]; -void system_init() +void system_init(void) { } @@ -232,7 +232,7 @@ esp_err_t esp_unregister_shutdown_handler(shutdown_handler_t handler) return ESP_ERR_INVALID_STATE; } -void esp_restart_noos() __attribute__ ((noreturn)); +void esp_restart_noos(void) __attribute__ ((noreturn)); void IRAM_ATTR esp_restart(void) { @@ -253,7 +253,7 @@ void IRAM_ATTR esp_restart(void) * core are already stopped. Stalls other core, resets hardware, * triggers restart. */ -void IRAM_ATTR esp_restart_noos() +void IRAM_ATTR esp_restart_noos(void) { // Disable interrupts xt_ints_off(0xFFFFFFFF); diff --git a/components/esp32/task_wdt.c b/components/esp32/task_wdt.c index 86610be94..6675a1a98 100644 --- a/components/esp32/task_wdt.c +++ b/components/esp32/task_wdt.c @@ -104,7 +104,7 @@ static twdt_task_t *find_task_in_twdt_list(TaskHandle_t handle, bool *all_reset) * Resets the hardware timer and has_reset flags of each task on the list. * Called within critical */ -static void reset_hw_timer() +static void reset_hw_timer(void) { //All tasks have reset; time to reset the hardware timer. TIMERG0.wdt_wprotect=TIMG_WDT_WKEY_VALUE; @@ -229,7 +229,7 @@ esp_err_t esp_task_wdt_init(uint32_t timeout, bool panic) return ESP_OK; } -esp_err_t esp_task_wdt_deinit() +esp_err_t esp_task_wdt_deinit(void) { portENTER_CRITICAL(&twdt_spinlock); //TWDT must already be initialized @@ -297,7 +297,7 @@ esp_err_t esp_task_wdt_add(TaskHandle_t handle) return ESP_OK; } -esp_err_t esp_task_wdt_reset() +esp_err_t esp_task_wdt_reset(void) { portENTER_CRITICAL(&twdt_spinlock); //TWDT must already be initialized @@ -385,7 +385,7 @@ esp_err_t esp_task_wdt_status(TaskHandle_t handle) return ESP_ERR_NOT_FOUND; } -void esp_task_wdt_feed() +void esp_task_wdt_feed(void) { portENTER_CRITICAL(&twdt_spinlock); //Return immediately if TWDT has not been initialized diff --git a/components/esp32/test/test_4mpsram.c b/components/esp32/test/test_4mpsram.c index da173a19b..9e8688214 100644 --- a/components/esp32/test/test_4mpsram.c +++ b/components/esp32/test/test_4mpsram.c @@ -7,7 +7,7 @@ static const char TAG[] = "test_psram"; #ifdef CONFIG_ESP32_SPIRAM_SUPPORT -static void test_psram_content() +static void test_psram_content(void) { const int test_size = 2048; uint32_t *test_area = heap_caps_malloc(test_size, MALLOC_CAP_SPIRAM); diff --git a/components/esp32/test/test_ahb_arb.c b/components/esp32/test/test_ahb_arb.c index 185bbb3dd..a4a8f87fd 100644 --- a/components/esp32/test/test_ahb_arb.c +++ b/components/esp32/test/test_ahb_arb.c @@ -31,7 +31,7 @@ to copy bytes over from one memory location to another. DO NOT USE the i2s routi the point where they happened to do what I want. */ -static void lcdIfaceInit() +static void lcdIfaceInit(void) { DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_I2S0_CLK_EN); DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_I2S0_RST); @@ -99,7 +99,7 @@ static void lcdIfaceInit() static volatile lldesc_t dmaDesc[2]; -static void finishDma() +static void finishDma(void) { //No need to finish if no DMA transfer going on if (!(READ_PERI_REG(I2S_FIFO_CONF_REG(0))&I2S_DSCR_EN)) { diff --git a/components/esp32/test/test_esp_timer.c b/components/esp32/test/test_esp_timer.c index e3444503a..52265fb82 100644 --- a/components/esp32/test/test_esp_timer.c +++ b/components/esp32/test/test_esp_timer.c @@ -16,12 +16,12 @@ #define WITH_PROFILING 1 #endif -extern uint32_t esp_timer_impl_get_overflow_val(); +extern uint32_t esp_timer_impl_get_overflow_val(void); extern void esp_timer_impl_set_overflow_val(uint32_t overflow_val); static uint32_t s_old_overflow_val; -static void setup_overflow() +static void setup_overflow(void) { s_old_overflow_val = esp_timer_impl_get_overflow_val(); /* Overflow every 0.1 sec. @@ -31,7 +31,7 @@ static void setup_overflow() esp_timer_impl_set_overflow_val(8000000); } -static void teardown_overflow() +static void teardown_overflow(void) { esp_timer_impl_set_overflow_val(s_old_overflow_val); } @@ -409,7 +409,7 @@ TEST_CASE("esp_timer_get_time call takes less than 1us", "[esp_timer]") TEST_PERFORMANCE_LESS_THAN(ESP_TIMER_GET_TIME_PER_CALL, "%dns", ns_per_call); } -static int64_t IRAM_ATTR __attribute__((noinline)) get_clock_diff() +static int64_t IRAM_ATTR __attribute__((noinline)) get_clock_diff(void) { uint64_t hs_time = esp_timer_get_time(); uint64_t ref_time = ref_clock_get(); diff --git a/components/esp32/test/test_intr_alloc.c b/components/esp32/test/test_intr_alloc.c index 8255388e9..85654c1ae 100644 --- a/components/esp32/test/test_intr_alloc.c +++ b/components/esp32/test/test_intr_alloc.c @@ -144,7 +144,7 @@ void int_timer_handler(void *arg) { int_timer_ctr++; } -void local_timer_test() +void local_timer_test(void) { intr_handle_t ih; esp_err_t r; diff --git a/components/esp32/test/test_pm.c b/components/esp32/test/test_pm.c index cf031ab59..e74a214d7 100644 --- a/components/esp32/test/test_pm.c +++ b/components/esp32/test/test_pm.c @@ -58,7 +58,7 @@ TEST_CASE("Can switch frequency using esp_pm_configure", "[pm]") #if CONFIG_FREERTOS_USE_TICKLESS_IDLE -static void light_sleep_enable() +static void light_sleep_enable(void) { const esp_pm_config_esp32_t pm_config = { .max_cpu_freq = rtc_clk_cpu_freq_get(), @@ -68,7 +68,7 @@ static void light_sleep_enable() ESP_ERROR_CHECK( esp_pm_configure(&pm_config) ); } -static void light_sleep_disable() +static void light_sleep_disable(void) { const esp_pm_config_esp32_t pm_config = { .max_cpu_freq = rtc_clk_cpu_freq_get(), diff --git a/components/esp32/test/test_reset_reason.c b/components/esp32/test/test_reset_reason.c index 78d051358..da03e8c1e 100644 --- a/components/esp32/test/test_reset_reason.c +++ b/components/esp32/test/test_reset_reason.c @@ -24,7 +24,7 @@ static RTC_FAST_ATTR uint32_t s_rtc_force_fast_val; static RTC_SLOW_ATTR uint32_t s_rtc_force_slow_val; -static void setup_values() +static void setup_values(void) { s_noinit_val = CHECK_VALUE; s_rtc_noinit_val = CHECK_VALUE; @@ -44,14 +44,14 @@ TEST_CASE("reset reason ESP_RST_POWERON", "[reset][ignore]") TEST_ASSERT_EQUAL(ESP_RST_POWERON, esp_reset_reason()); } -static void do_deep_sleep() +static void do_deep_sleep(void) { setup_values(); esp_sleep_enable_timer_wakeup(10000); esp_deep_sleep_start(); } -static void check_reset_reason_deep_sleep() +static void check_reset_reason_deep_sleep(void) { TEST_ASSERT_EQUAL(ESP_RST_DEEPSLEEP, esp_reset_reason()); @@ -67,19 +67,19 @@ TEST_CASE_MULTIPLE_STAGES("reset reason ESP_RST_DEEPSLEEP", "[reset_reason][rese do_deep_sleep, check_reset_reason_deep_sleep); -static void do_exception() +static void do_exception(void) { setup_values(); *(int*) (0x40000001) = 0; } -static void do_abort() +static void do_abort(void) { setup_values(); abort(); } -static void check_reset_reason_panic() +static void check_reset_reason_panic(void) { TEST_ASSERT_EQUAL(ESP_RST_PANIC, esp_reset_reason()); @@ -100,14 +100,14 @@ TEST_CASE_MULTIPLE_STAGES("reset reason ESP_RST_PANIC after abort", "[reset_reas do_abort, check_reset_reason_panic); -static void do_restart() +static void do_restart(void) { setup_values(); esp_restart(); } #if portNUM_PROCESSORS > 1 -static void do_restart_from_app_cpu() +static void do_restart_from_app_cpu(void) { setup_values(); xTaskCreatePinnedToCore((TaskFunction_t) &do_restart, "restart", 2048, NULL, 5, NULL, 1); @@ -115,7 +115,7 @@ static void do_restart_from_app_cpu() } #endif -static void check_reset_reason_sw() +static void check_reset_reason_sw(void) { TEST_ASSERT_EQUAL(ESP_RST_SW, esp_reset_reason()); @@ -139,21 +139,21 @@ TEST_CASE_MULTIPLE_STAGES("reset reason ESP_RST_SW after restart from APP CPU", #endif -static void do_int_wdt() +static void do_int_wdt(void) { setup_values(); portENTER_CRITICAL_NESTED(); while(1); } -static void do_int_wdt_hw() +static void do_int_wdt_hw(void) { setup_values(); XTOS_SET_INTLEVEL(XCHAL_NMILEVEL); while(1); } -static void check_reset_reason_int_wdt() +static void check_reset_reason_int_wdt(void) { TEST_ASSERT_EQUAL(ESP_RST_INT_WDT, esp_reset_reason()); TEST_ASSERT_EQUAL_HEX32(CHECK_VALUE, s_rtc_noinit_val); @@ -169,7 +169,7 @@ TEST_CASE_MULTIPLE_STAGES("reset reason ESP_RST_INT_WDT after interrupt watchdog do_int_wdt_hw, check_reset_reason_int_wdt); -static void do_task_wdt() +static void do_task_wdt(void) { setup_values(); esp_task_wdt_init(1, true); @@ -177,7 +177,7 @@ static void do_task_wdt() while(1); } -static void check_reset_reason_task_wdt() +static void check_reset_reason_task_wdt(void) { TEST_ASSERT_EQUAL(ESP_RST_TASK_WDT, esp_reset_reason()); @@ -195,7 +195,7 @@ TEST_CASE_MULTIPLE_STAGES("reset reason ESP_RST_TASK_WDT after task watchdog", do_task_wdt, check_reset_reason_task_wdt); -static void do_rtc_wdt() +static void do_rtc_wdt(void) { setup_values(); WRITE_PERI_REG(RTC_CNTL_WDTWPROTECT_REG, RTC_CNTL_WDT_WKEY_VALUE); @@ -206,7 +206,7 @@ static void do_rtc_wdt() while(1); } -static void check_reset_reason_any_wdt() +static void check_reset_reason_any_wdt(void) { TEST_ASSERT_EQUAL(ESP_RST_WDT, esp_reset_reason()); TEST_ASSERT_EQUAL_HEX32(CHECK_VALUE, s_rtc_noinit_val); @@ -218,14 +218,14 @@ TEST_CASE_MULTIPLE_STAGES("reset reason ESP_RST_WDT after RTC watchdog", check_reset_reason_any_wdt); -static void do_brownout() +static void do_brownout(void) { setup_values(); printf("Manual test: lower the supply voltage to cause brownout\n"); vTaskSuspend(NULL); } -static void check_reset_reason_brownout() +static void check_reset_reason_brownout(void) { TEST_ASSERT_EQUAL(ESP_RST_BROWNOUT, esp_reset_reason()); diff --git a/components/esp32/test/test_sleep.c b/components/esp32/test/test_sleep.c index 8712bdfd0..12e268e35 100644 --- a/components/esp32/test/test_sleep.c +++ b/components/esp32/test/test_sleep.c @@ -29,7 +29,7 @@ static void deep_sleep_task(void *arg) esp_deep_sleep_start(); } -static void do_deep_sleep_from_app_cpu() +static void do_deep_sleep_from_app_cpu(void) { xTaskCreatePinnedToCore(&deep_sleep_task, "ds", 2048, NULL, 5, NULL, 1); @@ -204,20 +204,20 @@ TEST_CASE("enter deep sleep on APP CPU and wake up using timer", "[deepsleep][re } #endif -static void do_deep_sleep() +static void do_deep_sleep(void) { esp_sleep_enable_timer_wakeup(100000); esp_deep_sleep_start(); } -static void check_sleep_reset_and_sleep() +static void check_sleep_reset_and_sleep(void) { TEST_ASSERT_EQUAL(ESP_RST_DEEPSLEEP, esp_reset_reason()); esp_sleep_enable_timer_wakeup(100000); esp_deep_sleep_start(); } -static void check_sleep_reset() +static void check_sleep_reset(void) { TEST_ASSERT_EQUAL(ESP_RST_DEEPSLEEP, esp_reset_reason()); } @@ -228,12 +228,12 @@ TEST_CASE_MULTIPLE_STAGES("enter deep sleep more than once", "[deepsleep][reset= check_sleep_reset_and_sleep, check_sleep_reset); -static void do_abort() +static void do_abort(void) { abort(); } -static void check_abort_reset_and_sleep() +static void check_abort_reset_and_sleep(void) { TEST_ASSERT_EQUAL(ESP_RST_PANIC, esp_reset_reason()); esp_sleep_enable_timer_wakeup(100000); @@ -247,20 +247,20 @@ TEST_CASE_MULTIPLE_STAGES("enter deep sleep after abort", "[deepsleep][reset=abo static RTC_DATA_ATTR uint32_t s_wake_stub_var; -static RTC_IRAM_ATTR void wake_stub() +static RTC_IRAM_ATTR void wake_stub(void) { esp_default_wake_deep_sleep(); s_wake_stub_var = (uint32_t) &wake_stub; } -static void prepare_wake_stub() +static void prepare_wake_stub(void) { esp_set_deep_sleep_wake_stub(&wake_stub); esp_sleep_enable_timer_wakeup(100000); esp_deep_sleep_start(); } -static void check_wake_stub() +static void check_wake_stub(void) { TEST_ASSERT_EQUAL(ESP_RST_DEEPSLEEP, esp_reset_reason()); TEST_ASSERT_EQUAL_HEX32((uint32_t) &wake_stub, s_wake_stub_var); @@ -336,7 +336,7 @@ static float get_time_ms(void) return fabs(dt); } -static uint32_t get_cause() +static uint32_t get_cause(void) { uint32_t wakeup_cause = REG_GET_FIELD(RTC_CNTL_WAKEUP_STATE_REG, \ RTC_CNTL_WAKEUP_CAUSE); diff --git a/components/esp32/test/test_stack_check.c b/components/esp32/test/test_stack_check.c index 0fa6c7bfe..abc36047b 100644 --- a/components/esp32/test/test_stack_check.c +++ b/components/esp32/test/test_stack_check.c @@ -2,7 +2,7 @@ #if CONFIG_COMPILER_STACK_CHECK -static void recur_and_smash() +static void recur_and_smash(void) { static int cnt; volatile uint8_t buf[50]; diff --git a/components/esp_adc_cal/esp_adc_cal.c b/components/esp_adc_cal/esp_adc_cal.c index f71c08637..75146b37c 100644 --- a/components/esp_adc_cal/esp_adc_cal.c +++ b/components/esp_adc_cal/esp_adc_cal.c @@ -110,13 +110,13 @@ static const uint32_t lut_adc2_high[LUT_POINTS] = {2657, 2698, 2738, 2774, 2807, 2971, 2996, 3020, 3043, 3067, 3092, 3116, 3139, 3162, 3185}; /* ----------------------- EFuse Access Functions --------------------------- */ -static bool check_efuse_vref() +static bool check_efuse_vref(void) { //Check if Vref is burned in eFuse return (REG_GET_FIELD(VREF_REG, EFUSE_RD_ADC_VREF) != 0) ? true : false; } -static bool check_efuse_tp() +static bool check_efuse_tp(void) { //Check if Two Point values are burned in eFuse if (CHECK_BLK3_FLAG && (REG_GET_FIELD(BLK3_RESERVED_REG, EFUSE_RD_BLK3_PART_RESERVE) == 0)) { @@ -150,7 +150,7 @@ static inline int decode_bits(uint32_t bits, uint32_t mask, bool is_twos_compl) return ret; } -static uint32_t read_efuse_vref() +static uint32_t read_efuse_vref(void) { //eFuse stores deviation from ideal reference voltage uint32_t ret = VREF_OFFSET; //Ideal vref diff --git a/components/esp_common/include/esp_int_wdt.h b/components/esp_common/include/esp_int_wdt.h index f581d939a..87cc23ec1 100644 --- a/components/esp_common/include/esp_int_wdt.h +++ b/components/esp_common/include/esp_int_wdt.h @@ -43,7 +43,7 @@ This uses the TIMERG1 WDT. * is enabled in menuconfig. * */ -void esp_int_wdt_init(); +void esp_int_wdt_init(void); /** * @brief Enable the interrupt watchdog on the current CPU. This is called @@ -51,7 +51,7 @@ void esp_int_wdt_init(); * in menuconfig. * */ -void esp_int_wdt_cpu_init(); +void esp_int_wdt_cpu_init(void); diff --git a/components/esp_common/include/esp_private/crosscore_int.h b/components/esp_common/include/esp_private/crosscore_int.h index 2f1c5b3be..d0e3cadc1 100644 --- a/components/esp_common/include/esp_private/crosscore_int.h +++ b/components/esp_common/include/esp_private/crosscore_int.h @@ -24,7 +24,7 @@ * called automatically by the startup code and should not * be called manually. */ -void esp_crosscore_int_init(); +void esp_crosscore_int_init(void); /** diff --git a/components/esp_common/include/esp_private/esp_timer_impl.h b/components/esp_common/include/esp_private/esp_timer_impl.h index adc98bc42..bee1d0756 100644 --- a/components/esp_common/include/esp_private/esp_timer_impl.h +++ b/components/esp_common/include/esp_private/esp_timer_impl.h @@ -38,7 +38,7 @@ esp_err_t esp_timer_impl_init(intr_handler_t alarm_handler); /** * @brief Deinitialize platform specific layer of esp_timer */ -void esp_timer_impl_deinit(); +void esp_timer_impl_deinit(void); /** * @brief Set up the timer interrupt to fire at a particular time @@ -73,7 +73,7 @@ void esp_timer_impl_advance(int64_t time_us); * @brief Get time, in microseconds, since esp_timer_impl_init was called * @return timestamp in microseconds */ -uint64_t esp_timer_impl_get_time(); +uint64_t esp_timer_impl_get_time(void); /** * @brief Get minimal timer period, in microseconds @@ -83,7 +83,7 @@ uint64_t esp_timer_impl_get_time(); * callback, preventing other tasks from running. * @return minimal period of periodic timer, in microseconds */ -uint64_t esp_timer_impl_get_min_period_us(); +uint64_t esp_timer_impl_get_min_period_us(void); /** * @brief obtain internal critical section used esp_timer implementation @@ -92,10 +92,10 @@ uint64_t esp_timer_impl_get_min_period_us(); * the calls. Should be treated in the same way as a spinlock. * Call esp_timer_impl_unlock to release the lock */ -void esp_timer_impl_lock(); +void esp_timer_impl_lock(void); /** * @brief counterpart of esp_timer_impl_lock */ -void esp_timer_impl_unlock(); +void esp_timer_impl_unlock(void); diff --git a/components/esp_common/include/esp_private/pm_impl.h b/components/esp_common/include/esp_private/pm_impl.h index 134e874e5..f0cf914f7 100644 --- a/components/esp_common/include/esp_private/pm_impl.h +++ b/components/esp_common/include/esp_private/pm_impl.h @@ -80,19 +80,19 @@ void esp_pm_impl_switch_mode(pm_mode_t mode, pm_mode_switch_t lock_or_unlock, pm /** * @brief Call once at startup to initialize pm implementation */ -void esp_pm_impl_init(); +void esp_pm_impl_init(void); /** * @brief Hook function for the idle task * Must be called from the IDLE task on each CPU before entering waiti state. */ -void esp_pm_impl_idle_hook(); +void esp_pm_impl_idle_hook(void); /** * @brief Hook function for the interrupt dispatcher * Must be called soon after entering the ISR */ -void esp_pm_impl_isr_hook(); +void esp_pm_impl_isr_hook(void); /** * @brief Dump the information about time spent in each of the pm modes. @@ -107,14 +107,14 @@ void esp_pm_impl_dump_stats(FILE* out); /** * @brief Hook function implementing `waiti` instruction, should be invoked from idle task context */ -void esp_pm_impl_waiti(); +void esp_pm_impl_waiti(void); #ifdef CONFIG_PM_PROFILING #define WITH_PROFILING #endif #ifdef WITH_PROFILING -static inline pm_time_t IRAM_ATTR pm_get_time() +static inline pm_time_t IRAM_ATTR pm_get_time(void) { return esp_timer_get_time(); } diff --git a/components/esp_common/include/esp_private/pm_trace.h b/components/esp_common/include/esp_private/pm_trace.h index d1cf7e336..24e671907 100644 --- a/components/esp_common/include/esp_private/pm_trace.h +++ b/components/esp_common/include/esp_private/pm_trace.h @@ -26,7 +26,7 @@ typedef enum { ESP_PM_TRACE_TYPE_MAX } esp_pm_trace_event_t; -void esp_pm_trace_init(); +void esp_pm_trace_init(void); void esp_pm_trace_enter(esp_pm_trace_event_t event, int core_id); void esp_pm_trace_exit(esp_pm_trace_event_t event, int core_id); diff --git a/components/esp_common/include/esp_private/system_internal.h b/components/esp_common/include/esp_private/system_internal.h index 5bda73fb7..e0d95d2f7 100644 --- a/components/esp_common/include/esp_private/system_internal.h +++ b/components/esp_common/include/esp_private/system_internal.h @@ -29,7 +29,7 @@ extern "C" { * This is an internal function called by esp_restart. It is called directly * by the panic handler and brownout detector interrupt. */ -void esp_restart_noos() __attribute__ ((noreturn)); +void esp_restart_noos(void) __attribute__ ((noreturn)); /** * @brief Internal function to set reset reason hint diff --git a/components/esp_common/include/esp_task_wdt.h b/components/esp_common/include/esp_task_wdt.h index 60b0e5e5c..554aa3497 100644 --- a/components/esp_common/include/esp_task_wdt.h +++ b/components/esp_common/include/esp_task_wdt.h @@ -56,7 +56,7 @@ esp_err_t esp_task_wdt_init(uint32_t timeout, bool panic); * - ESP_ERR_INVALID_STATE: Error, tasks are still subscribed to the TWDT * - ESP_ERR_NOT_FOUND: Error, TWDT has already been deinitialized */ -esp_err_t esp_task_wdt_deinit(); +esp_err_t esp_task_wdt_deinit(void); /** * @brief Subscribe a task to the Task Watchdog Timer (TWDT) @@ -102,7 +102,7 @@ esp_err_t esp_task_wdt_add(TaskHandle_t handle); * to the TWDT * - ESP_ERR_INVALID_STATE: Error, the TWDT has not been initialized yet */ -esp_err_t esp_task_wdt_reset(); +esp_err_t esp_task_wdt_reset(void); /** * @brief Unsubscribes a task from the Task Watchdog Timer (TWDT) @@ -155,7 +155,7 @@ esp_err_t esp_task_wdt_status(TaskHandle_t handle); * function, then proceed to reset the TWDT on subsequent calls of this * function. */ -void esp_task_wdt_feed() __attribute__ ((deprecated)); +void esp_task_wdt_feed(void) __attribute__ ((deprecated)); #ifdef __cplusplus diff --git a/components/esp_common/include/esp_timer.h b/components/esp_common/include/esp_timer.h index ff5c13ab4..769c9fe29 100644 --- a/components/esp_common/include/esp_timer.h +++ b/components/esp_common/include/esp_timer.h @@ -95,7 +95,7 @@ typedef struct { * - ESP_ERR_INVALID_STATE if already initialized * - other errors from interrupt allocator */ -esp_err_t esp_timer_init(); +esp_err_t esp_timer_init(void); /** * @brief De-initialize esp_timer library @@ -106,7 +106,7 @@ esp_err_t esp_timer_init(); * - ESP_OK on success * - ESP_ERR_INVALID_STATE if not yet initialized */ -esp_err_t esp_timer_deinit(); +esp_err_t esp_timer_deinit(void); /** * @brief Create an esp_timer instance @@ -187,14 +187,14 @@ esp_err_t esp_timer_delete(esp_timer_handle_t timer); * @return number of microseconds since esp_timer_init was called (this normally * happens early during application startup). */ -int64_t esp_timer_get_time(); +int64_t esp_timer_get_time(void); /** * @brief Get the timestamp when the next timeout is expected to occur * @return Timestamp of the nearest timer event, in microseconds. * The timebase is the same as for the values returned by esp_timer_get_time. */ -int64_t esp_timer_get_next_alarm(); +int64_t esp_timer_get_next_alarm(void); /** * @brief Dump the list of timers to a stream diff --git a/components/esp_common/src/dbg_stubs.c b/components/esp_common/src/dbg_stubs.c index 3def85c3f..e0389ce1d 100644 --- a/components/esp_common/src/dbg_stubs.c +++ b/components/esp_common/src/dbg_stubs.c @@ -69,7 +69,7 @@ static void esp_dbg_stubs_data_free(void *addr) ESP_LOGV(TAG, "%s EXIT %p", __func__, addr); } -void esp_dbg_stubs_init() +void esp_dbg_stubs_init(void) { s_dbg_stubs_ctl_data.tramp_addr = (uint32_t)s_stub_code_buf; s_dbg_stubs_ctl_data.min_stack_addr = (uint32_t)s_stub_min_stack; diff --git a/components/esp_common/src/esp_timer.c b/components/esp_common/src/esp_timer.c index 82a2d0b85..034f77fcc 100644 --- a/components/esp_common/src/esp_timer.c +++ b/components/esp_common/src/esp_timer.c @@ -60,12 +60,12 @@ struct esp_timer { LIST_ENTRY(esp_timer) list_entry; }; -static bool is_initialized(); +static bool is_initialized(void); static esp_err_t timer_insert(esp_timer_handle_t timer); static esp_err_t timer_remove(esp_timer_handle_t timer); static bool timer_armed(esp_timer_handle_t timer); -static void timer_list_lock(); -static void timer_list_unlock(); +static void timer_list_lock(void); +static void timer_list_unlock(void); #if WITH_PROFILING static void timer_insert_inactive(esp_timer_handle_t timer); @@ -247,12 +247,12 @@ static IRAM_ATTR bool timer_armed(esp_timer_handle_t timer) return timer->alarm > 0; } -static IRAM_ATTR void timer_list_lock() +static IRAM_ATTR void timer_list_lock(void) { portENTER_CRITICAL(&s_timer_lock); } -static IRAM_ATTR void timer_list_unlock() +static IRAM_ATTR void timer_list_unlock(void) { portEXIT_CRITICAL(&s_timer_lock); } @@ -323,7 +323,7 @@ static void IRAM_ATTR timer_alarm_handler(void* arg) } } -static IRAM_ATTR bool is_initialized() +static IRAM_ATTR bool is_initialized(void) { return s_timer_task != NULL; } @@ -474,7 +474,7 @@ esp_err_t esp_timer_dump(FILE* stream) return ESP_OK; } -int64_t IRAM_ATTR esp_timer_get_next_alarm() +int64_t IRAM_ATTR esp_timer_get_next_alarm(void) { int64_t next_alarm = INT64_MAX; timer_list_lock(); @@ -486,7 +486,7 @@ int64_t IRAM_ATTR esp_timer_get_next_alarm() return next_alarm; } -int64_t IRAM_ATTR esp_timer_get_time() +int64_t IRAM_ATTR esp_timer_get_time(void) { return (int64_t) esp_timer_impl_get_time(); } diff --git a/components/esp_common/src/freertos_hooks.c b/components/esp_common/src/freertos_hooks.c index d60411dc7..58c42b854 100644 --- a/components/esp_common/src/freertos_hooks.c +++ b/components/esp_common/src/freertos_hooks.c @@ -32,7 +32,7 @@ static portMUX_TYPE hooks_spinlock = portMUX_INITIALIZER_UNLOCKED; static esp_freertos_idle_cb_t idle_cb[portNUM_PROCESSORS][MAX_HOOKS]={0}; static esp_freertos_tick_cb_t tick_cb[portNUM_PROCESSORS][MAX_HOOKS]={0}; -void IRAM_ATTR esp_vApplicationTickHook() +void IRAM_ATTR esp_vApplicationTickHook(void) { int n; int core = xPortGetCoreID(); @@ -43,7 +43,7 @@ void IRAM_ATTR esp_vApplicationTickHook() } } -void esp_vApplicationIdleHook() +void esp_vApplicationIdleHook(void) { bool can_go_idle=true; int core = xPortGetCoreID(); diff --git a/components/esp_common/src/ipc.c b/components/esp_common/src/ipc.c index 927db9087..c68a48851 100644 --- a/components/esp_common/src/ipc.c +++ b/components/esp_common/src/ipc.c @@ -82,9 +82,9 @@ static void IRAM_ATTR ipc_task(void* arg) * woken up to execute the callback provided to esp_ipc_call_nonblocking or * esp_ipc_call_blocking. */ -static void esp_ipc_init() __attribute__((constructor)); +static void esp_ipc_init(void) __attribute__((constructor)); -static void esp_ipc_init() +static void esp_ipc_init(void) { s_ipc_mutex = xSemaphoreCreateMutex(); s_ipc_ack = xSemaphoreCreateBinary(); diff --git a/components/esp_event/default_event_loop.c b/components/esp_event/default_event_loop.c index 01418c72a..9b5b8e8b6 100644 --- a/components/esp_event/default_event_loop.c +++ b/components/esp_event/default_event_loop.c @@ -70,7 +70,7 @@ esp_err_t esp_event_isr_post(esp_event_base_t event_base, int32_t event_id, #endif -esp_err_t esp_event_loop_create_default() +esp_err_t esp_event_loop_create_default(void) { if (s_default_loop) { return ESP_ERR_INVALID_STATE; @@ -94,7 +94,7 @@ esp_err_t esp_event_loop_create_default() return ESP_OK; } -esp_err_t esp_event_loop_delete_default() +esp_err_t esp_event_loop_delete_default(void) { if (!s_default_loop) { return ESP_ERR_INVALID_STATE; diff --git a/components/esp_event/esp_event.c b/components/esp_event/esp_event.c index 99a3cf70b..557cfba0d 100644 --- a/components/esp_event/esp_event.c +++ b/components/esp_event/esp_event.c @@ -60,7 +60,7 @@ static portMUX_TYPE s_event_loops_spinlock = portMUX_INITIALIZER_UNLOCKED; #ifdef CONFIG_ESP_EVENT_LOOP_PROFILING -static int esp_event_dump_prepare() +static int esp_event_dump_prepare(void) { esp_event_loop_instance_t* loop_it; esp_event_loop_node_t *loop_node_it; diff --git a/components/esp_event/event_loop_legacy.c b/components/esp_event/event_loop_legacy.c index f5e737d20..3b80387bf 100644 --- a/components/esp_event/event_loop_legacy.c +++ b/components/esp_event/event_loop_legacy.c @@ -76,7 +76,7 @@ esp_err_t esp_event_loop_init(system_event_cb_t cb, void *ctx) return ESP_OK; } -esp_err_t esp_event_loop_deinit() +esp_err_t esp_event_loop_deinit(void) { if (!s_initialized) { ESP_LOGE(TAG, "system event loop not initialized"); diff --git a/components/esp_event/include/esp_event.h b/components/esp_event/include/esp_event.h index c78636415..8282122a0 100644 --- a/components/esp_event/include/esp_event.h +++ b/components/esp_event/include/esp_event.h @@ -74,7 +74,7 @@ esp_err_t esp_event_loop_delete(esp_event_loop_handle_t event_loop); * - ESP_FAIL: Failed to create task loop * - Others: Fail */ -esp_err_t esp_event_loop_create_default(); +esp_err_t esp_event_loop_create_default(void); /** * @brief Delete the default event loop @@ -83,7 +83,7 @@ esp_err_t esp_event_loop_create_default(); * - ESP_OK: Success * - Others: Fail */ -esp_err_t esp_event_loop_delete_default(); +esp_err_t esp_event_loop_delete_default(void); /** * @brief Dispatch events posted to an event loop. diff --git a/components/esp_event/include/esp_event_legacy.h b/components/esp_event/include/esp_event_legacy.h index 44e95546a..9509ce6a7 100644 --- a/components/esp_event/include/esp_event_legacy.h +++ b/components/esp_event/include/esp_event_legacy.h @@ -160,14 +160,14 @@ esp_err_t esp_event_process_default(system_event_t *event); * @note This API is part of the legacy event system. New code should use event library API in esp_event.h * */ -void esp_event_set_default_eth_handlers(); +void esp_event_set_default_eth_handlers(void); /** * @brief Install default event handlers for Wi-Fi interfaces (station and AP) * * @note This API is part of the legacy event system. New code should use event library API in esp_event.h */ -void esp_event_set_default_wifi_handlers(); +void esp_event_set_default_wifi_handlers(void); /** * @brief Application specified event callback function diff --git a/components/esp_event/private_include/esp_event_private.h b/components/esp_event/private_include/esp_event_private.h index 990d51872..d96f66e2d 100644 --- a/components/esp_event/private_include/esp_event_private.h +++ b/components/esp_event/private_include/esp_event_private.h @@ -45,7 +45,7 @@ bool esp_event_is_handler_registered(esp_event_loop_handle_t event_loop, esp_eve * - ESP_OK: Success * - Others: Fail */ -esp_err_t esp_event_loop_deinit(); +esp_err_t esp_event_loop_deinit(void); #ifdef __cplusplus } // extern "C" diff --git a/components/esp_event/test/test_event.c b/components/esp_event/test/test_event.c index 0efc2d492..6560bdc5f 100644 --- a/components/esp_event/test/test_event.c +++ b/components/esp_event/test/test_event.c @@ -103,7 +103,7 @@ enum { TEST_EVENT_BASE2_MAX }; -static BaseType_t test_event_get_core() +static BaseType_t test_event_get_core(void) { static int calls = 0; @@ -114,7 +114,7 @@ static BaseType_t test_event_get_core() } } -static esp_event_loop_args_t test_event_get_default_loop_args() +static esp_event_loop_args_t test_event_get_default_loop_args(void) { esp_event_loop_args_t loop_config = { .queue_size = CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE, @@ -263,13 +263,13 @@ static void test_post_from_handler_loop_task(void* args) } } -static void test_setup() +static void test_setup(void) { TEST_ASSERT_TRUE(TEST_CONFIG_TASKS_TO_SPAWN >= 2); TEST_ASSERT_EQUAL(ESP_OK, esp_event_loop_create_default()); } -static void test_teardown() +static void test_teardown(void) { TEST_ASSERT_EQUAL(ESP_OK, esp_event_loop_delete_default()); } diff --git a/components/esp_gdbstub/esp32/gdbstub_esp32.c b/components/esp_gdbstub/esp32/gdbstub_esp32.c index 3fe393a0d..98a6454ac 100644 --- a/components/esp_gdbstub/esp32/gdbstub_esp32.c +++ b/components/esp_gdbstub/esp32/gdbstub_esp32.c @@ -19,11 +19,11 @@ #define UART_NUM CONFIG_CONSOLE_UART_NUM -void esp_gdbstub_target_init() +void esp_gdbstub_target_init(void) { } -int esp_gdbstub_getchar() +int esp_gdbstub_getchar(void) { while (REG_GET_FIELD(UART_STATUS_REG(UART_NUM), UART_RXFIFO_CNT) == 0) { ; diff --git a/components/esp_gdbstub/private_include/esp_gdbstub_common.h b/components/esp_gdbstub/private_include/esp_gdbstub_common.h index 75674ff02..43c35dcab 100644 --- a/components/esp_gdbstub/private_include/esp_gdbstub_common.h +++ b/components/esp_gdbstub/private_include/esp_gdbstub_common.h @@ -98,13 +98,13 @@ void esp_gdbstub_tcb_to_regfile(TaskHandle_t tcb, esp_gdbstub_gdb_regfile_t *dst * Do target-specific initialization before gdbstub can start communicating. * This may involve, for example, configuring the UART. */ -void esp_gdbstub_target_init(); +void esp_gdbstub_target_init(void); /** * Receive a byte from the GDB client. Blocks until a byte is available. * @return received byte */ -int esp_gdbstub_getchar(); +int esp_gdbstub_getchar(void); /** * Send a byte to the GDB client @@ -123,7 +123,7 @@ int esp_gdbstub_readmem(intptr_t addr); /**** GDB packet related functions ****/ /** Begin a packet */ -void esp_gdbstub_send_start(); +void esp_gdbstub_send_start(void); /** Send a character as part of the packet */ void esp_gdbstub_send_char(char c); @@ -135,7 +135,7 @@ void esp_gdbstub_send_str(const char *s); void esp_gdbstub_send_hex(int val, int bits); /** Finish sending the packet */ -void esp_gdbstub_send_end(); +void esp_gdbstub_send_end(void); /** Send a packet with a string as content */ void esp_gdbstub_send_str_packet(const char* str); diff --git a/components/esp_gdbstub/src/gdbstub.c b/components/esp_gdbstub/src/gdbstub.c index 4d1f4cf54..fbb3d26bf 100644 --- a/components/esp_gdbstub/src/gdbstub.c +++ b/components/esp_gdbstub/src/gdbstub.c @@ -19,12 +19,12 @@ #ifdef CONFIG_ESP_GDBSTUB_SUPPORT_TASKS -static void init_task_info(); -static void find_paniced_task_index(); +static void init_task_info(void); +static void find_paniced_task_index(void); static int handle_task_commands(unsigned char *cmd, int len); #endif -static void send_reason(); +static void send_reason(void); static esp_gdbstub_scratch_t s_scratch; @@ -77,7 +77,7 @@ void esp_gdbstub_panic_handler(esp_gdbstub_frame_t *frame) } -static void send_reason() +static void send_reason(void) { esp_gdbstub_send_start(); esp_gdbstub_send_char('T'); @@ -162,7 +162,7 @@ int esp_gdbstub_handle_command(unsigned char *cmd, int len) #ifdef CONFIG_ESP_GDBSTUB_SUPPORT_TASKS -static void init_task_info() +static void init_task_info(void) { unsigned tcb_size; s_scratch.task_count = uxTaskGetSnapshotAll(s_scratch.tasks, GDBSTUB_TASKS_NUM, &tcb_size); @@ -178,7 +178,7 @@ static bool get_task_handle(size_t index, TaskHandle_t *handle) } /** Get the index of the task running on the current CPU, and save the result */ -static void find_paniced_task_index() +static void find_paniced_task_index(void) { TaskHandle_t cur_handle = xTaskGetCurrentTaskHandleForCPU(xPortGetCoreID()); TaskHandle_t handle; diff --git a/components/esp_gdbstub/src/packet.c b/components/esp_gdbstub/src/packet.c index 9bf0c5d5a..39e0c6883 100644 --- a/components/esp_gdbstub/src/packet.c +++ b/components/esp_gdbstub/src/packet.c @@ -21,7 +21,7 @@ static unsigned char s_cmd[GDBSTUB_CMD_BUFLEN]; static char s_chsum; // Send the start of a packet; reset checksum calculation. -void esp_gdbstub_send_start() +void esp_gdbstub_send_start(void) { s_chsum = 0; esp_gdbstub_putchar('$'); @@ -60,7 +60,7 @@ void esp_gdbstub_send_hex(int val, int bits) } // Finish sending a packet. -void esp_gdbstub_send_end() +void esp_gdbstub_send_end(void) { esp_gdbstub_putchar('#'); esp_gdbstub_send_hex(s_chsum, 8); diff --git a/components/esp_http_client/lib/http_header.c b/components/esp_http_client/lib/http_header.c index b771f6f6e..65d7aa0de 100644 --- a/components/esp_http_client/lib/http_header.c +++ b/components/esp_http_client/lib/http_header.c @@ -37,7 +37,7 @@ typedef struct http_header_item { STAILQ_HEAD(http_header, http_header_item); -http_header_handle_t http_header_init() +http_header_handle_t http_header_init(void) { http_header_handle_t header = calloc(1, sizeof(struct http_header)); HTTP_MEM_CHECK(TAG, header, return NULL); diff --git a/components/esp_http_client/lib/include/http_header.h b/components/esp_http_client/lib/include/http_header.h index 0a1537222..9d8ea3ad8 100644 --- a/components/esp_http_client/lib/include/http_header.h +++ b/components/esp_http_client/lib/include/http_header.h @@ -32,7 +32,7 @@ typedef struct http_header_item *http_header_item_handle_t; * - http_header_handle_t * - NULL if any errors */ -http_header_handle_t http_header_init(); +http_header_handle_t http_header_init(void); /** * @brief Cleanup and free all http header pairs diff --git a/components/esp_http_server/src/httpd_sess.c b/components/esp_http_server/src/httpd_sess.c index c56c22efa..8109475b4 100644 --- a/components/esp_http_server/src/httpd_sess.c +++ b/components/esp_http_server/src/httpd_sess.c @@ -199,7 +199,7 @@ static int fd_is_valid(int fd) return fcntl(fd, F_GETFD) != -1 || errno != EBADF; } -static inline uint64_t httpd_sess_get_lru_counter() +static inline uint64_t httpd_sess_get_lru_counter(void) { static uint64_t lru_counter = 0; return lru_counter++; diff --git a/components/esp_http_server/src/port/esp32/osal.h b/components/esp_http_server/src/port/esp32/osal.h index 84dfb8c27..f59c2bd31 100644 --- a/components/esp_http_server/src/port/esp32/osal.h +++ b/components/esp_http_server/src/port/esp32/osal.h @@ -43,7 +43,7 @@ static inline int httpd_os_thread_create(othread_t *thread, } /* Only self delete is supported */ -static inline void httpd_os_thread_delete() +static inline void httpd_os_thread_delete(void) { vTaskDelete(xTaskGetCurrentTaskHandle()); } @@ -53,7 +53,7 @@ static inline void httpd_os_thread_sleep(int msecs) vTaskDelay(msecs / portTICK_RATE_MS); } -static inline othread_t httpd_os_thread_handle() +static inline othread_t httpd_os_thread_handle(void) { return xTaskGetCurrentTaskHandle(); } diff --git a/components/esp_local_ctrl/include/esp_local_ctrl.h b/components/esp_local_ctrl/include/esp_local_ctrl.h index 53d062b10..9f4f89daa 100644 --- a/components/esp_local_ctrl/include/esp_local_ctrl.h +++ b/components/esp_local_ctrl/include/esp_local_ctrl.h @@ -183,12 +183,12 @@ typedef struct esp_local_ctrl_transport esp_local_ctrl_transport_t; /** * @brief Function for obtaining BLE transport mode */ -const esp_local_ctrl_transport_t *esp_local_ctrl_get_transport_ble(); +const esp_local_ctrl_transport_t *esp_local_ctrl_get_transport_ble(void); /** * @brief Function for obtaining HTTPD transport mode */ -const esp_local_ctrl_transport_t *esp_local_ctrl_get_transport_httpd(); +const esp_local_ctrl_transport_t *esp_local_ctrl_get_transport_httpd(void); #define ESP_LOCAL_CTRL_TRANSPORT_BLE esp_local_ctrl_get_transport_ble() #define ESP_LOCAL_CTRL_TRANSPORT_HTTPD esp_local_ctrl_get_transport_httpd() diff --git a/components/esp_ringbuf/test/test_ringbuf.c b/components/esp_ringbuf/test/test_ringbuf.c index 376b119a7..62ca3c9b1 100644 --- a/components/esp_ringbuf/test/test_ringbuf.c +++ b/components/esp_ringbuf/test/test_ringbuf.c @@ -395,7 +395,7 @@ static void ringbuffer_isr(void *arg) } } -static void setup_timer() +static void setup_timer(void) { //Setup timer for ISR int timer_group = TIMER_GROUP; @@ -416,7 +416,7 @@ static void setup_timer() timer_isr_register(timer_group, timer_idx, ringbuffer_isr, NULL, 0, &ringbuffer_isr_handle); //Set ISR handler } -static void cleanup_timer() +static void cleanup_timer(void) { timer_disable_intr(TIMER_GROUP, TIMER_NUMBER); esp_intr_free(ringbuffer_isr_handle); @@ -570,7 +570,7 @@ static void rec_task(void *args) vTaskDelete(NULL); } -static void setup() +static void setup(void) { ets_printf("Size of test data: %d\n", CONT_DATA_LEN); tx_done = xSemaphoreCreateBinary(); //Semaphore to indicate send is done for a particular iteration @@ -579,7 +579,7 @@ static void setup() srand(SRAND_SEED); //Seed RNG } -static void cleanup() +static void cleanup(void) { //Cleanup vSemaphoreDelete(tx_done); @@ -669,7 +669,7 @@ TEST_CASE("Test static ring buffer SMP", "[esp_ringbuf]") /* -------------------------- Test ring buffer IRAM ------------------------- */ -static IRAM_ATTR __attribute__((noinline)) bool iram_ringbuf_test() +static IRAM_ATTR __attribute__((noinline)) bool iram_ringbuf_test(void) { bool result = true; diff --git a/components/esp_rom/include/esp32/rom/tbconsole.h b/components/esp_rom/include/esp32/rom/tbconsole.h index 891c2732a..d6ca069cc 100644 --- a/components/esp_rom/include/esp32/rom/tbconsole.h +++ b/components/esp_rom/include/esp32/rom/tbconsole.h @@ -18,7 +18,7 @@ extern "C" { #endif -void start_tb_console(); +void start_tb_console(void); #ifdef __cplusplus } diff --git a/components/esp_websocket_client/esp_websocket_client.c b/components/esp_websocket_client/esp_websocket_client.c index a066c288c..cc77267d0 100644 --- a/components/esp_websocket_client/esp_websocket_client.c +++ b/components/esp_websocket_client/esp_websocket_client.c @@ -92,7 +92,7 @@ struct esp_websocket_client { int buffer_size; }; -static uint64_t _tick_get_ms() +static uint64_t _tick_get_ms(void) { return esp_timer_get_time()/1000; } diff --git a/components/esp_wifi/include/esp_phy_init.h b/components/esp_wifi/include/esp_phy_init.h index 6783ff54b..7f06bcb2e 100644 --- a/components/esp_wifi/include/esp_phy_init.h +++ b/components/esp_wifi/include/esp_phy_init.h @@ -103,7 +103,7 @@ typedef enum{ * * @return pointer to PHY init data structure */ -const esp_phy_init_data_t* esp_phy_get_init_data(); +const esp_phy_init_data_t* esp_phy_get_init_data(void); /** * @brief Release PHY init data diff --git a/components/esp_wifi/include/phy.h b/components/esp_wifi/include/phy.h index 37066d00f..1ee3f37dc 100644 --- a/components/esp_wifi/include/phy.h +++ b/components/esp_wifi/include/phy.h @@ -44,7 +44,7 @@ int register_chipv7_phy(const esp_phy_init_data_t* init_data, esp_phy_calibratio * @brief Get the format version of calibration data used by PHY library. * @return Format version number, OR'ed with BIT(16) if PHY is in WIFI only mode. */ -uint32_t phy_get_rf_cal_version(); +uint32_t phy_get_rf_cal_version(void); /** * @brief Set RF/BB for only WIFI mode or coexist(WIFI & BT) mode diff --git a/components/esp_wifi/src/phy_init.c b/components/esp_wifi/src/phy_init.c index b36b5754f..ae8da2f5d 100644 --- a/components/esp_wifi/src/phy_init.c +++ b/components/esp_wifi/src/phy_init.c @@ -376,7 +376,7 @@ esp_err_t esp_modem_sleep_deregister(modem_sleep_module_t module) #if CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION #include "esp_partition.h" -const esp_phy_init_data_t* esp_phy_get_init_data() +const esp_phy_init_data_t* esp_phy_get_init_data(void) { const esp_partition_t* partition = esp_partition_find_first( ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_PHY, NULL); @@ -416,7 +416,7 @@ void esp_phy_release_init_data(const esp_phy_init_data_t* init_data) // phy_init_data.h will declare static 'phy_init_data' variable initialized with default init data -const esp_phy_init_data_t* esp_phy_get_init_data() +const esp_phy_init_data_t* esp_phy_get_init_data(void) { ESP_LOGD(TAG, "loading PHY init data from application binary"); return &phy_init_data; diff --git a/components/esp_wifi/src/wifi_init.c b/components/esp_wifi/src/wifi_init.c index 6564acc90..5082a77e4 100644 --- a/components/esp_wifi/src/wifi_init.c +++ b/components/esp_wifi/src/wifi_init.c @@ -39,7 +39,7 @@ wifi_mac_time_update_cb_t s_wifi_mac_time_update_cb = NULL; static const char* TAG = "wifi_init"; -static void __attribute__((constructor)) s_set_default_wifi_log_level() +static void __attribute__((constructor)) s_set_default_wifi_log_level(void) { /* WiFi libraries aren't compiled to know CONFIG_LOG_DEFAULT_LEVEL, so set it at runtime startup. Done here not in esp_wifi_init() to allow @@ -49,7 +49,7 @@ static void __attribute__((constructor)) s_set_default_wifi_log_level() esp_log_level_set("mesh", CONFIG_LOG_DEFAULT_LEVEL); } -static void esp_wifi_set_debug_log() +static void esp_wifi_set_debug_log(void) { /* set WiFi log level and module */ #if CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE diff --git a/components/esp_wifi/test/test_phy_rtc.c b/components/esp_wifi/test/test_phy_rtc.c index 950659924..133a62c35 100644 --- a/components/esp_wifi/test/test_phy_rtc.c +++ b/components/esp_wifi/test/test_phy_rtc.c @@ -15,8 +15,8 @@ //Function just extern, need not test extern void bt_bb_init_cmplx(void); -extern void IRAM_ATTR spi_flash_disable_interrupts_caches_and_other_cpu(); -extern void IRAM_ATTR spi_flash_enable_interrupts_caches_and_other_cpu(); +extern void IRAM_ATTR spi_flash_disable_interrupts_caches_and_other_cpu(void); +extern void IRAM_ATTR spi_flash_enable_interrupts_caches_and_other_cpu(void); //Functions in librtc.a called by WIFI or Blutooth directly in ISR extern void bt_bb_init_cmplx_reg(void); diff --git a/components/espcoredump/include/esp_core_dump.h b/components/espcoredump/include/esp_core_dump.h index e19b45c98..0e8020086 100644 --- a/components/espcoredump/include/esp_core_dump.h +++ b/components/espcoredump/include/esp_core_dump.h @@ -27,7 +27,7 @@ * * @note Should be called at system startup. */ -void esp_core_dump_init(); +void esp_core_dump_init(void); /** * @brief Saves core dump to flash. diff --git a/components/espcoredump/include_core_dump/esp_core_dump_priv.h b/components/espcoredump/include_core_dump/esp_core_dump_priv.h index a13dd1707..59568e004 100644 --- a/components/espcoredump/include_core_dump/esp_core_dump_priv.h +++ b/components/espcoredump/include_core_dump/esp_core_dump_priv.h @@ -82,7 +82,7 @@ typedef struct _core_dump_task_header_t #if CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH // Core dump flash init function -void esp_core_dump_flash_init(); +void esp_core_dump_flash_init(void); #endif diff --git a/components/espcoredump/src/core_dump_common.c b/components/espcoredump/src/core_dump_common.c index bbd3e29ce..056f3417b 100644 --- a/components/espcoredump/src/core_dump_common.c +++ b/components/espcoredump/src/core_dump_common.c @@ -153,7 +153,7 @@ inline void esp_core_dump_write(void *frame, core_dump_write_config_t *write_cfg #endif -void esp_core_dump_init() +void esp_core_dump_init(void) { #if CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH esp_core_dump_flash_init(); diff --git a/components/espcoredump/src/core_dump_flash.c b/components/espcoredump/src/core_dump_flash.c index dd48d5ba8..9c2ac7876 100644 --- a/components/espcoredump/src/core_dump_flash.c +++ b/components/espcoredump/src/core_dump_flash.c @@ -50,7 +50,7 @@ static inline core_dump_crc_t esp_core_dump_calc_flash_config_crc(void) return crc32_le(0, (uint8_t const *)&s_core_flash_config.partition, sizeof(s_core_flash_config.partition)); } -void esp_core_dump_flash_init() +void esp_core_dump_flash_init(void) { const esp_partition_t *core_part; diff --git a/components/espcoredump/src/core_dump_uart.c b/components/espcoredump/src/core_dump_uart.c index d3afbe5d0..2a2aa2d5f 100644 --- a/components/espcoredump/src/core_dump_uart.c +++ b/components/espcoredump/src/core_dump_uart.c @@ -81,7 +81,7 @@ static esp_err_t esp_core_dump_uart_write_data(void *priv, void * data, uint32_t return err; } -static int esp_core_dump_uart_get_char() { +static int esp_core_dump_uart_get_char(void) { int i; uint32_t reg = (READ_PERI_REG(UART_STATUS_REG(0)) >> UART_RXFIFO_CNT_S) & UART_RXFIFO_CNT; if (reg) { diff --git a/components/espcoredump/test/test_core_dump.c b/components/espcoredump/test/test_core_dump.c index 024d2301d..ad6758b67 100644 --- a/components/espcoredump/test/test_core_dump.c +++ b/components/espcoredump/test/test_core_dump.c @@ -20,7 +20,7 @@ volatile unsigned long crash_flags = TCI_UNALIGN_PTR; -void bad_ptr_func() +void bad_ptr_func(void) { unsigned long *ptr = (unsigned long *)0; volatile int cnt = 0; @@ -47,7 +47,7 @@ void bad_ptr_task(void *pvParameter) fflush(stdout); } -void recur_func() +void recur_func(void) { static int rec_cnt; unsigned short *ptr = (unsigned short *)0x5; diff --git a/components/fatfs/test/test_fatfs_rawflash.c b/components/fatfs/test/test_fatfs_rawflash.c index 66412451a..ca949e1ab 100644 --- a/components/fatfs/test/test_fatfs_rawflash.c +++ b/components/fatfs/test/test_fatfs_rawflash.c @@ -60,7 +60,7 @@ static void test_setup(size_t max_files) TEST_ESP_OK(esp_vfs_fat_rawflash_mount("/spiflash", "flash_test", &mount_config)); } -static void test_teardown() +static void test_teardown(void) { TEST_ESP_OK(esp_vfs_fat_rawflash_unmount("/spiflash","flash_test")); } diff --git a/components/fatfs/test/test_fatfs_spiflash.c b/components/fatfs/test/test_fatfs_spiflash.c index f848c31ca..64dbe4ff0 100644 --- a/components/fatfs/test/test_fatfs_spiflash.c +++ b/components/fatfs/test/test_fatfs_spiflash.c @@ -32,7 +32,7 @@ static wl_handle_t s_test_wl_handle; -static void test_setup() +static void test_setup(void) { esp_vfs_fat_sdmmc_mount_config_t mount_config = { .format_if_mount_failed = true, @@ -42,7 +42,7 @@ static void test_setup() TEST_ESP_OK(esp_vfs_fat_spiflash_mount("/spiflash", NULL, &mount_config, &s_test_wl_handle)); } -static void test_teardown() +static void test_teardown(void) { TEST_ESP_OK(esp_vfs_fat_spiflash_unmount("/spiflash", s_test_wl_handle)); } diff --git a/components/fatfs/vfs/esp_vfs_fat.h b/components/fatfs/vfs/esp_vfs_fat.h index a2a05951e..d3f9caa68 100644 --- a/components/fatfs/vfs/esp_vfs_fat.h +++ b/components/fatfs/vfs/esp_vfs_fat.h @@ -63,7 +63,7 @@ esp_err_t esp_vfs_fat_register(const char* base_path, const char* fat_drive, * - ESP_OK on success * - ESP_ERR_INVALID_STATE if FATFS is not registered in VFS */ -esp_err_t esp_vfs_fat_unregister() __attribute__((deprecated)); +esp_err_t esp_vfs_fat_unregister(void) __attribute__((deprecated)); /** * @brief Un-register FATFS from VFS @@ -160,7 +160,7 @@ esp_err_t esp_vfs_fat_sdmmc_mount(const char* base_path, * - ESP_OK on success * - ESP_ERR_INVALID_STATE if esp_vfs_fat_sdmmc_mount hasn't been called */ -esp_err_t esp_vfs_fat_sdmmc_unmount(); +esp_err_t esp_vfs_fat_sdmmc_unmount(void); /** * @brief Convenience function to initialize FAT filesystem in SPI flash and register it in VFS diff --git a/components/fatfs/vfs/vfs_fat.c b/components/fatfs/vfs/vfs_fat.c index 511be8c56..e4be41516 100644 --- a/components/fatfs/vfs/vfs_fat.c +++ b/components/fatfs/vfs/vfs_fat.c @@ -104,7 +104,7 @@ static size_t find_context_index_by_path(const char* base_path) return FF_VOLUMES; } -static size_t find_unused_context_index() +static size_t find_unused_context_index(void) { for(size_t i=0; istart(); // Disables flash cache diff --git a/components/libsodium/test/test_sodium.c b/components/libsodium/test/test_sodium.c index 7a9f096da..5c2e26b23 100644 --- a/components/libsodium/test/test_sodium.c +++ b/components/libsodium/test/test_sodium.c @@ -9,7 +9,7 @@ internal filesystem storage. */ -extern int aead_chacha20poly1305_xmain(); +extern int aead_chacha20poly1305_xmain(void); TEST_CASE("aead_chacha20poly1305 test vectors", "[libsodium]") { @@ -17,7 +17,7 @@ TEST_CASE("aead_chacha20poly1305 test vectors", "[libsodium]") TEST_ASSERT_EQUAL(0, aead_chacha20poly1305_xmain()); } -extern int chacha20_xmain(); +extern int chacha20_xmain(void); TEST_CASE("chacha20 test vectors", "[libsodium]") { @@ -25,8 +25,8 @@ TEST_CASE("chacha20 test vectors", "[libsodium]") TEST_ASSERT_EQUAL(0, chacha20_xmain()); } -extern int box_xmain(); -extern int box2_xmain(); +extern int box_xmain(void); +extern int box2_xmain(void); TEST_CASE("box tests", "[libsodium]") { @@ -37,7 +37,7 @@ TEST_CASE("box tests", "[libsodium]") TEST_ASSERT_EQUAL(0, box2_xmain()); } -extern int ed25519_convert_xmain(); +extern int ed25519_convert_xmain(void); TEST_CASE("ed25519_convert tests", "[libsodium]") { @@ -45,7 +45,7 @@ TEST_CASE("ed25519_convert tests", "[libsodium]") TEST_ASSERT_EQUAL(0, ed25519_convert_xmain() ); } -extern int sign_xmain(); +extern int sign_xmain(void); TEST_CASE("sign tests", "[libsodium]") { @@ -53,7 +53,7 @@ TEST_CASE("sign tests", "[libsodium]") TEST_ASSERT_EQUAL(0, sign_xmain() ); } -extern int hash_xmain(); +extern int hash_xmain(void); TEST_CASE("hash tests", "[libsodium]") { diff --git a/components/log/log.c b/components/log/log.c index c59469cc0..fbbdf2406 100644 --- a/components/log/log.c +++ b/components/log/log.c @@ -104,7 +104,7 @@ static inline void add_to_cache(const char* tag, esp_log_level_t level); static void heap_bubble_down(int index); static inline void heap_swap(int i, int j); static inline bool should_output(esp_log_level_t level_for_message, esp_log_level_t level_for_tag); -static inline void clear_log_level_list(); +static inline void clear_log_level_list(void); vprintf_like_t esp_log_set_vprintf(vprintf_like_t func) { @@ -172,7 +172,7 @@ void esp_log_level_set(const char* tag, esp_log_level_t level) xSemaphoreGive(s_log_mutex); } -void clear_log_level_list() +void clear_log_level_list(void) { uncached_tag_entry_t *it; while((it = SLIST_FIRST(&s_log_tags)) != NULL) { @@ -325,14 +325,14 @@ static inline void heap_swap(int i, int j) //as a workaround before the interface for this variable extern uint32_t g_ticks_per_us_pro; -uint32_t ATTR esp_log_early_timestamp() +uint32_t ATTR esp_log_early_timestamp(void) { return xthal_get_ccount() / (g_ticks_per_us_pro * 1000); } #ifndef BOOTLOADER_BUILD -uint32_t IRAM_ATTR esp_log_timestamp() +uint32_t IRAM_ATTR esp_log_timestamp(void) { if (xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED) { return esp_log_early_timestamp(); @@ -346,7 +346,7 @@ uint32_t IRAM_ATTR esp_log_timestamp() #else -uint32_t esp_log_timestamp() __attribute__((alias("esp_log_early_timestamp"))); +uint32_t esp_log_timestamp(void) __attribute__((alias("esp_log_early_timestamp"))); #endif //BOOTLOADER_BUILD diff --git a/components/lwip/apps/dhcpserver/dhcpserver.c b/components/lwip/apps/dhcpserver/dhcpserver.c index df6a2af02..48adc3b98 100644 --- a/components/lwip/apps/dhcpserver/dhcpserver.c +++ b/components/lwip/apps/dhcpserver/dhcpserver.c @@ -1322,7 +1322,7 @@ dhcps_dns_setserver(const ip_addr_t *dnsserver) * Returns : ip4_addr_t *******************************************************************************/ ip4_addr_t -dhcps_dns_getserver() +dhcps_dns_getserver(void) { return dns_server; } diff --git a/components/lwip/include/apps/dhcpserver/dhcpserver.h b/components/lwip/include/apps/dhcpserver/dhcpserver.h index a6ad51d99..1aef8aaca 100644 --- a/components/lwip/include/apps/dhcpserver/dhcpserver.h +++ b/components/lwip/include/apps/dhcpserver/dhcpserver.h @@ -88,7 +88,7 @@ void *dhcps_option_info(u8_t op_id, u32_t opt_len); void dhcps_set_option_info(u8_t op_id, void *opt_info, u32_t opt_len); bool dhcp_search_ip_on_mac(u8_t *mac, ip4_addr_t *ip); void dhcps_dns_setserver(const ip_addr_t *dnsserver); -ip4_addr_t dhcps_dns_getserver(); +ip4_addr_t dhcps_dns_getserver(void); void dhcps_set_new_lease_cb(dhcps_cb_t cb); #endif diff --git a/components/lwip/port/esp32/include/arch/vfs_lwip.h b/components/lwip/port/esp32/include/arch/vfs_lwip.h index 1957304b9..8a037c6ff 100644 --- a/components/lwip/port/esp32/include/arch/vfs_lwip.h +++ b/components/lwip/port/esp32/include/arch/vfs_lwip.h @@ -16,7 +16,7 @@ extern "C" { #endif -void esp_vfs_lwip_sockets_register(); +void esp_vfs_lwip_sockets_register(void); #ifdef __cplusplus } diff --git a/components/lwip/port/esp32/vfs_lwip.c b/components/lwip/port/esp32/vfs_lwip.c index ffd3e79e1..9ef74784c 100644 --- a/components/lwip/port/esp32/vfs_lwip.c +++ b/components/lwip/port/esp32/vfs_lwip.c @@ -39,7 +39,7 @@ static void lwip_stop_socket_select_isr(void *sem, BaseType_t *woken) } } -static void *lwip_get_socket_select_semaphore() +static void *lwip_get_socket_select_semaphore(void) { /* Calling this from the same process as select() will ensure that the semaphore won't be allocated from * ISR (lwip_stop_socket_select_isr). @@ -57,7 +57,7 @@ static int lwip_ioctl_r_wrapper(int fd, int cmd, va_list args) return lwip_ioctl(fd, cmd, va_arg(args, void *)); } -void esp_vfs_lwip_sockets_register() +void esp_vfs_lwip_sockets_register(void) { esp_vfs_t vfs = { .flags = ESP_VFS_FLAG_DEFAULT, diff --git a/components/lwip/test_afl_host/dhcp_di.h b/components/lwip/test_afl_host/dhcp_di.h index c37a3e1b6..2f3b2cc55 100644 --- a/components/lwip/test_afl_host/dhcp_di.h +++ b/components/lwip/test_afl_host/dhcp_di.h @@ -23,7 +23,7 @@ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_a void (*dhcp_test_static_dhcp_recv)(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) = NULL; -void dhcp_test_init_di() +void dhcp_test_init_di(void) { dhcp_test_static_dhcp_recv = dhcp_recv; } diff --git a/components/lwip/test_afl_host/dhcpserver_di.h b/components/lwip/test_afl_host/dhcpserver_di.h index 48cce58f6..a05a88578 100644 --- a/components/lwip/test_afl_host/dhcpserver_di.h +++ b/components/lwip/test_afl_host/dhcpserver_di.h @@ -13,7 +13,7 @@ static void handle_dhcp(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip void (*dhcp_test_static_handle_hdcp)(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) = NULL; -void dhcp_test_init_di() +void dhcp_test_init_di(void) { dhcp_test_static_handle_hdcp = handle_dhcp; } diff --git a/components/lwip/test_afl_host/dns_di.h b/components/lwip/test_afl_host/dns_di.h index 0479f36a8..a02b464aa 100644 --- a/components/lwip/test_afl_host/dns_di.h +++ b/components/lwip/test_afl_host/dns_di.h @@ -35,7 +35,7 @@ static void dns_recv(void *s, struct udp_pcb *pcb, struct pbuf *p, const ip_addr void (*dns_test_static_dns_recv)(void *s, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) = NULL; err_t (*dns_test_static_dns_enqueue)(const char *name, size_t hostnamelen, dns_found_callback found, void *callback_arg, u8_t dns_addrtype) = NULL; -void dns_test_init_di() +void dns_test_init_di(void) { dns_test_static_dns_recv = dns_recv; dns_test_static_dns_enqueue = dns_enqueue; diff --git a/components/lwip/test_afl_host/test_dhcp_client.c b/components/lwip/test_afl_host/test_dhcp_client.c index fee5d01b1..681189ea0 100644 --- a/components/lwip/test_afl_host/test_dhcp_client.c +++ b/components/lwip/test_afl_host/test_dhcp_client.c @@ -22,7 +22,7 @@ ip4_addr_t server_ip; // // Dependency injected test functions void dhcp_test_dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port); -void dhcp_test_init_di(); +void dhcp_test_init_di(void); // // Test starts here diff --git a/components/lwip/test_afl_host/test_dhcp_server.c b/components/lwip/test_afl_host/test_dhcp_server.c index e19cf28e7..dc8995280 100644 --- a/components/lwip/test_afl_host/test_dhcp_server.c +++ b/components/lwip/test_afl_host/test_dhcp_server.c @@ -14,7 +14,7 @@ void dhcp_test_dhcps_cb (u8_t client_ip[4]) {} // Dependency injected static function to pass the packet into parser void dhcp_test_handle_dhcp(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port); -void dhcp_test_init_di(); +void dhcp_test_init_di(void); // // Test starts here diff --git a/components/lwip/test_afl_host/test_dns.c b/components/lwip/test_afl_host/test_dns.c index 1e9a58815..df74d7d86 100644 --- a/components/lwip/test_afl_host/test_dns.c +++ b/components/lwip/test_afl_host/test_dns.c @@ -21,7 +21,7 @@ ip4_addr_t server_ip; void dns_test_dns_recv(void *s, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port); void dns_test_inject_port_and_txid(int port, int txid); -void dns_test_init_di(); +void dns_test_init_di(void); err_t dns_test_dns_enqueue(const char *name, size_t hostnamelen, dns_found_callback found, void *callback_arg, u8_t dns_addrtype); // diff --git a/components/mbedtls/port/esp_bignum.c b/components/mbedtls/port/esp_bignum.c index 50e1d9f36..09bb774b9 100644 --- a/components/mbedtls/port/esp_bignum.c +++ b/components/mbedtls/port/esp_bignum.c @@ -73,7 +73,7 @@ static IRAM_ATTR void rsa_complete_isr(void *arg) } } -static void rsa_isr_initialise() +static void rsa_isr_initialise(void) { if (op_complete_sem == NULL) { op_complete_sem = xSemaphoreCreateBinary(); diff --git a/components/mbedtls/test/test_apb_dport_access.c b/components/mbedtls/test/test_apb_dport_access.c index 392effc91..07203ac1e 100644 --- a/components/mbedtls/test/test_apb_dport_access.c +++ b/components/mbedtls/test/test_apb_dport_access.c @@ -17,7 +17,7 @@ static void apb_access_loop_task(void *ignore); static volatile bool apb_access_corrupt; static TaskHandle_t apb_task_handle; -void start_apb_access_loop() +void start_apb_access_loop(void) { apb_access_corrupt = false; xTaskCreatePinnedToCore(apb_access_loop_task, "accessAPB", 2048, NULL, @@ -25,7 +25,7 @@ void start_apb_access_loop() &apb_task_handle, !UNITY_FREERTOS_CPU); } -void verify_apb_access_loop() +void verify_apb_access_loop(void) { vTaskDelete(apb_task_handle); apb_task_handle = NULL; @@ -45,11 +45,11 @@ static void apb_access_loop_task(void *ignore) #else /*CONFIG_FREERTOS_UNICORE */ -void start_apb_access_loop() +void start_apb_access_loop(void) { } -void verify_apb_access_loop() +void verify_apb_access_loop(void) { } diff --git a/components/mbedtls/test/test_apb_dport_access.h b/components/mbedtls/test/test_apb_dport_access.h index a974c2d42..8f30e0465 100644 --- a/components/mbedtls/test/test_apb_dport_access.h +++ b/components/mbedtls/test/test_apb_dport_access.h @@ -10,9 +10,9 @@ Does nothing in unicore mode. */ -void start_apb_access_loop(); +void start_apb_access_loop(void); /* verify_apb_access_loop() kills the task started by start_apb_access_loop() and verifies that none of the APB reads were corrupted by unsafe DPORT reads. */ -void verify_apb_access_loop(); +void verify_apb_access_loop(void); diff --git a/components/mdns/include/mdns.h b/components/mdns/include/mdns.h index 4370969d7..a30534640 100644 --- a/components/mdns/include/mdns.h +++ b/components/mdns/include/mdns.h @@ -85,13 +85,13 @@ typedef struct mdns_result_s { * - ESP_ERR_NO_MEM on memory error * - ESP_FAIL when failed to start mdns task */ -esp_err_t mdns_init(); +esp_err_t mdns_init(void); /** * @brief Stop and free mDNS server * */ -void mdns_free(); +void mdns_free(void); /** * @brief Set the hostname for mDNS server @@ -235,7 +235,7 @@ esp_err_t mdns_service_txt_item_remove(const char * service_type, const char * p * - ESP_OK success * - ESP_ERR_INVALID_ARG Parameter error */ -esp_err_t mdns_service_remove_all(); +esp_err_t mdns_service_remove_all(void); /** * @brief Query mDNS for host or service diff --git a/components/mdns/include/mdns_console.h b/components/mdns/include/mdns_console.h index 5c8b0b5a4..059e03de5 100644 --- a/components/mdns/include/mdns_console.h +++ b/components/mdns/include/mdns_console.h @@ -17,6 +17,6 @@ /** * @brief Register MDNS functions with the console component */ -void mdns_console_register(); +void mdns_console_register(void); #endif /* _MDNS_CONSOLE_H_ */ diff --git a/components/mdns/mdns.c b/components/mdns/mdns.c index 92909e2de..7331353d2 100644 --- a/components/mdns/mdns.c +++ b/components/mdns/mdns.c @@ -32,7 +32,7 @@ static const char *TAG = "MDNS"; static volatile TaskHandle_t _mdns_service_task_handle = NULL; static SemaphoreHandle_t _mdns_service_semaphore = NULL; -static void _mdns_search_finish_done(); +static void _mdns_search_finish_done(void); static mdns_search_once_t * _mdns_search_find_from(mdns_search_once_t * search, mdns_name_t * name, uint16_t type, tcpip_adapter_if_t tcpip_if, mdns_ip_protocol_t ip_protocol); static void _mdns_search_result_add_ip(mdns_search_once_t * search, const char * hostname, ip_addr_t * ip, tcpip_adapter_if_t tcpip_if, mdns_ip_protocol_t ip_protocol); static void _mdns_search_result_add_srv(mdns_search_once_t * search, const char * hostname, uint16_t port, tcpip_adapter_if_t tcpip_if, mdns_ip_protocol_t ip_protocol); @@ -1010,7 +1010,7 @@ static void _mdns_schedule_tx_packet(mdns_tx_packet_t * packet, uint32_t ms_afte /** * @brief free all packets scheduled for sending */ -static void _mdns_clear_tx_queue_head() +static void _mdns_clear_tx_queue_head(void) { mdns_tx_packet_t * q; while (_mdns_server->tx_queue_head) { @@ -1699,7 +1699,7 @@ static void _mdns_send_final_bye(bool include_ip) /** * @brief Stop the responder on all services without instance */ -static void _mdns_send_bye_all_pcbs_no_instance() +static void _mdns_send_bye_all_pcbs_no_instance(void) { size_t srv_count = 0; mdns_srv_item_t * a = _mdns_server->services; @@ -1727,7 +1727,7 @@ static void _mdns_send_bye_all_pcbs_no_instance() /** * @brief Restart the responder on all services without instance */ -static void _mdns_restart_all_pcbs_no_instance() +static void _mdns_restart_all_pcbs_no_instance(void) { size_t srv_count = 0; mdns_srv_item_t * a = _mdns_server->services; @@ -1755,7 +1755,7 @@ static void _mdns_restart_all_pcbs_no_instance() /** * @brief Restart the responder on all active PCBs */ -static void _mdns_restart_all_pcbs() +static void _mdns_restart_all_pcbs(void) { _mdns_clear_tx_queue_head(); size_t srv_count = 0; @@ -3209,7 +3209,7 @@ static void _mdns_search_add(mdns_search_once_t * search) /** * @brief Called from parser to finish any searches that have reached maximum results */ -static void _mdns_search_finish_done() +static void _mdns_search_finish_done(void) { mdns_search_once_t * search = _mdns_server->search_once; mdns_search_once_t * s = NULL; @@ -3931,7 +3931,7 @@ static esp_err_t _mdns_send_search_action(mdns_action_type_t type, mdns_search_o * if it is scheduled to be transmitted, then pushes the packet to action queue to be handled. * */ -static void _mdns_scheduler_run() +static void _mdns_scheduler_run(void) { MDNS_SERVICE_LOCK(); mdns_tx_packet_t * p = _mdns_server->tx_queue_head; @@ -3966,7 +3966,7 @@ static void _mdns_scheduler_run() /** * @brief Called from timer task to run active searches */ -static void _mdns_search_run() +static void _mdns_search_run(void) { MDNS_SERVICE_LOCK(); mdns_search_once_t * s = _mdns_server->search_once; @@ -4025,7 +4025,7 @@ static void _mdns_timer_cb(void * arg) _mdns_search_run(); } -static esp_err_t _mdns_start_timer(){ +static esp_err_t _mdns_start_timer(void){ esp_timer_create_args_t timer_conf = { .callback = _mdns_timer_cb, .arg = NULL, @@ -4039,7 +4039,7 @@ static esp_err_t _mdns_start_timer(){ return esp_timer_start_periodic(_mdns_server->timer_handle, MDNS_TIMER_PERIOD_US); } -static esp_err_t _mdns_stop_timer(){ +static esp_err_t _mdns_stop_timer(void){ esp_err_t err = ESP_OK; if (_mdns_server->timer_handle) { err = esp_timer_stop(_mdns_server->timer_handle); @@ -4058,7 +4058,7 @@ static esp_err_t _mdns_stop_timer(){ * - ESP_OK on success * - ESP_FAIL on error */ -static esp_err_t _mdns_service_task_start() +static esp_err_t _mdns_service_task_start(void) { if (!_mdns_service_semaphore) { _mdns_service_semaphore = xSemaphoreCreateMutex(); @@ -4091,7 +4091,7 @@ static esp_err_t _mdns_service_task_start() * @return * - ESP_OK */ -static esp_err_t _mdns_service_task_stop() +static esp_err_t _mdns_service_task_stop(void) { _mdns_stop_timer(); if (_mdns_service_task_handle) { @@ -4146,7 +4146,7 @@ static void event_handler(void* arg, esp_event_base_t event_base, } } -esp_err_t mdns_init() +esp_err_t mdns_init(void) { esp_err_t err = ESP_OK; @@ -4222,7 +4222,7 @@ free_server: return err; } -void mdns_free() +void mdns_free(void) { uint8_t i, j; if (!_mdns_server) { @@ -4571,7 +4571,7 @@ esp_err_t mdns_service_remove(const char * service, const char * proto) return ESP_OK; } -esp_err_t mdns_service_remove_all() +esp_err_t mdns_service_remove_all(void) { if (!_mdns_server) { return ESP_ERR_INVALID_ARG; diff --git a/components/mdns/mdns_console.c b/components/mdns/mdns_console.c index 17bffa55b..adbbf0b8f 100644 --- a/components/mdns/mdns_console.c +++ b/components/mdns/mdns_console.c @@ -99,7 +99,7 @@ static int cmd_mdns_query_a(int argc, char** argv) return 0; } -static void register_mdns_query_a() +static void register_mdns_query_a(void) { mdns_query_a_args.hostname = arg_str1(NULL, NULL, "", "Hostname that is searched for"); mdns_query_a_args.timeout = arg_int0("t", "timeout", "", "Timeout for this query"); @@ -156,7 +156,7 @@ static int cmd_mdns_query_aaaa(int argc, char** argv) return 0; } -static void register_mdns_query_aaaa() +static void register_mdns_query_aaaa(void) { mdns_query_a_args.hostname = arg_str1(NULL, NULL, "", "Hostname that is searched for"); mdns_query_a_args.timeout = arg_int0("t", "timeout", "", "Timeout for this query"); @@ -215,7 +215,7 @@ static int cmd_mdns_query_srv(int argc, char** argv) return 0; } -static void register_mdns_query_srv() +static void register_mdns_query_srv(void) { mdns_query_srv_args.instance = arg_str1(NULL, NULL, "", "Instance to search for"); mdns_query_srv_args.service = arg_str1(NULL, NULL, "", "Service to search for (ex. _http, _smb, etc.)"); @@ -277,7 +277,7 @@ static int cmd_mdns_query_txt(int argc, char** argv) return 0; } -static void register_mdns_query_txt() +static void register_mdns_query_txt(void) { mdns_query_txt_args.instance = arg_str1(NULL, NULL, "", "Instance to search for"); mdns_query_txt_args.service = arg_str1(NULL, NULL, "", "Service to search for (ex. _http, _smb, etc.)"); @@ -343,7 +343,7 @@ static int cmd_mdns_query_ptr(int argc, char** argv) return 0; } -static void register_mdns_query_ptr() +static void register_mdns_query_ptr(void) { mdns_query_ptr_args.service = arg_str1(NULL, NULL, "", "Service to search for (ex. _http, _smb, etc.)"); mdns_query_ptr_args.proto = arg_str1(NULL, NULL, "", "Protocol to search for (_tcp, _udp, etc.)"); @@ -412,7 +412,7 @@ static int cmd_mdns_query_ip(int argc, char** argv) return 0; } -static void register_mdns_query_ip() +static void register_mdns_query_ip(void) { mdns_query_ip_args.hostname = arg_str1(NULL, NULL, "", "Hostname that is searched for"); mdns_query_ip_args.timeout = arg_int0("t", "timeout", "", "Timeout for this query"); @@ -479,7 +479,7 @@ static int cmd_mdns_query_svc(int argc, char** argv) return 0; } -static void register_mdns_query_svc() +static void register_mdns_query_svc(void) { mdns_query_svc_args.instance = arg_str1(NULL, NULL, "", "Instance to search for"); mdns_query_svc_args.service = arg_str1(NULL, NULL, "", "Service to search for (ex. _http, _smb, etc.)"); @@ -528,7 +528,7 @@ static int cmd_mdns_init(int argc, char** argv) return 0; } -static void register_mdns_init() +static void register_mdns_init(void) { mdns_init_args.hostname = arg_str0("h", "hostname", "", "Hostname that the server will advertise"); mdns_init_args.instance = arg_str0("i", "instance", "", "Default instance name for services"); @@ -551,7 +551,7 @@ static int cmd_mdns_free(int argc, char** argv) return 0; } -static void register_mdns_free() +static void register_mdns_free(void) { const esp_console_cmd_t cmd_free = { .command = "mdns_free", @@ -586,7 +586,7 @@ static int cmd_mdns_set_hostname(int argc, char** argv) return 0; } -static void register_mdns_set_hostname() +static void register_mdns_set_hostname(void) { mdns_set_hostname_args.hostname = arg_str1(NULL, NULL, "", "Hostname that the server will advertise"); mdns_set_hostname_args.end = arg_end(2); @@ -624,7 +624,7 @@ static int cmd_mdns_set_instance(int argc, char** argv) return 0; } -static void register_mdns_set_instance() +static void register_mdns_set_instance(void) { mdns_set_instance_args.instance = arg_str1(NULL, NULL, "", "Default instance name for services"); mdns_set_instance_args.end = arg_end(2); @@ -733,7 +733,7 @@ static int cmd_mdns_service_add(int argc, char** argv) return 0; } -static void register_mdns_service_add() +static void register_mdns_service_add(void) { mdns_add_args.service = arg_str1(NULL, NULL, "", "MDNS Service"); mdns_add_args.proto = arg_str1(NULL, NULL, "", "IP Protocol"); @@ -776,7 +776,7 @@ static int cmd_mdns_service_remove(int argc, char** argv) return 0; } -static void register_mdns_service_remove() +static void register_mdns_service_remove(void) { mdns_remove_args.service = arg_str1(NULL, NULL, "", "MDNS Service"); mdns_remove_args.proto = arg_str1(NULL, NULL, "", "IP Protocol"); @@ -817,7 +817,7 @@ static int cmd_mdns_service_instance_set(int argc, char** argv) return 0; } -static void register_mdns_service_instance_set() +static void register_mdns_service_instance_set(void) { mdns_service_instance_set_args.service = arg_str1(NULL, NULL, "", "MDNS Service"); mdns_service_instance_set_args.proto = arg_str1(NULL, NULL, "", "IP Protocol"); @@ -858,7 +858,7 @@ static int cmd_mdns_service_port_set(int argc, char** argv) { return 0; } -static void register_mdns_service_port_set() +static void register_mdns_service_port_set(void) { mdns_service_port_set_args.service = arg_str1(NULL, NULL, "", "MDNS Service"); mdns_service_port_set_args.proto = arg_str1(NULL, NULL, "", "IP Protocol"); @@ -910,7 +910,7 @@ static int cmd_mdns_service_txt_replace(int argc, char** argv) return 0; } -static void register_mdns_service_txt_replace() +static void register_mdns_service_txt_replace(void) { mdns_txt_replace_args.service = arg_str1(NULL, NULL, "", "MDNS Service"); mdns_txt_replace_args.proto = arg_str1(NULL, NULL, "", "IP Protocol"); @@ -953,7 +953,7 @@ static int cmd_mdns_service_txt_set(int argc, char** argv) return 0; } -static void register_mdns_service_txt_set() +static void register_mdns_service_txt_set(void) { mdns_txt_set_args.service = arg_str1(NULL, NULL, "", "MDNS Service"); mdns_txt_set_args.proto = arg_str1(NULL, NULL, "", "IP Protocol"); @@ -996,7 +996,7 @@ static int cmd_mdns_service_txt_remove(int argc, char** argv) return 0; } -static void register_mdns_service_txt_remove() +static void register_mdns_service_txt_remove(void) { mdns_txt_remove_args.service = arg_str1(NULL, NULL, "", "MDNS Service"); mdns_txt_remove_args.proto = arg_str1(NULL, NULL, "", "IP Protocol"); @@ -1020,7 +1020,7 @@ static int cmd_mdns_service_remove_all(int argc, char** argv) return 0; } -static void register_mdns_service_remove_all() +static void register_mdns_service_remove_all(void) { const esp_console_cmd_t cmd_free = { .command = "mdns_service_remove_all", @@ -1033,7 +1033,7 @@ static void register_mdns_service_remove_all() ESP_ERROR_CHECK( esp_console_cmd_register(&cmd_free) ); } -void mdns_console_register() +void mdns_console_register(void) { register_mdns_init(); register_mdns_free(); diff --git a/components/mdns/mdns_networking.c b/components/mdns/mdns_networking.c index bb3400f0a..ac69b093d 100644 --- a/components/mdns/mdns_networking.c +++ b/components/mdns/mdns_networking.c @@ -23,7 +23,7 @@ static void _udp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *pb, const ip /** * @brief Low level UDP PCB Initialize */ -static esp_err_t _udp_pcb_main_init() +static esp_err_t _udp_pcb_main_init(void) { if(_pcb_main) { return ESP_OK; @@ -47,7 +47,7 @@ static esp_err_t _udp_pcb_main_init() /** * @brief Low level UDP PCB Free */ -static void _udp_pcb_main_deinit() +static void _udp_pcb_main_deinit(void) { if(_pcb_main){ udp_recv(_pcb_main, NULL, NULL); @@ -177,7 +177,7 @@ static void _udp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *pb, const ip /** * @brief Check if any of the interfaces is up */ -static bool _udp_pcb_is_in_use(){ +static bool _udp_pcb_is_in_use(void){ int i, p; for (i=0; isize); } -extern "C" esp_err_t nvs_flash_erase() +extern "C" esp_err_t nvs_flash_erase(void) { return nvs_flash_erase_partition(NVS_DEFAULT_PART_NAME); } diff --git a/components/openssl/include/internal/ssl_x509.h b/components/openssl/include/internal/ssl_x509.h index 877c4fbb7..e58439724 100644 --- a/components/openssl/include/internal/ssl_x509.h +++ b/components/openssl/include/internal/ssl_x509.h @@ -159,7 +159,7 @@ BIO *BIO_new(void * method); /** * @brief get the memory BIO method function */ -void *BIO_s_mem(); +void *BIO_s_mem(void); /** * @brief free a BIO object diff --git a/components/openssl/library/ssl_x509.c b/components/openssl/library/ssl_x509.c index 0b49bb8fe..91c2a64ef 100644 --- a/components/openssl/library/ssl_x509.c +++ b/components/openssl/library/ssl_x509.c @@ -409,7 +409,7 @@ failed: /** * @brief get the memory BIO method function */ -void *BIO_s_mem() { +void *BIO_s_mem(void) { return NULL; } diff --git a/components/protocomm/include/common/protocomm.h b/components/protocomm/include/common/protocomm.h index cb11a0b13..b5c57992c 100644 --- a/components/protocomm/include/common/protocomm.h +++ b/components/protocomm/include/common/protocomm.h @@ -52,7 +52,7 @@ typedef struct protocomm protocomm_t; * - protocomm_t* : On success * - NULL : No memory for allocating new instance */ -protocomm_t *protocomm_new(); +protocomm_t *protocomm_new(void); /** * @brief Delete a protocomm instance diff --git a/components/protocomm/src/common/protocomm.c b/components/protocomm/src/common/protocomm.c index e55ad7b89..683e36090 100644 --- a/components/protocomm/src/common/protocomm.c +++ b/components/protocomm/src/common/protocomm.c @@ -26,7 +26,7 @@ static const char *TAG = "protocomm"; -protocomm_t *protocomm_new() +protocomm_t *protocomm_new(void) { protocomm_t *pc; diff --git a/components/protocomm/src/simple_ble/simple_ble.c b/components/protocomm/src/simple_ble/simple_ble.c index ff57b9595..e4f2a8f8d 100644 --- a/components/protocomm/src/simple_ble/simple_ble.c +++ b/components/protocomm/src/simple_ble/simple_ble.c @@ -178,7 +178,7 @@ static void gatts_profile_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_ } } -simple_ble_cfg_t *simple_ble_init() +simple_ble_cfg_t *simple_ble_init(void) { simple_ble_cfg_t *ble_cfg_p = (simple_ble_cfg_t *) malloc(sizeof(simple_ble_cfg_t)); if (ble_cfg_p == NULL) { @@ -188,7 +188,7 @@ simple_ble_cfg_t *simple_ble_init() return ble_cfg_p; } -esp_err_t simple_ble_deinit() +esp_err_t simple_ble_deinit(void) { free(g_ble_cfg_p->gatt_db); free(g_ble_cfg_p); @@ -262,7 +262,7 @@ esp_err_t simple_ble_start(simple_ble_cfg_t *cfg) return ESP_OK; } -esp_err_t simple_ble_stop() +esp_err_t simple_ble_stop(void) { esp_err_t err; ESP_LOGD(TAG, "Free mem at start of simple_ble_stop %d", esp_get_free_heap_size()); diff --git a/components/protocomm/src/simple_ble/simple_ble.h b/components/protocomm/src/simple_ble/simple_ble.h index d4f927b61..46f37f6d4 100644 --- a/components/protocomm/src/simple_ble/simple_ble.h +++ b/components/protocomm/src/simple_ble/simple_ble.h @@ -67,7 +67,7 @@ typedef struct { * * @return simple_ble_cfg_t* Pointer to configuration structure */ -simple_ble_cfg_t *simple_ble_init(); +simple_ble_cfg_t *simple_ble_init(void); /** Deallocates memory * @@ -75,7 +75,7 @@ simple_ble_cfg_t *simple_ble_init(); * * @return ESP_OK */ -esp_err_t simple_ble_deinit(); +esp_err_t simple_ble_deinit(void); /** Starts BLE service * @@ -97,7 +97,7 @@ esp_err_t simple_ble_start(simple_ble_cfg_t *cfg); * * @return ESP_OK on success, and appropriate error code for failure */ -esp_err_t simple_ble_stop(); +esp_err_t simple_ble_stop(void); /** Convert handle to 128 bit UUID of characteristic * diff --git a/components/pthread/include/esp_pthread.h b/components/pthread/include/esp_pthread.h index 76f45a32a..6d24d3ea9 100644 --- a/components/pthread/include/esp_pthread.h +++ b/components/pthread/include/esp_pthread.h @@ -41,7 +41,7 @@ typedef struct { * @return * A default configuration structure. */ -esp_pthread_cfg_t esp_pthread_get_default_config(); +esp_pthread_cfg_t esp_pthread_get_default_config(void); /** * @brief Configure parameters for creating pthread diff --git a/components/pthread/pthread.c b/components/pthread/pthread.c index ce0c064ce..40caf9e12 100644 --- a/components/pthread/pthread.c +++ b/components/pthread/pthread.c @@ -168,12 +168,12 @@ esp_err_t esp_pthread_get_cfg(esp_pthread_cfg_t *p) return ESP_ERR_NOT_FOUND; } -static int get_default_pthread_core() +static int get_default_pthread_core(void) { return CONFIG_PTHREAD_TASK_CORE_DEFAULT == -1 ? tskNO_AFFINITY : CONFIG_PTHREAD_TASK_CORE_DEFAULT; } -esp_pthread_cfg_t esp_pthread_get_default_config() +esp_pthread_cfg_t esp_pthread_get_default_config(void) { esp_pthread_cfg_t cfg = { .stack_size = CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT, @@ -822,6 +822,6 @@ int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate) } /* Hook function to force linking this file */ -void pthread_include_pthread_impl() +void pthread_include_pthread_impl(void) { } diff --git a/components/pthread/pthread_cond_var.c b/components/pthread/pthread_cond_var.c index 8db28ae5e..bb3a883c4 100644 --- a/components/pthread/pthread_cond_var.c +++ b/components/pthread/pthread_cond_var.c @@ -200,6 +200,6 @@ int pthread_cond_destroy(pthread_cond_t *cv) } /* Hook function to force linking this file */ -void pthread_include_pthread_cond_var_impl() +void pthread_include_pthread_cond_var_impl(void) { } diff --git a/components/pthread/pthread_internal.h b/components/pthread/pthread_internal.h index 6ed2fe45e..a4e4cfd55 100644 --- a/components/pthread/pthread_internal.h +++ b/components/pthread/pthread_internal.h @@ -13,4 +13,4 @@ // limitations under the License. #pragma once -void pthread_internal_local_storage_destructor_callback(); +void pthread_internal_local_storage_destructor_callback(void); diff --git a/components/pthread/pthread_local_storage.c b/components/pthread/pthread_local_storage.c index ecf252e4c..557276847 100644 --- a/components/pthread/pthread_local_storage.c +++ b/components/pthread/pthread_local_storage.c @@ -166,7 +166,7 @@ void __wrap_vPortCleanUpTCB(void *tcb) #endif /* this function called from pthread_task_func for "early" cleanup of TLS in a pthread */ -void pthread_internal_local_storage_destructor_callback() +void pthread_internal_local_storage_destructor_callback(void) { void *tls = pvTaskGetThreadLocalStoragePointer(NULL, PTHREAD_TLS_INDEX); if (tls != NULL) { @@ -257,6 +257,6 @@ int pthread_setspecific(pthread_key_t key, const void *value) } /* Hook function to force linking this file */ -void pthread_include_pthread_local_storage_impl() +void pthread_include_pthread_local_storage_impl(void) { } diff --git a/components/sdmmc/test/test_sd.c b/components/sdmmc/test/test_sd.c index b1b418c95..29ce04a28 100644 --- a/components/sdmmc/test/test_sd.c +++ b/components/sdmmc/test/test_sd.c @@ -48,7 +48,7 @@ #define CD_WP_TEST_GPIO 18 -static void sd_test_board_power_on() +static void sd_test_board_power_on(void) { gpio_set_direction(SD_TEST_BOARD_VSEL_GPIO, GPIO_MODE_OUTPUT); gpio_set_level(SD_TEST_BOARD_VSEL_GPIO, SD_TEST_BOARD_VSEL_3V3); @@ -59,7 +59,7 @@ static void sd_test_board_power_on() usleep(SD_TEST_BOARD_PWR_ON_DELAY_MS * 1000); } -static void sd_test_board_power_off() +static void sd_test_board_power_off(void) { gpio_set_level(SD_TEST_BOARD_VSEL_EN_GPIO, 0); gpio_set_direction(SD_TEST_BOARD_VSEL_GPIO, GPIO_MODE_INPUT); diff --git a/components/sdmmc/test/test_sdio.c b/components/sdmmc/test/test_sdio.c index 56213d713..0e5be1d6f 100644 --- a/components/sdmmc/test/test_sdio.c +++ b/components/sdmmc/test/test_sdio.c @@ -126,7 +126,7 @@ static esp_err_t slave_slc_reg_write(sdmmc_card_t* card, uint32_t addr, uint32_t } /** Reset and put slave into download mode */ -static void reset_slave() +static void reset_slave(void) { const int pin_en = 18; const int pin_io0 = 19; diff --git a/components/soc/esp32/cpu_util.c b/components/soc/esp32/cpu_util.c index 83ae830b9..ed2c6361e 100644 --- a/components/soc/esp32/cpu_util.c +++ b/components/soc/esp32/cpu_util.c @@ -50,7 +50,7 @@ void IRAM_ATTR esp_cpu_reset(int cpu_id) cpu_id == 0 ? RTC_CNTL_SW_PROCPU_RST_M : RTC_CNTL_SW_APPCPU_RST_M); } -bool IRAM_ATTR esp_cpu_in_ocd_debug_mode() +bool IRAM_ATTR esp_cpu_in_ocd_debug_mode(void) { #if CONFIG_ESP32_DEBUG_OCDAWARE int dcr; diff --git a/components/soc/esp32/include/soc/cpu.h b/components/soc/esp32/include/soc/cpu.h index 190786a43..57ccd6e17 100644 --- a/components/soc/esp32/include/soc/cpu.h +++ b/components/soc/esp32/include/soc/cpu.h @@ -30,7 +30,7 @@ /** @brief Read current stack pointer address * */ -static inline void *get_sp() +static inline void *get_sp(void) { void *sp; asm volatile ("mov %0, sp;" : "=r" (sp)); @@ -52,7 +52,7 @@ static inline void cpu_write_itlb(unsigned vpn, unsigned attr) asm volatile ("witlb %1, %0; isync\n" :: "r" (vpn), "r" (attr)); } -static inline void cpu_init_memctl() +static inline void cpu_init_memctl(void) { #if XCHAL_ERRATUM_572 uint32_t memctl = XCHAL_CACHE_MEMCTL_DEFAULT; @@ -71,7 +71,7 @@ static inline void cpu_init_memctl() * 15 — no access, raise exception */ -static inline void cpu_configure_region_protection() +static inline void cpu_configure_region_protection(void) { const uint32_t pages_to_protect[] = {0x00000000, 0x80000000, 0xa0000000, 0xc0000000, 0xe0000000}; for (int i = 0; i < sizeof(pages_to_protect)/sizeof(pages_to_protect[0]); ++i) { @@ -108,7 +108,7 @@ void esp_cpu_reset(int cpu_id); * @note If "Make exception and panic handlers JTAG/OCD aware" * is disabled, this function always returns false. */ -bool esp_cpu_in_ocd_debug_mode(); +bool esp_cpu_in_ocd_debug_mode(void); /** * @brief Convert the PC register value to its true address diff --git a/components/soc/esp32/include/soc/rtc.h b/components/soc/esp32/include/soc/rtc.h index 4dd0db6e2..22d3601d3 100644 --- a/components/soc/esp32/include/soc/rtc.h +++ b/components/soc/esp32/include/soc/rtc.h @@ -176,7 +176,7 @@ void rtc_clk_init(rtc_clk_config_t cfg); * * @return XTAL frequency, one of rtc_xtal_freq_t */ -rtc_xtal_freq_t rtc_clk_xtal_freq_get(); +rtc_xtal_freq_t rtc_clk_xtal_freq_get(void); /** * @brief Update XTAL frequency @@ -197,13 +197,13 @@ void rtc_clk_32k_enable(bool en); /** * @brief Configure 32 kHz XTAL oscillator to accept external clock signal */ -void rtc_clk_32k_enable_external(); +void rtc_clk_32k_enable_external(void); /** * @brief Get the state of 32k XTAL oscillator * @return true if 32k XTAL oscillator has been enabled */ -bool rtc_clk_32k_enabled(); +bool rtc_clk_32k_enabled(void); /** * @brief Enable 32k oscillator, configuring it for fast startup time. @@ -239,13 +239,13 @@ void rtc_clk_8m_enable(bool clk_8m_en, bool d256_en); * @brief Get the state of 8 MHz internal oscillator * @return true if the oscillator is enabled */ -bool rtc_clk_8m_enabled(); +bool rtc_clk_8m_enabled(void); /** * @brief Get the state of /256 divider which is applied to 8MHz clock * @return true if the divided output is enabled */ -bool rtc_clk_8md256_enabled(); +bool rtc_clk_8md256_enabled(void); /** * @brief Enable or disable APLL @@ -276,7 +276,7 @@ void rtc_clk_slow_freq_set(rtc_slow_freq_t slow_freq); * @brief Get the RTC_SLOW_CLK source * @return currently selected clock source (one of rtc_slow_freq_t values) */ -rtc_slow_freq_t rtc_clk_slow_freq_get(); +rtc_slow_freq_t rtc_clk_slow_freq_get(void); /** * @brief Get the approximate frequency of RTC_SLOW_CLK, in Hz @@ -290,7 +290,7 @@ rtc_slow_freq_t rtc_clk_slow_freq_get(); * * @return RTC_SLOW_CLK frequency, in Hz */ -uint32_t rtc_clk_slow_freq_get_hz(); +uint32_t rtc_clk_slow_freq_get_hz(void); /** * @brief Select source for RTC_FAST_CLK @@ -302,7 +302,7 @@ void rtc_clk_fast_freq_set(rtc_fast_freq_t fast_freq); * @brief Get the RTC_FAST_CLK source * @return currently selected clock source (one of rtc_fast_freq_t values) */ -rtc_fast_freq_t rtc_clk_fast_freq_get(); +rtc_fast_freq_t rtc_clk_fast_freq_get(void); /** * @brief Switch CPU frequency @@ -355,7 +355,7 @@ void rtc_clk_cpu_freq_set_fast(rtc_cpu_freq_t cpu_freq) __attribute__((deprecate * * @return CPU frequency (one of rtc_cpu_freq_t values) */ -rtc_cpu_freq_t rtc_clk_cpu_freq_get() __attribute__((deprecated)); +rtc_cpu_freq_t rtc_clk_cpu_freq_get(void) __attribute__((deprecated)); /** * @brief Get corresponding frequency value for rtc_cpu_freq_t enum value @@ -444,7 +444,7 @@ uint32_t rtc_clk_cpu_freq_value(rtc_cpu_freq_t cpu_freq) __attribute__((depreca * rtc_clk_cpu_freq_set_config when a switch to XTAL is needed. * Assumes that XTAL frequency has been determined — don't call in startup code. */ - void rtc_clk_cpu_freq_set_xtal(); + void rtc_clk_cpu_freq_set_xtal(void); /** @@ -465,7 +465,7 @@ void rtc_clk_apb_freq_update(uint32_t apb_freq); * @brief Get the current stored APB frequency. * @return The APB frequency value as last set via rtc_clk_apb_freq_update(), in Hz. */ -uint32_t rtc_clk_apb_freq_get(); +uint32_t rtc_clk_apb_freq_get(void); #define RTC_CLK_CAL_FRACT 19 //!< Number of fractional bits in values returned by rtc_clk_cal @@ -522,7 +522,7 @@ uint64_t rtc_time_slowclk_to_us(uint64_t rtc_cycles, uint32_t period); * * @return current value of RTC counter */ -uint64_t rtc_time_get(); +uint64_t rtc_time_get(void); /** * @brief Busy loop until next RTC_SLOW_CLK cycle @@ -531,7 +531,7 @@ uint64_t rtc_time_get(); * In some cases (e.g. when RTC_SLOW_CLK cycle is very close), it may return * one RTC_SLOW_CLK cycle later. */ -void rtc_clk_wait_for_slow_cycle(); +void rtc_clk_wait_for_slow_cycle(void); /** * @brief sleep configuration for rtc_sleep_init function @@ -710,7 +710,7 @@ typedef struct rtc_vddsdio_config_s { * Otherwise, use default values and the level of MTDI bootstrapping pin. * @return currently used VDDSDIO configuration */ -rtc_vddsdio_config_t rtc_vddsdio_get_config(); +rtc_vddsdio_config_t rtc_vddsdio_get_config(void); /** * Set new VDDSDIO configuration using RTC registers. diff --git a/components/soc/esp32/rtc_clk.c b/components/soc/esp32/rtc_clk.c index 80a749b22..42640b32f 100644 --- a/components/soc/esp32/rtc_clk.c +++ b/components/soc/esp32/rtc_clk.c @@ -100,9 +100,9 @@ #define RTC_PLL_FREQ_320M 320 #define RTC_PLL_FREQ_480M 480 -static void rtc_clk_cpu_freq_to_8m(); -static void rtc_clk_bbpll_disable(); -static void rtc_clk_bbpll_enable(); +static void rtc_clk_cpu_freq_to_8m(void); +static void rtc_clk_bbpll_disable(void); +static void rtc_clk_bbpll_enable(void); static void rtc_clk_cpu_freq_to_pll_mhz(int cpu_freq_mhz); static bool rtc_clk_cpu_freq_from_mhz_internal(int mhz, rtc_cpu_freq_t* out_val); @@ -161,7 +161,7 @@ void rtc_clk_32k_enable(bool enable) } } -void rtc_clk_32k_enable_external() +void rtc_clk_32k_enable_external(void) { rtc_clk_32k_enable_common(XTAL_32K_EXT_DAC_VAL, XTAL_32K_EXT_DRES_VAL, XTAL_32K_EXT_DBIAS_VAL); } @@ -201,7 +201,7 @@ void rtc_clk_32k_bootstrap(uint32_t cycle) XTAL_32K_BOOTSTRAP_DRES_VAL, XTAL_32K_BOOTSTRAP_DBIAS_VAL); } -bool rtc_clk_32k_enabled() +bool rtc_clk_32k_enabled(void) { return GET_PERI_REG_MASK(RTC_IO_XTAL_32K_PAD_REG, RTC_IO_XPD_XTAL_32K) != 0; } @@ -224,12 +224,12 @@ void rtc_clk_8m_enable(bool clk_8m_en, bool d256_en) } } -bool rtc_clk_8m_enabled() +bool rtc_clk_8m_enabled(void) { return GET_PERI_REG_MASK(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_ENB_CK8M) == 0; } -bool rtc_clk_8md256_enabled() +bool rtc_clk_8md256_enabled(void) { return GET_PERI_REG_MASK(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_ENB_CK8M_DIV) == 0; } @@ -284,12 +284,12 @@ void rtc_clk_slow_freq_set(rtc_slow_freq_t slow_freq) ets_delay_us(DELAY_SLOW_CLK_SWITCH); } -rtc_slow_freq_t rtc_clk_slow_freq_get() +rtc_slow_freq_t rtc_clk_slow_freq_get(void) { return REG_GET_FIELD(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_ANA_CLK_RTC_SEL); } -uint32_t rtc_clk_slow_freq_get_hz() +uint32_t rtc_clk_slow_freq_get_hz(void) { switch(rtc_clk_slow_freq_get()) { case RTC_SLOW_FREQ_RTC: return RTC_SLOW_CLK_FREQ_150K; @@ -305,7 +305,7 @@ void rtc_clk_fast_freq_set(rtc_fast_freq_t fast_freq) ets_delay_us(DELAY_FAST_CLK_SWITCH); } -rtc_fast_freq_t rtc_clk_fast_freq_get() +rtc_fast_freq_t rtc_clk_fast_freq_get(void) { return REG_GET_FIELD(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_FAST_CLK_RTC_SEL); } @@ -435,7 +435,7 @@ void rtc_clk_cpu_freq_to_xtal(int freq, int div) } } -static void rtc_clk_cpu_freq_to_8m() +static void rtc_clk_cpu_freq_to_8m(void) { ets_update_cpu_frequency(8); REG_SET_FIELD(RTC_CNTL_REG, RTC_CNTL_DIG_DBIAS_WAK, DIG_DBIAS_XTAL); @@ -444,7 +444,7 @@ static void rtc_clk_cpu_freq_to_8m() rtc_clk_apb_freq_update(RTC_FAST_CLK_FREQ_8M); } -static void rtc_clk_bbpll_disable() +static void rtc_clk_bbpll_disable(void) { SET_PERI_REG_MASK(RTC_CNTL_OPTIONS0_REG, RTC_CNTL_BB_I2C_FORCE_PD | RTC_CNTL_BBPLL_FORCE_PD | @@ -459,7 +459,7 @@ static void rtc_clk_bbpll_disable() } } -static void rtc_clk_bbpll_enable() +static void rtc_clk_bbpll_enable(void) { CLEAR_PERI_REG_MASK(RTC_CNTL_OPTIONS0_REG, RTC_CNTL_BIAS_I2C_FORCE_PD | RTC_CNTL_BB_I2C_FORCE_PD | @@ -516,7 +516,7 @@ void rtc_clk_cpu_freq_set_fast(rtc_cpu_freq_t cpu_freq) rtc_clk_cpu_freq_set_config_fast(&config); } -void rtc_clk_cpu_freq_set_xtal() +void rtc_clk_cpu_freq_set_xtal(void) { int freq_mhz = (int) rtc_clk_xtal_freq_get(); @@ -525,7 +525,7 @@ void rtc_clk_cpu_freq_set_xtal() rtc_clk_bbpll_disable(); } -rtc_cpu_freq_t rtc_clk_cpu_freq_get() +rtc_cpu_freq_t rtc_clk_cpu_freq_get(void) { rtc_cpu_freq_config_t config; rtc_clk_cpu_freq_get_config(&config); @@ -766,7 +766,7 @@ void rtc_clk_cpu_freq_set_config_fast(const rtc_cpu_freq_config_t* config) } } -rtc_xtal_freq_t rtc_clk_xtal_freq_get() +rtc_xtal_freq_t rtc_clk_xtal_freq_get(void) { /* We may have already written XTAL value into RTC_XTAL_FREQ_REG */ uint32_t xtal_freq_reg = READ_PERI_REG(RTC_XTAL_FREQ_REG); @@ -790,7 +790,7 @@ void rtc_clk_apb_freq_update(uint32_t apb_freq) WRITE_PERI_REG(RTC_APB_FREQ_REG, clk_val_to_reg_val(apb_freq >> 12)); } -uint32_t rtc_clk_apb_freq_get() +uint32_t rtc_clk_apb_freq_get(void) { uint32_t freq_hz = reg_val_to_clk_val(READ_PERI_REG(RTC_APB_FREQ_REG)) << 12; // round to the nearest MHz @@ -802,4 +802,4 @@ uint32_t rtc_clk_apb_freq_get() /* Name used in libphy.a:phy_chip_v7.o * TODO: update the library to use rtc_clk_xtal_freq_get */ -rtc_xtal_freq_t rtc_get_xtal() __attribute__((alias("rtc_clk_xtal_freq_get"))); +rtc_xtal_freq_t rtc_get_xtal(void) __attribute__((alias("rtc_clk_xtal_freq_get"))); diff --git a/components/soc/esp32/rtc_clk_init.c b/components/soc/esp32/rtc_clk_init.c index a675d53f3..d1f128ffa 100644 --- a/components/soc/esp32/rtc_clk_init.c +++ b/components/soc/esp32/rtc_clk_init.c @@ -36,7 +36,7 @@ */ #define XTAL_FREQ_EST_CYCLES 10 -static rtc_xtal_freq_t rtc_clk_xtal_freq_estimate(); +static rtc_xtal_freq_t rtc_clk_xtal_freq_estimate(void); static const char* TAG = "rtc_clk_init"; @@ -140,7 +140,7 @@ void rtc_clk_init(rtc_clk_config_t cfg) rtc_clk_slow_freq_set(cfg.slow_freq); } -static rtc_xtal_freq_t rtc_clk_xtal_freq_estimate() +static rtc_xtal_freq_t rtc_clk_xtal_freq_estimate(void) { /* Enable 8M/256 clock if needed */ const bool clk_8m_enabled = rtc_clk_8m_enabled(); diff --git a/components/soc/esp32/rtc_init.c b/components/soc/esp32/rtc_init.c index e0cd4ba4a..942b9409a 100644 --- a/components/soc/esp32/rtc_init.c +++ b/components/soc/esp32/rtc_init.c @@ -97,7 +97,7 @@ void rtc_init(rtc_config_t cfg) } } -rtc_vddsdio_config_t rtc_vddsdio_get_config() +rtc_vddsdio_config_t rtc_vddsdio_get_config(void) { rtc_vddsdio_config_t result; uint32_t sdio_conf_reg = REG_READ(RTC_CNTL_SDIO_CONF_REG); diff --git a/components/soc/esp32/rtc_pm.c b/components/soc/esp32/rtc_pm.c index f951ee107..47baedf95 100644 --- a/components/soc/esp32/rtc_pm.c +++ b/components/soc/esp32/rtc_pm.c @@ -29,14 +29,14 @@ typedef enum{ /* These MAC-related functions are defined in the closed source part of * RTC library */ -extern void pm_mac_init(); -extern int pm_check_mac_idle(); -extern void pm_mac_deinit(); +extern void pm_mac_init(void); +extern int pm_check_mac_idle(void); +extern void pm_mac_deinit(void); /* This sleep-related function is called from the closed source part of RTC * library. */ -pm_sw_reject_t pm_set_sleep_mode(pm_sleep_mode_t sleep_mode, void(*pmac_save_params)()) +pm_sw_reject_t pm_set_sleep_mode(pm_sleep_mode_t sleep_mode, void(*pmac_save_params)(void)) { (void) pmac_save_params; /* unused */ diff --git a/components/soc/esp32/rtc_time.c b/components/soc/esp32/rtc_time.c index e64477564..a7dfdb248 100644 --- a/components/soc/esp32/rtc_time.c +++ b/components/soc/esp32/rtc_time.c @@ -140,7 +140,7 @@ uint64_t rtc_time_slowclk_to_us(uint64_t rtc_cycles, uint32_t period) return (rtc_cycles * period) >> RTC_CLK_CAL_FRACT; } -uint64_t rtc_time_get() +uint64_t rtc_time_get(void) { SET_PERI_REG_MASK(RTC_CNTL_TIME_UPDATE_REG, RTC_CNTL_TIME_UPDATE); while (GET_PERI_REG_MASK(RTC_CNTL_TIME_UPDATE_REG, RTC_CNTL_TIME_VALID) == 0) { @@ -152,7 +152,7 @@ uint64_t rtc_time_get() return t; } -void rtc_clk_wait_for_slow_cycle() +void rtc_clk_wait_for_slow_cycle(void) { REG_CLR_BIT(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_START_CYCLING | TIMG_RTC_CALI_START); REG_CLR_BIT(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_RDY); diff --git a/components/soc/esp32/rtc_wdt.c b/components/soc/esp32/rtc_wdt.c index 1b01ce304..facf8d444 100644 --- a/components/soc/esp32/rtc_wdt.c +++ b/components/soc/esp32/rtc_wdt.c @@ -16,34 +16,34 @@ #include "soc/rtc.h" -bool rtc_wdt_get_protect_status() +bool rtc_wdt_get_protect_status(void) { return READ_PERI_REG(RTC_CNTL_WDTWPROTECT_REG) != RTC_CNTL_WDT_WKEY_VALUE; } -void rtc_wdt_protect_off() +void rtc_wdt_protect_off(void) { WRITE_PERI_REG(RTC_CNTL_WDTWPROTECT_REG, RTC_CNTL_WDT_WKEY_VALUE); } -void rtc_wdt_protect_on() +void rtc_wdt_protect_on(void) { WRITE_PERI_REG(RTC_CNTL_WDTWPROTECT_REG, 0); } -void rtc_wdt_enable() +void rtc_wdt_enable(void) { REG_SET_BIT(RTC_CNTL_WDTFEED_REG, RTC_CNTL_WDT_FEED); SET_PERI_REG_MASK(RTC_CNTL_WDTCONFIG0_REG, RTC_CNTL_WDT_EN | RTC_CNTL_WDT_PAUSE_IN_SLP); } -void rtc_wdt_flashboot_mode_enable() +void rtc_wdt_flashboot_mode_enable(void) { REG_SET_BIT(RTC_CNTL_WDTCONFIG0_REG, RTC_CNTL_WDT_FLASHBOOT_MOD_EN); } -void rtc_wdt_disable() +void rtc_wdt_disable(void) { bool protect = rtc_wdt_get_protect_status(); if (protect) { @@ -61,7 +61,7 @@ void rtc_wdt_disable() } } -void rtc_wdt_feed() +void rtc_wdt_feed(void) { bool protect = rtc_wdt_get_protect_status(); if (protect) { @@ -145,7 +145,7 @@ esp_err_t rtc_wdt_set_length_of_reset_signal(rtc_wdt_reset_sig_t reset_src, rtc_ return ESP_OK; } -bool rtc_wdt_is_on() +bool rtc_wdt_is_on(void) { return (REG_GET_BIT(RTC_CNTL_WDTCONFIG0_REG, RTC_CNTL_WDT_EN) != 0) || (REG_GET_BIT(RTC_CNTL_WDTCONFIG0_REG, RTC_CNTL_WDT_FLASHBOOT_MOD_EN) != 0); } diff --git a/components/soc/esp32/test/test_rtc_clk.c b/components/soc/esp32/test/test_rtc_clk.c index 698303558..1c21a1af1 100644 --- a/components/soc/esp32/test/test_rtc_clk.c +++ b/components/soc/esp32/test/test_rtc_clk.c @@ -141,7 +141,7 @@ TEST_CASE("Test fast switching between PLL and XTAL", "[rtc_clk]") #define COUNT_TEST 3 #define TIMEOUT_TEST_MS (5 + CONFIG_ESP32_RTC_CLK_CAL_CYCLES / 16) -void stop_rtc_external_quartz(){ +void stop_rtc_external_quartz(void){ const uint8_t pin_32 = 32; const uint8_t pin_33 = 33; const uint8_t mask_32 = (1 << (pin_32 - 32)); diff --git a/components/soc/include/soc/rtc_wdt.h b/components/soc/include/soc/rtc_wdt.h index aae54530a..0ed2c9a7b 100644 --- a/components/soc/include/soc/rtc_wdt.h +++ b/components/soc/include/soc/rtc_wdt.h @@ -99,22 +99,22 @@ typedef enum { * @return * - True if the protect of RTC_WDT is set */ -bool rtc_wdt_get_protect_status(); +bool rtc_wdt_get_protect_status(void); /** * @brief Set protect of rtc_wdt. */ -void rtc_wdt_protect_on(); +void rtc_wdt_protect_on(void); /** * @brief Reset protect of rtc_wdt. */ -void rtc_wdt_protect_off(); +void rtc_wdt_protect_off(void); /** * @brief Enable rtc_wdt. */ -void rtc_wdt_enable(); +void rtc_wdt_enable(void); /** * @brief Enable the flash boot protection procedure for WDT. @@ -123,19 +123,19 @@ void rtc_wdt_enable(); * This function was added to be compatibility with the old bootloaders. * This mode is disabled in bootloader or using rtc_wdt_disable() function. */ -void rtc_wdt_flashboot_mode_enable(); +void rtc_wdt_flashboot_mode_enable(void); /** * @brief Disable rtc_wdt. */ -void rtc_wdt_disable(); +void rtc_wdt_disable(void); /** * @brief Reset counter rtc_wdt. * * It returns to stage 0 and its expiry counter restarts from 0. */ -void rtc_wdt_feed(); +void rtc_wdt_feed(void); /** * @brief Set time for required stage. @@ -191,7 +191,7 @@ esp_err_t rtc_wdt_set_length_of_reset_signal(rtc_wdt_reset_sig_t reset_src, rtc_ * @return * - True rtc_wdt is enabled */ -bool rtc_wdt_is_on(); +bool rtc_wdt_is_on(void); #ifdef __cplusplus } diff --git a/components/soc/include/soc/soc_memory_layout.h b/components/soc/include/soc/soc_memory_layout.h index de7c449d5..15556fcde 100644 --- a/components/soc/include/soc/soc_memory_layout.h +++ b/components/soc/include/soc/soc_memory_layout.h @@ -138,7 +138,7 @@ size_t soc_get_available_memory_regions(soc_memory_region_t *regions); * returned by soc_get_available_memory_regions(). Used to size the * array passed to that function. */ -size_t soc_get_available_memory_region_max_count(); +size_t soc_get_available_memory_region_max_count(void); inline static bool IRAM_ATTR esp_ptr_dma_capable(const void *p) { diff --git a/components/soc/src/memory_layout_utils.c b/components/soc/src/memory_layout_utils.c index b43865fd6..29f752b9d 100644 --- a/components/soc/src/memory_layout_utils.c +++ b/components/soc/src/memory_layout_utils.c @@ -34,14 +34,14 @@ extern int _data_start, _static_data_end, _iram_start, _iram_end; /* static DRAM & IRAM chunks */ static const size_t EXTRA_RESERVED_REGIONS = 2; -static size_t s_get_num_reserved_regions() +static size_t s_get_num_reserved_regions(void) { return ( ( &soc_reserved_memory_region_end - &soc_reserved_memory_region_start ) + EXTRA_RESERVED_REGIONS ); } -size_t soc_get_available_memory_region_max_count() +size_t soc_get_available_memory_region_max_count(void) { /* Worst-case: each reserved memory region splits an available region in two, so the maximum possible number of regions diff --git a/components/spi_flash/cache_utils.c b/components/spi_flash/cache_utils.c index b27b968ad..25f937d74 100644 --- a/components/spi_flash/cache_utils.c +++ b/components/spi_flash/cache_utils.c @@ -45,18 +45,18 @@ static volatile bool s_flash_op_complete = false; static volatile int s_flash_op_cpu = -1; #endif -void spi_flash_init_lock() +void spi_flash_init_lock(void) { s_flash_op_mutex = xSemaphoreCreateRecursiveMutex(); assert(s_flash_op_mutex != NULL); } -void spi_flash_op_lock() +void spi_flash_op_lock(void) { xSemaphoreTakeRecursive(s_flash_op_mutex, portMAX_DELAY); } -void spi_flash_op_unlock() +void spi_flash_op_unlock(void) { xSemaphoreGiveRecursive(s_flash_op_mutex); } @@ -90,7 +90,7 @@ void IRAM_ATTR spi_flash_op_block_func(void* arg) xTaskResumeAll(); } -void IRAM_ATTR spi_flash_disable_interrupts_caches_and_other_cpu() +void IRAM_ATTR spi_flash_disable_interrupts_caches_and_other_cpu(void) { spi_flash_op_lock(); @@ -141,7 +141,7 @@ void IRAM_ATTR spi_flash_disable_interrupts_caches_and_other_cpu() spi_flash_disable_cache(other_cpuid, &s_flash_op_cache_state[other_cpuid]); } -void IRAM_ATTR spi_flash_enable_interrupts_caches_and_other_cpu() +void IRAM_ATTR spi_flash_enable_interrupts_caches_and_other_cpu(void) { const uint32_t cpuid = xPortGetCoreID(); const uint32_t other_cpuid = (cpuid == 0) ? 1 : 0; @@ -178,7 +178,7 @@ void IRAM_ATTR spi_flash_enable_interrupts_caches_and_other_cpu() spi_flash_op_unlock(); } -void IRAM_ATTR spi_flash_disable_interrupts_caches_and_other_cpu_no_os() +void IRAM_ATTR spi_flash_disable_interrupts_caches_and_other_cpu_no_os(void) { const uint32_t cpuid = xPortGetCoreID(); const uint32_t other_cpuid = (cpuid == 0) ? 1 : 0; @@ -191,7 +191,7 @@ void IRAM_ATTR spi_flash_disable_interrupts_caches_and_other_cpu_no_os() spi_flash_disable_cache(cpuid, &s_flash_op_cache_state[cpuid]); } -void IRAM_ATTR spi_flash_enable_interrupts_caches_no_os() +void IRAM_ATTR spi_flash_enable_interrupts_caches_no_os(void) { const uint32_t cpuid = xPortGetCoreID(); @@ -203,36 +203,36 @@ void IRAM_ATTR spi_flash_enable_interrupts_caches_no_os() #else // CONFIG_FREERTOS_UNICORE -void spi_flash_init_lock() +void spi_flash_init_lock(void) { } -void spi_flash_op_lock() +void spi_flash_op_lock(void) { vTaskSuspendAll(); } -void spi_flash_op_unlock() +void spi_flash_op_unlock(void) { xTaskResumeAll(); } -void IRAM_ATTR spi_flash_disable_interrupts_caches_and_other_cpu() +void IRAM_ATTR spi_flash_disable_interrupts_caches_and_other_cpu(void) { spi_flash_op_lock(); esp_intr_noniram_disable(); spi_flash_disable_cache(0, &s_flash_op_cache_state[0]); } -void IRAM_ATTR spi_flash_enable_interrupts_caches_and_other_cpu() +void IRAM_ATTR spi_flash_enable_interrupts_caches_and_other_cpu(void) { spi_flash_restore_cache(0, s_flash_op_cache_state[0]); esp_intr_noniram_enable(); spi_flash_op_unlock(); } -void IRAM_ATTR spi_flash_disable_interrupts_caches_and_other_cpu_no_os() +void IRAM_ATTR spi_flash_disable_interrupts_caches_and_other_cpu_no_os(void) { // Kill interrupts that aren't located in IRAM esp_intr_noniram_disable(); @@ -240,7 +240,7 @@ void IRAM_ATTR spi_flash_disable_interrupts_caches_and_other_cpu_no_os() spi_flash_disable_cache(0, &s_flash_op_cache_state[0]); } -void IRAM_ATTR spi_flash_enable_interrupts_caches_no_os() +void IRAM_ATTR spi_flash_enable_interrupts_caches_no_os(void) { // Re-enable cache on this CPU spi_flash_restore_cache(0, s_flash_op_cache_state[0]); @@ -291,7 +291,7 @@ static void IRAM_ATTR spi_flash_restore_cache(uint32_t cpuid, uint32_t saved_sta } -IRAM_ATTR bool spi_flash_cache_enabled() +IRAM_ATTR bool spi_flash_cache_enabled(void) { bool result = (DPORT_REG_GET_BIT(DPORT_PRO_CACHE_CTRL_REG, DPORT_PRO_CACHE_ENABLE) != 0); #if portNUM_PROCESSORS == 2 diff --git a/components/spi_flash/cache_utils.h b/components/spi_flash/cache_utils.h index d482c4da7..9b272009f 100644 --- a/components/spi_flash/cache_utils.h +++ b/components/spi_flash/cache_utils.h @@ -23,30 +23,30 @@ */ // Init mutex protecting access to spi_flash_* APIs -void spi_flash_init_lock(); +void spi_flash_init_lock(void); // Take mutex protecting access to spi_flash_* APIs -void spi_flash_op_lock(); +void spi_flash_op_lock(void); // Release said mutex -void spi_flash_op_unlock(); +void spi_flash_op_unlock(void); // Suspend the scheduler on both CPUs, disable cache. // Contrary to its name this doesn't do anything with interrupts, yet. // Interrupt disabling capability will be added once we implement // interrupt allocation API. -void spi_flash_disable_interrupts_caches_and_other_cpu(); +void spi_flash_disable_interrupts_caches_and_other_cpu(void); // Enable cache, enable interrupts (to be added in future), resume scheduler -void spi_flash_enable_interrupts_caches_and_other_cpu(); +void spi_flash_enable_interrupts_caches_and_other_cpu(void); // Disables non-IRAM interrupt handlers on current CPU and caches on both CPUs. // This function is implied to be called when other CPU is not running or running code from IRAM. -void spi_flash_disable_interrupts_caches_and_other_cpu_no_os(); +void spi_flash_disable_interrupts_caches_and_other_cpu_no_os(void); // Enable cache, enable interrupts on current CPU. // This function is implied to be called when other CPU is not running or running code from IRAM. -void spi_flash_enable_interrupts_caches_no_os(); +void spi_flash_enable_interrupts_caches_no_os(void); // Flushes cache if address range has corresponding valid cache mappings // Recommended to use post flash program operation (erase or write) diff --git a/components/spi_flash/esp_flash_api.c b/components/spi_flash/esp_flash_api.c index 1ce52e47b..f064bcbdb 100644 --- a/components/spi_flash/esp_flash_api.c +++ b/components/spi_flash/esp_flash_api.c @@ -664,7 +664,7 @@ esp_err_t spi_flash_read(size_t src, void *dstv, size_t size) return spi_flash_translate_rc(err); } -esp_err_t spi_flash_unlock() +esp_err_t spi_flash_unlock(void) { esp_err_t err = esp_flash_set_chip_write_protect(NULL, false); return spi_flash_translate_rc(err); diff --git a/components/spi_flash/esp_flash_spi_init.c b/components/spi_flash/esp_flash_spi_init.c index ecd566686..c554f4a29 100644 --- a/components/spi_flash/esp_flash_spi_init.c +++ b/components/spi_flash/esp_flash_spi_init.c @@ -174,7 +174,7 @@ static DRAM_ATTR esp_flash_t default_chip = { esp_flash_t *esp_flash_default_chip = NULL; -esp_err_t esp_flash_init_default_chip() +esp_err_t esp_flash_init_default_chip(void) { memspi_host_config_t cfg = ESP_FLASH_HOST_CONFIG_DEFAULT(); //the host is already initialized, only do init for the data and load it to the host @@ -200,7 +200,7 @@ esp_err_t esp_flash_init_default_chip() return ESP_OK; } -esp_err_t esp_flash_app_init() +esp_err_t esp_flash_app_init(void) { return esp_flash_init_os_functions(&default_chip, 0); } diff --git a/components/spi_flash/flash_mmap.c b/components/spi_flash/flash_mmap.c index 76e2d025c..4af801292 100644 --- a/components/spi_flash/flash_mmap.c +++ b/components/spi_flash/flash_mmap.c @@ -62,7 +62,7 @@ static uint8_t s_mmap_page_refcnt[REGIONS_COUNT * PAGES_PER_REGION] = {0}; static uint32_t s_mmap_last_handle = 0; -static void IRAM_ATTR spi_flash_mmap_init() +static void IRAM_ATTR spi_flash_mmap_init(void) { if (s_mmap_page_refcnt[0] != 0) { return; /* mmap data already initialised */ @@ -268,7 +268,7 @@ void IRAM_ATTR spi_flash_munmap(spi_flash_mmap_handle_t handle) free(it); } -static void IRAM_ATTR NOINLINE_ATTR spi_flash_protected_mmap_init() +static void IRAM_ATTR NOINLINE_ATTR spi_flash_protected_mmap_init(void) { spi_flash_disable_interrupts_caches_and_other_cpu(); spi_flash_mmap_init(); @@ -284,7 +284,7 @@ static uint32_t IRAM_ATTR NOINLINE_ATTR spi_flash_protected_read_mmu_entry(int i return value; } -void spi_flash_mmap_dump() +void spi_flash_mmap_dump(void) { spi_flash_protected_mmap_init(); diff --git a/components/spi_flash/flash_ops.c b/components/spi_flash/flash_ops.c index 1b06447b1..41405c8d0 100644 --- a/components/spi_flash/flash_ops.c +++ b/components/spi_flash/flash_ops.c @@ -123,7 +123,7 @@ static __attribute__((unused)) bool is_safe_write_address(size_t addr, size_t si } -void spi_flash_init() +void spi_flash_init(void) { spi_flash_init_lock(); #if CONFIG_SPI_FLASH_ENABLE_COUNTERS @@ -136,38 +136,38 @@ void IRAM_ATTR spi_flash_guard_set(const spi_flash_guard_funcs_t *funcs) s_flash_guard_ops = funcs; } -const spi_flash_guard_funcs_t *IRAM_ATTR spi_flash_guard_get() +const spi_flash_guard_funcs_t *IRAM_ATTR spi_flash_guard_get(void) { return s_flash_guard_ops; } -size_t IRAM_ATTR spi_flash_get_chip_size() +size_t IRAM_ATTR spi_flash_get_chip_size(void) { return g_rom_flashchip.chip_size; } -static inline void IRAM_ATTR spi_flash_guard_start() +static inline void IRAM_ATTR spi_flash_guard_start(void) { if (s_flash_guard_ops && s_flash_guard_ops->start) { s_flash_guard_ops->start(); } } -static inline void IRAM_ATTR spi_flash_guard_end() +static inline void IRAM_ATTR spi_flash_guard_end(void) { if (s_flash_guard_ops && s_flash_guard_ops->end) { s_flash_guard_ops->end(); } } -static inline void IRAM_ATTR spi_flash_guard_op_lock() +static inline void IRAM_ATTR spi_flash_guard_op_lock(void) { if (s_flash_guard_ops && s_flash_guard_ops->op_lock) { s_flash_guard_ops->op_lock(); } } -static inline void IRAM_ATTR spi_flash_guard_op_unlock() +static inline void IRAM_ATTR spi_flash_guard_op_unlock(void) { if (s_flash_guard_ops && s_flash_guard_ops->op_unlock) { s_flash_guard_ops->op_unlock(); @@ -175,7 +175,7 @@ static inline void IRAM_ATTR spi_flash_guard_op_unlock() } #ifdef CONFIG_SPI_FLASH_USE_LEGACY_IMPL -static esp_rom_spiflash_result_t IRAM_ATTR spi_flash_unlock() +static esp_rom_spiflash_result_t IRAM_ATTR spi_flash_unlock(void) { static bool unlocked = false; if (!unlocked) { @@ -190,7 +190,7 @@ static esp_rom_spiflash_result_t IRAM_ATTR spi_flash_unlock() return ESP_ROM_SPIFLASH_RESULT_OK; } #else -static esp_rom_spiflash_result_t IRAM_ATTR spi_flash_unlock() +static esp_rom_spiflash_result_t IRAM_ATTR spi_flash_unlock(void) { esp_err_t err = esp_flash_set_chip_write_protect(NULL, false); if (err != ESP_OK) { @@ -677,17 +677,17 @@ static inline void dump_counter(spi_flash_counter_t *counter, const char *name) counter->count, counter->time, counter->bytes); } -const spi_flash_counters_t *spi_flash_get_counters() +const spi_flash_counters_t *spi_flash_get_counters(void) { return &s_flash_stats; } -void spi_flash_reset_counters() +void spi_flash_reset_counters(void) { memset(&s_flash_stats, 0, sizeof(s_flash_stats)); } -void spi_flash_dump_counters() +void spi_flash_dump_counters(void) { dump_counter(&s_flash_stats.read, "read "); dump_counter(&s_flash_stats.write, "write"); diff --git a/components/spi_flash/include/esp_flash.h b/components/spi_flash/include/esp_flash.h index 86737f791..efcfccc24 100644 --- a/components/spi_flash/include/esp_flash.h +++ b/components/spi_flash/include/esp_flash.h @@ -271,7 +271,7 @@ extern esp_flash_t *esp_flash_default_chip; * * Called by OS startup code. You do not need to call this in your own applications. */ -esp_err_t esp_flash_init_default_chip(); +esp_err_t esp_flash_init_default_chip(void); /** * Enable OS-level SPI flash protections in IDF @@ -280,7 +280,7 @@ esp_err_t esp_flash_init_default_chip(); * * @return ESP_OK if success, otherwise failed. See return value of ``esp_flash_init_os_functions``. */ -esp_err_t esp_flash_app_init(); +esp_err_t esp_flash_app_init(void); /** * Enable OS-level SPI flash for a specific chip. diff --git a/components/spi_flash/include/esp_spi_flash.h b/components/spi_flash/include/esp_spi_flash.h index 795142f4a..33bdc4d83 100644 --- a/components/spi_flash/include/esp_spi_flash.h +++ b/components/spi_flash/include/esp_spi_flash.h @@ -41,7 +41,7 @@ extern "C" { * no need to call it from application code. * */ -void spi_flash_init(); +void spi_flash_init(void); /** * @brief Get flash chip size, as set in binary image header @@ -50,7 +50,7 @@ void spi_flash_init(); * * @return size of flash chip, in bytes */ -size_t spi_flash_get_chip_size(); +size_t spi_flash_get_chip_size(void); /** * @brief Erase the Flash sector. @@ -238,7 +238,7 @@ void spi_flash_munmap(spi_flash_mmap_handle_t handle); * of pages allocated to each handle. It also lists all non-zero entries of * MMU table and corresponding reference counts. */ -void spi_flash_mmap_dump(); +void spi_flash_mmap_dump(void); /** * @brief get free pages number which can be mmap @@ -293,7 +293,7 @@ const void *spi_flash_phys2cache(size_t phys_offs, spi_flash_mmap_memory_t memor * * @return true if both CPUs have flash cache enabled, false otherwise. */ -bool spi_flash_cache_enabled(); +bool spi_flash_cache_enabled(void); /** * @brief SPI flash critical section enter function. @@ -374,7 +374,7 @@ void spi_flash_guard_set(const spi_flash_guard_funcs_t* funcs); * @return The guard functions that were set via spi_flash_guard_set(). These functions * can be called if implementing custom low-level SPI flash operations. */ -const spi_flash_guard_funcs_t *spi_flash_guard_get(); +const spi_flash_guard_funcs_t *spi_flash_guard_get(void); /** * @brief Default OS-aware flash access guard functions @@ -409,12 +409,12 @@ typedef struct { /** * @brief Reset SPI flash operation counters */ -void spi_flash_reset_counters(); +void spi_flash_reset_counters(void); /** * @brief Print SPI flash operation counters */ -void spi_flash_dump_counters(); +void spi_flash_dump_counters(void); /** * @brief Return current SPI flash operation counters @@ -422,7 +422,7 @@ void spi_flash_dump_counters(); * @return pointer to the spi_flash_counters_t structure holding values * of the operation counters */ -const spi_flash_counters_t* spi_flash_get_counters(); +const spi_flash_counters_t* spi_flash_get_counters(void); #endif //CONFIG_SPI_FLASH_ENABLE_COUNTERS diff --git a/components/spi_flash/partition.c b/components/spi_flash/partition.c index f31705c81..14de32c9f 100644 --- a/components/spi_flash/partition.c +++ b/components/spi_flash/partition.c @@ -54,7 +54,7 @@ typedef struct esp_partition_iterator_opaque_ { static esp_partition_iterator_opaque_t* iterator_create(esp_partition_type_t type, esp_partition_subtype_t subtype, const char* label); -static esp_err_t load_partitions(); +static esp_err_t load_partitions(void); static SLIST_HEAD(partition_list_head_, partition_list_item_) s_partition_list = @@ -146,7 +146,7 @@ static esp_partition_iterator_opaque_t* iterator_create(esp_partition_type_t typ // Create linked list of partition_list_item_t structures. // This function is called only once, with s_partition_list_lock taken. -static esp_err_t load_partitions() +static esp_err_t load_partitions(void) { const uint32_t* ptr; spi_flash_mmap_handle_t handle; diff --git a/components/spi_flash/sim/flash_mock.cpp b/components/spi_flash/sim/flash_mock.cpp index 1a275d518..b089e22dc 100644 --- a/components/spi_flash/sim/flash_mock.cpp +++ b/components/spi_flash/sim/flash_mock.cpp @@ -65,7 +65,7 @@ extern "C" void spi_flash_munmap(spi_flash_mmap_handle_t handle) return; } -extern "C" int spi_flash_get_total_erase_cycles() +extern "C" int spi_flash_get_total_erase_cycles(void) { return spiflash.get_total_erase_cycles(); } diff --git a/components/spi_flash/sim/flash_mock_util.c b/components/spi_flash/sim/flash_mock_util.c index a22b2854c..770600e64 100644 --- a/components/spi_flash/sim/flash_mock_util.c +++ b/components/spi_flash/sim/flash_mock_util.c @@ -16,42 +16,42 @@ bool spi_flash_check_and_flush_cache(size_t start_addr, size_t length) return true; } -esp_rom_spiflash_result_t esp_rom_spiflash_unlock() +esp_rom_spiflash_result_t esp_rom_spiflash_unlock(void) { return ESP_ROM_SPIFLASH_RESULT_OK; } -void spi_flash_init_lock() +void spi_flash_init_lock(void) { return; } -void spi_flash_op_lock() +void spi_flash_op_lock(void) { return; } -void spi_flash_op_unlock() +void spi_flash_op_unlock(void) { return; } -void spi_flash_disable_interrupts_caches_and_other_cpu() +void spi_flash_disable_interrupts_caches_and_other_cpu(void) { return; } -void spi_flash_enable_interrupts_caches_and_other_cpu() +void spi_flash_enable_interrupts_caches_and_other_cpu(void) { return; } -void spi_flash_disable_interrupts_caches_and_other_cpu_no_os() +void spi_flash_disable_interrupts_caches_and_other_cpu_no_os(void) { return; } -void spi_flash_enable_interrupts_caches_no_os() +void spi_flash_enable_interrupts_caches_no_os(void) { return; } diff --git a/components/spi_flash/sim/stubs/log/log.c b/components/spi_flash/sim/stubs/log/log.c index 5d606d357..4c8dc7802 100644 --- a/components/spi_flash/sim/stubs/log/log.c +++ b/components/spi_flash/sim/stubs/log/log.c @@ -15,7 +15,7 @@ void esp_log_write(esp_log_level_t level, va_end(arg); } -uint32_t esp_log_timestamp() +uint32_t esp_log_timestamp(void) { return 0; } diff --git a/components/spi_flash/spi_flash_rom_patch.c b/components/spi_flash/spi_flash_rom_patch.c index adf62fa57..af3d5d47d 100644 --- a/components/spi_flash/spi_flash_rom_patch.c +++ b/components/spi_flash/spi_flash_rom_patch.c @@ -53,7 +53,7 @@ esp_rom_spiflash_result_t esp_rom_spiflash_wait_idle(esp_rom_spiflash_chip_t *sp about interrupts, CPU coordination, flash mapping. However some of the functions in esp_spi_flash.c call it. */ -esp_rom_spiflash_result_t esp_rom_spiflash_unlock() +esp_rom_spiflash_result_t esp_rom_spiflash_unlock(void) { uint32_t status; @@ -349,7 +349,7 @@ static void spi_cache_mode_switch(uint32_t modebit) } -esp_rom_spiflash_result_t esp_rom_spiflash_lock() +esp_rom_spiflash_result_t esp_rom_spiflash_lock(void) { uint32_t status; @@ -401,7 +401,7 @@ esp_rom_spiflash_result_t esp_rom_spiflash_config_readmode(esp_rom_spiflash_read return ESP_ROM_SPIFLASH_RESULT_OK; } -esp_rom_spiflash_result_t esp_rom_spiflash_erase_chip() +esp_rom_spiflash_result_t esp_rom_spiflash_erase_chip(void) { if ( ESP_ROM_SPIFLASH_RESULT_OK != esp_rom_spiflash_enable_write(&g_rom_spiflash_chip)) { return ESP_ROM_SPIFLASH_RESULT_ERR; diff --git a/components/spi_flash/test/test_esp_flash.c b/components/spi_flash/test/test_esp_flash.c index bf1384545..49d144c9c 100644 --- a/components/spi_flash/test/test_esp_flash.c +++ b/components/spi_flash/test/test_esp_flash.c @@ -147,7 +147,7 @@ static void setup_new_chip(esp_flash_read_mode_t io_mode, esp_flash_speed_t spee TEST_ESP_OK(err); } -void teardown_test_chip() +void teardown_test_chip(void) { spi_bus_remove_flash_device(test_chip); test_chip = NULL; diff --git a/components/spi_flash/test/test_flash_encryption.c b/components/spi_flash/test/test_flash_encryption.c index 16579930c..ea647f336 100644 --- a/components/spi_flash/test/test_flash_encryption.c +++ b/components/spi_flash/test/test_flash_encryption.c @@ -14,7 +14,7 @@ static void verify_erased_flash(size_t offset, size_t length); static size_t start; -static void setup_tests() +static void setup_tests(void) { if (start == 0) { const esp_partition_t *part = get_test_data_partition(); diff --git a/components/spi_flash/test/test_mmap.c b/components/spi_flash/test/test_mmap.c index fe14a8be0..52a5be1f3 100644 --- a/components/spi_flash/test/test_mmap.c +++ b/components/spi_flash/test/test_mmap.c @@ -21,7 +21,7 @@ static uint32_t end; static spi_flash_mmap_handle_t handle1, handle2, handle3; -static void setup_mmap_tests() +static void setup_mmap_tests(void) { if (start == 0) { const esp_partition_t *part = get_test_data_partition(); diff --git a/components/spi_flash/test/test_read_write.c b/components/spi_flash/test/test_read_write.c index febe95bf8..e780b6e2f 100644 --- a/components/spi_flash/test/test_read_write.c +++ b/components/spi_flash/test/test_read_write.c @@ -31,7 +31,7 @@ /* Base offset in flash for tests. */ static size_t start; -static void setup_tests() +static void setup_tests(void) { if (start == 0) { const esp_partition_t *part = get_test_data_partition(); diff --git a/components/spiffs/test/test_spiffs.c b/components/spiffs/test/test_spiffs.c index b5dc129e3..34a2de874 100644 --- a/components/spiffs/test/test_spiffs.c +++ b/components/spiffs/test/test_spiffs.c @@ -448,7 +448,7 @@ void test_spiffs_concurrent(const char* filename_prefix) } -static void test_setup() +static void test_setup(void) { esp_vfs_spiffs_conf_t conf = { .base_path = "/spiffs", @@ -460,7 +460,7 @@ static void test_setup() TEST_ESP_OK(esp_vfs_spiffs_register(&conf)); } -static void test_teardown() +static void test_teardown(void) { TEST_ESP_OK(esp_vfs_spiffs_unregister(spiffs_test_partition_label)); } diff --git a/components/tcp_transport/include/esp_transport.h b/components/tcp_transport/include/esp_transport.h index 9dd7ff449..39e694f05 100644 --- a/components/tcp_transport/include/esp_transport.h +++ b/components/tcp_transport/include/esp_transport.h @@ -40,7 +40,7 @@ typedef struct esp_tls_last_error* esp_tls_error_handle_t; * * @return A handle can hold all transports */ -esp_transport_list_handle_t esp_transport_list_init(); +esp_transport_list_handle_t esp_transport_list_init(void); /** * @brief Cleanup and free all transports, include itself, @@ -93,7 +93,7 @@ esp_transport_handle_t esp_transport_list_get_transport(esp_transport_list_handl * * @return The transport handle */ -esp_transport_handle_t esp_transport_init(); +esp_transport_handle_t esp_transport_init(void); /** * @brief Cleanup and free memory the transport diff --git a/components/tcp_transport/include/esp_transport_ssl.h b/components/tcp_transport/include/esp_transport_ssl.h index 0f83c1d6e..330b68518 100644 --- a/components/tcp_transport/include/esp_transport_ssl.h +++ b/components/tcp_transport/include/esp_transport_ssl.h @@ -27,7 +27,7 @@ extern "C" { * * @return the allocated esp_transport_handle_t, or NULL if the handle can not be allocated */ -esp_transport_handle_t esp_transport_ssl_init(); +esp_transport_handle_t esp_transport_ssl_init(void); /** * @brief Set SSL certificate data (as PEM format). diff --git a/components/tcp_transport/include/esp_transport_tcp.h b/components/tcp_transport/include/esp_transport_tcp.h index 57ad45330..7a283fe9d 100644 --- a/components/tcp_transport/include/esp_transport_tcp.h +++ b/components/tcp_transport/include/esp_transport_tcp.h @@ -26,7 +26,7 @@ extern "C" { * * @return the allocated esp_transport_handle_t, or NULL if the handle can not be allocated */ -esp_transport_handle_t esp_transport_tcp_init(); +esp_transport_handle_t esp_transport_tcp_init(void); #ifdef __cplusplus diff --git a/components/tcp_transport/transport.c b/components/tcp_transport/transport.c index b48acf908..d5bc57bb4 100644 --- a/components/tcp_transport/transport.c +++ b/components/tcp_transport/transport.c @@ -70,7 +70,7 @@ static esp_transport_handle_t esp_transport_get_default_parent(esp_transport_han return t; } -esp_transport_list_handle_t esp_transport_list_init() +esp_transport_list_handle_t esp_transport_list_init(void) { esp_transport_list_handle_t transport = calloc(1, sizeof(esp_transport_internal_t)); ESP_TRANSPORT_MEM_CHECK(TAG, transport, return NULL); @@ -131,7 +131,7 @@ esp_err_t esp_transport_list_clean(esp_transport_list_handle_t h) return ESP_OK; } -esp_transport_handle_t esp_transport_init() +esp_transport_handle_t esp_transport_init(void) { esp_transport_handle_t t = calloc(1, sizeof(struct esp_transport_item_t)); ESP_TRANSPORT_MEM_CHECK(TAG, t, return NULL); diff --git a/components/tcp_transport/transport_ssl.c b/components/tcp_transport/transport_ssl.c index 1651a2f87..e05802930 100644 --- a/components/tcp_transport/transport_ssl.c +++ b/components/tcp_transport/transport_ssl.c @@ -204,7 +204,7 @@ void esp_transport_ssl_skip_common_name_check(esp_transport_handle_t t) } } -esp_transport_handle_t esp_transport_ssl_init() +esp_transport_handle_t esp_transport_ssl_init(void) { esp_transport_handle_t t = esp_transport_init(); transport_ssl_t *ssl = calloc(1, sizeof(transport_ssl_t)); diff --git a/components/tcp_transport/transport_tcp.c b/components/tcp_transport/transport_tcp.c index ff6925b2d..6de1d2237 100644 --- a/components/tcp_transport/transport_tcp.c +++ b/components/tcp_transport/transport_tcp.c @@ -153,7 +153,7 @@ static esp_err_t tcp_destroy(esp_transport_handle_t t) return 0; } -esp_transport_handle_t esp_transport_tcp_init() +esp_transport_handle_t esp_transport_tcp_init(void) { esp_transport_handle_t t = esp_transport_init(); transport_tcp_t *tcp = calloc(1, sizeof(transport_tcp_t)); diff --git a/components/tcpip_adapter/event_handlers.c b/components/tcpip_adapter/event_handlers.c index d22d18a05..5e3717c56 100644 --- a/components/tcpip_adapter/event_handlers.c +++ b/components/tcpip_adapter/event_handlers.c @@ -198,7 +198,7 @@ static void handle_sta_disconnected(void *arg, esp_event_base_t base, int32_t ev } -esp_err_t tcpip_adapter_set_default_wifi_handlers() +esp_err_t tcpip_adapter_set_default_wifi_handlers(void) { esp_err_t err; err = esp_event_handler_register(WIFI_EVENT, WIFI_EVENT_STA_START, handle_sta_start, NULL); @@ -248,7 +248,7 @@ fail: return err; } -esp_err_t tcpip_adapter_clear_default_wifi_handlers() +esp_err_t tcpip_adapter_clear_default_wifi_handlers(void) { esp_event_handler_unregister(WIFI_EVENT, WIFI_EVENT_STA_START, handle_sta_start); esp_event_handler_unregister(WIFI_EVENT, WIFI_EVENT_STA_STOP, handle_sta_stop); @@ -262,7 +262,7 @@ esp_err_t tcpip_adapter_clear_default_wifi_handlers() return ESP_OK; } -esp_err_t tcpip_adapter_set_default_eth_handlers() +esp_err_t tcpip_adapter_set_default_eth_handlers(void) { esp_err_t err; err = esp_event_handler_register(ETH_EVENT, ETHERNET_EVENT_START, handle_eth_start, NULL); @@ -297,7 +297,7 @@ fail: return err; } -esp_err_t tcpip_adapter_clear_default_eth_handlers() +esp_err_t tcpip_adapter_clear_default_eth_handlers(void) { esp_event_handler_unregister(ETH_EVENT, ETHERNET_EVENT_START, handle_eth_start); esp_event_handler_unregister(ETH_EVENT, ETHERNET_EVENT_STOP, handle_eth_stop); diff --git a/components/tcpip_adapter/include/tcpip_adapter.h b/components/tcpip_adapter/include/tcpip_adapter.h index 4c0a4af4f..f880511f7 100644 --- a/components/tcpip_adapter/include/tcpip_adapter.h +++ b/components/tcpip_adapter/include/tcpip_adapter.h @@ -714,7 +714,7 @@ esp_err_t tcpip_adapter_test_start(uint8_t *mac, tcpip_adapter_ip_info_t *ip_inf * - ESP_OK on success * - one of the errors from esp_event on failure */ -esp_err_t tcpip_adapter_set_default_eth_handlers(); +esp_err_t tcpip_adapter_set_default_eth_handlers(void); /** * @brief Uninstall default event handlers for Ethernet interface @@ -722,7 +722,7 @@ esp_err_t tcpip_adapter_set_default_eth_handlers(); * - ESP_OK on success * - one of the errors from esp_event on failure */ -esp_err_t tcpip_adapter_clear_default_eth_handlers(); +esp_err_t tcpip_adapter_clear_default_eth_handlers(void); /** * @brief Install default event handlers for Wi-Fi interfaces (station and AP) @@ -730,7 +730,7 @@ esp_err_t tcpip_adapter_clear_default_eth_handlers(); * - ESP_OK on success * - one of the errors from esp_event on failure */ -esp_err_t tcpip_adapter_set_default_wifi_handlers(); +esp_err_t tcpip_adapter_set_default_wifi_handlers(void); /** * @brief Uninstall default event handlers for Wi-Fi interfaces (station and AP) @@ -738,7 +738,7 @@ esp_err_t tcpip_adapter_set_default_wifi_handlers(); * - ESP_OK on success * - one of the errors from esp_event on failure */ -esp_err_t tcpip_adapter_clear_default_wifi_handlers(); +esp_err_t tcpip_adapter_clear_default_wifi_handlers(void); /** * @brief Search nefit index through netif interface diff --git a/components/unity/include/unity_test_runner.h b/components/unity/include/unity_test_runner.h index 8f41eb83d..a9a1fae49 100644 --- a/components/unity/include/unity_test_runner.h +++ b/components/unity/include/unity_test_runner.h @@ -168,7 +168,7 @@ void unity_run_test_by_name(const char *name); void unity_run_tests_by_tag(const char *tag, bool invert); -void unity_run_all_tests(); +void unity_run_all_tests(void); -void unity_run_menu(); +void unity_run_menu(void); diff --git a/components/unity/unity_port_esp32.c b/components/unity/unity_port_esp32.c index 9c1370007..2517cd94c 100644 --- a/components/unity/unity_port_esp32.c +++ b/components/unity/unity_port_esp32.c @@ -31,7 +31,7 @@ void unity_putc(int c) } } -void unity_flush() +void unity_flush(void) { uart_tx_wait_idle(CONFIG_ESP_CONSOLE_UART_NUM); } diff --git a/components/unity/unity_runner.c b/components/unity/unity_runner.c index e88840d2f..3c07b250f 100644 --- a/components/unity/unity_runner.c +++ b/components/unity/unity_runner.c @@ -178,7 +178,7 @@ void unity_run_test_by_name(const char *name) } } -void unity_run_all_tests() +void unity_run_all_tests(void) { for (const test_desc_t *test = s_unity_tests_first; test != NULL; test = test->next) { unity_run_single_test(test); @@ -265,7 +265,7 @@ static int get_test_count(void) return test_counter; } -void unity_run_menu() +void unity_run_menu(void) { UNITY_PRINT_EOL(); UNITY_PRINT_EOL(); diff --git a/components/vfs/include/esp_vfs_dev.h b/components/vfs/include/esp_vfs_dev.h index b330b4c56..95daaa61f 100644 --- a/components/vfs/include/esp_vfs_dev.h +++ b/components/vfs/include/esp_vfs_dev.h @@ -34,7 +34,7 @@ typedef enum { * * This function is called from startup code to enable serial output */ -void esp_vfs_dev_uart_register(); +void esp_vfs_dev_uart_register(void); /** * @brief Set the line endings expected to be received on UART diff --git a/components/vfs/test/test_vfs_access.c b/components/vfs/test/test_vfs_access.c index 02e7d56f8..ed691f998 100644 --- a/components/vfs/test/test_vfs_access.c +++ b/components/vfs/test/test_vfs_access.c @@ -58,7 +58,7 @@ TEST_CASE("Can use access() for UART", "[vfs]") uart_driver_delete(UART_NUM_2); } -static inline void test_spi_flash_setup() +static inline void test_spi_flash_setup(void) { esp_vfs_fat_sdmmc_mount_config_t mount_config = { .format_if_mount_failed = true, @@ -68,7 +68,7 @@ static inline void test_spi_flash_setup() TEST_ESP_OK(esp_vfs_fat_spiflash_mount("/spiflash", NULL, &mount_config, &test_wl_handle)); } -static inline void test_spi_flash_teardown() +static inline void test_spi_flash_teardown(void) { TEST_ESP_OK(esp_vfs_fat_spiflash_unmount("/spiflash", test_wl_handle)); } diff --git a/components/vfs/test/test_vfs_select.c b/components/vfs/test/test_vfs_select.c index c8ff500da..bea17242e 100644 --- a/components/vfs/test/test_vfs_select.c +++ b/components/vfs/test/test_vfs_select.c @@ -33,7 +33,7 @@ typedef struct { static const char message[] = "Hello world!"; -static int open_dummy_socket() +static int open_dummy_socket(void) { const struct addrinfo hints = { .ai_family = AF_INET, @@ -51,7 +51,7 @@ static int open_dummy_socket() return dummy_socket_fd; } -static int socket_init() +static int socket_init(void) { const struct addrinfo hints = { .ai_family = AF_INET, @@ -83,7 +83,7 @@ static int socket_init() return socket_fd; } -static void uart1_init() +static void uart1_init(void) { uart_config_t uart_config = { .baud_rate = 115200, diff --git a/components/vfs/test/test_vfs_uart.c b/components/vfs/test/test_vfs_uart.c index 5c3d3f1d6..262eb4f08 100644 --- a/components/vfs/test/test_vfs_uart.c +++ b/components/vfs/test/test_vfs_uart.c @@ -39,7 +39,7 @@ static void fwrite_str_loopback(const char* str, size_t size) UART0.conf0.loopback = 0; } -static void flush_stdin_stdout() +static void flush_stdin_stdout(void) { vTaskDelay(10 / portTICK_PERIOD_MS); char *bitbucket = (char*) 0x3f000000; diff --git a/components/vfs/vfs.c b/components/vfs/vfs.c index 0fc5aead3..c604b0973 100644 --- a/components/vfs/vfs.c +++ b/components/vfs/vfs.c @@ -1249,7 +1249,7 @@ int esp_vfs_poll(struct pollfd *fds, nfds_t nfds, int timeout) return ret; } -void vfs_include_syscalls_impl() +void vfs_include_syscalls_impl(void) { // Linker hook function, exists to make the linker examine this fine } diff --git a/components/vfs/vfs_uart.c b/components/vfs/vfs_uart.c index 5cb179a4a..d996e9eeb 100644 --- a/components/vfs/vfs_uart.c +++ b/components/vfs/vfs_uart.c @@ -123,7 +123,7 @@ static fd_set *_writefds_orig = NULL; static fd_set *_errorfds_orig = NULL; -static void uart_end_select(); +static void uart_end_select(void); static int uart_open(const char * path, int flags, int mode) @@ -432,7 +432,7 @@ static esp_err_t uart_start_select(int nfds, fd_set *readfds, fd_set *writefds, return ESP_OK; } -static void uart_end_select() +static void uart_end_select(void) { portENTER_CRITICAL(uart_get_selectlock()); for (int i = 0; i < UART_NUM; ++i) { @@ -915,7 +915,7 @@ static int uart_tcflush(int fd, int select) } #endif // CONFIG_VFS_SUPPORT_TERMIOS -void esp_vfs_dev_uart_register() +void esp_vfs_dev_uart_register(void) { esp_vfs_t vfs = { .flags = ESP_VFS_FLAG_DEFAULT, diff --git a/components/wpa_supplicant/src/esp_supplicant/esp_wpa_main.c b/components/wpa_supplicant/src/esp_supplicant/esp_wpa_main.c index d565cd1cb..6f37b1850 100644 --- a/components/wpa_supplicant/src/esp_supplicant/esp_wpa_main.c +++ b/components/wpa_supplicant/src/esp_supplicant/esp_wpa_main.c @@ -71,7 +71,7 @@ void wpa_deauthenticate(u8 reason_code) esp_wifi_deauthenticate_internal(reason_code); } -void wpa_config_profile() +void wpa_config_profile(void) { if (esp_wifi_sta_prof_is_wpa_internal()) { wpa_set_profile(WPA_PROTO_WPA, esp_wifi_sta_get_prof_authmode_internal()); @@ -102,7 +102,7 @@ void wpa_config_assoc_ie(u8 proto, u8 *assoc_buf, u32 assoc_wpa_ie_len) } } -void wpa_neg_complete() +void wpa_neg_complete(void) { esp_wifi_auth_done_internal(); } diff --git a/examples/bluetooth/ble_ancs/main/ble_ancs_demo.c b/examples/bluetooth/ble_ancs/main/ble_ancs_demo.c index 294a8a106..4dc89b83a 100644 --- a/examples/bluetooth/ble_ancs/main/ble_ancs_demo.c +++ b/examples/bluetooth/ble_ancs/main/ble_ancs_demo.c @@ -596,7 +596,7 @@ void init_timer(void) ESP_ERROR_CHECK(esp_timer_create(&periodic_timer_args, &periodic_timer)); } -void app_main() +void app_main(void) { esp_err_t ret; diff --git a/examples/bluetooth/bluedroid/ble/ble_compatibility_test/main/ble_compatibility_test.c b/examples/bluetooth/bluedroid/ble/ble_compatibility_test/main/ble_compatibility_test.c index fca661d2c..7c1ca1c0b 100644 --- a/examples/bluetooth/bluedroid/ble/ble_compatibility_test/main/ble_compatibility_test.c +++ b/examples/bluetooth/bluedroid/ble/ble_compatibility_test/main/ble_compatibility_test.c @@ -615,7 +615,7 @@ static void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_ } while (0); } -void app_main() +void app_main(void) { esp_err_t ret; diff --git a/examples/bluetooth/bluedroid/ble/ble_eddystone/main/esp_eddystone_demo.c b/examples/bluetooth/bluedroid/ble/ble_eddystone/main/esp_eddystone_demo.c index 525bcd2ae..f41ebf6c1 100644 --- a/examples/bluetooth/bluedroid/ble/ble_eddystone/main/esp_eddystone_demo.c +++ b/examples/bluetooth/bluedroid/ble/ble_eddystone/main/esp_eddystone_demo.c @@ -160,7 +160,7 @@ void esp_eddystone_init(void) esp_eddystone_appRegister(); } -void app_main() +void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT)); diff --git a/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/main/ble_hidd_demo_main.c b/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/main/ble_hidd_demo_main.c index e26fa38d9..b7584735a 100644 --- a/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/main/ble_hidd_demo_main.c +++ b/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/main/ble_hidd_demo_main.c @@ -183,7 +183,7 @@ void hid_demo_task(void *pvParameters) } -void app_main() +void app_main(void) { esp_err_t ret; diff --git a/examples/bluetooth/bluedroid/ble/ble_ibeacon/main/ibeacon_demo.c b/examples/bluetooth/bluedroid/ble/ble_ibeacon/main/ibeacon_demo.c index dcad4dd4a..7aa8ae26d 100644 --- a/examples/bluetooth/bluedroid/ble/ble_ibeacon/main/ibeacon_demo.c +++ b/examples/bluetooth/bluedroid/ble/ble_ibeacon/main/ibeacon_demo.c @@ -163,7 +163,7 @@ void ble_ibeacon_init(void) ble_ibeacon_appRegister(); } -void app_main() +void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT)); diff --git a/examples/bluetooth/bluedroid/ble/ble_spp_client/main/spp_client_demo.c b/examples/bluetooth/bluedroid/ble/ble_spp_client/main/spp_client_demo.c index ae3da8e1c..f1a91e9bd 100644 --- a/examples/bluetooth/bluedroid/ble/ble_spp_client/main/spp_client_demo.c +++ b/examples/bluetooth/bluedroid/ble/ble_spp_client/main/spp_client_demo.c @@ -604,7 +604,7 @@ static void spp_uart_init(void) xTaskCreate(uart_task, "uTask", 2048, (void*)UART_NUM_0, 8, NULL); } -void app_main() +void app_main(void) { esp_err_t ret; diff --git a/examples/bluetooth/bluedroid/ble/ble_spp_server/main/ble_spp_server_demo.c b/examples/bluetooth/bluedroid/ble/ble_spp_server/main/ble_spp_server_demo.c index 999b047e7..f1eaba16b 100644 --- a/examples/bluetooth/bluedroid/ble/ble_spp_server/main/ble_spp_server_demo.c +++ b/examples/bluetooth/bluedroid/ble/ble_spp_server/main/ble_spp_server_demo.c @@ -648,7 +648,7 @@ static void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_ } while (0); } -void app_main() +void app_main(void) { esp_err_t ret; esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); diff --git a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/main/example_ble_client_throughput.c b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/main/example_ble_client_throughput.c index b0ca2daa9..6ae2cee93 100644 --- a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/main/example_ble_client_throughput.c +++ b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/main/example_ble_client_throughput.c @@ -510,7 +510,7 @@ static void throughput_client_task(void *param) } } -void app_main() +void app_main(void) { // Initialize NVS. esp_err_t ret = nvs_flash_init(); diff --git a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/main/example_ble_server_throughput.c b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/main/example_ble_server_throughput.c index 3467104f3..b8a8f621c 100644 --- a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/main/example_ble_server_throughput.c +++ b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/main/example_ble_server_throughput.c @@ -640,7 +640,7 @@ void throughput_server_task(void *param) } } -void app_main() +void app_main(void) { esp_err_t ret; diff --git a/examples/bluetooth/bluedroid/ble/blufi/main/blufi_example_main.c b/examples/bluetooth/bluedroid/ble/blufi/main/blufi_example_main.c index 4106dd24e..bd3b86e21 100644 --- a/examples/bluetooth/bluedroid/ble/blufi/main/blufi_example_main.c +++ b/examples/bluetooth/bluedroid/ble/blufi/main/blufi_example_main.c @@ -375,7 +375,7 @@ static void example_gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_ } } -void app_main() +void app_main(void) { esp_err_t ret; diff --git a/examples/bluetooth/bluedroid/ble/gatt_client/main/gattc_demo.c b/examples/bluetooth/bluedroid/ble/gatt_client/main/gattc_demo.c index 2bd779836..e53d85d33 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_client/main/gattc_demo.c +++ b/examples/bluetooth/bluedroid/ble/gatt_client/main/gattc_demo.c @@ -436,7 +436,7 @@ static void esp_gattc_cb(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp } while (0); } -void app_main() +void app_main(void) { // Initialize NVS. esp_err_t ret = nvs_flash_init(); diff --git a/examples/bluetooth/bluedroid/ble/gatt_security_client/main/example_ble_sec_gattc_demo.c b/examples/bluetooth/bluedroid/ble/gatt_security_client/main/example_ble_sec_gattc_demo.c index fa9e8914b..365fb40d8 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_security_client/main/example_ble_sec_gattc_demo.c +++ b/examples/bluetooth/bluedroid/ble/gatt_security_client/main/example_ble_sec_gattc_demo.c @@ -509,7 +509,7 @@ static void esp_gattc_cb(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp } while (0); } -void app_main() +void app_main(void) { // Initialize NVS. esp_err_t ret = nvs_flash_init(); diff --git a/examples/bluetooth/bluedroid/ble/gatt_security_server/main/example_ble_sec_gatts_demo.c b/examples/bluetooth/bluedroid/ble/gatt_security_server/main/example_ble_sec_gatts_demo.c index a7c80182f..6cbfb7182 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_security_server/main/example_ble_sec_gatts_demo.c +++ b/examples/bluetooth/bluedroid/ble/gatt_security_server/main/example_ble_sec_gatts_demo.c @@ -497,7 +497,7 @@ static void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_ } while (0); } -void app_main() +void app_main(void) { esp_err_t ret; diff --git a/examples/bluetooth/bluedroid/ble/gatt_server/main/gatts_demo.c b/examples/bluetooth/bluedroid/ble/gatt_server/main/gatts_demo.c index 6770d8f86..ea140e8cc 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_server/main/gatts_demo.c +++ b/examples/bluetooth/bluedroid/ble/gatt_server/main/gatts_demo.c @@ -671,7 +671,7 @@ static void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_ } while (0); } -void app_main() +void app_main(void) { esp_err_t ret; diff --git a/examples/bluetooth/bluedroid/ble/gatt_server_service_table/main/gatts_table_creat_demo.c b/examples/bluetooth/bluedroid/ble/gatt_server_service_table/main/gatts_table_creat_demo.c index e58357865..b6a9abffa 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_server_service_table/main/gatts_table_creat_demo.c +++ b/examples/bluetooth/bluedroid/ble/gatt_server_service_table/main/gatts_table_creat_demo.c @@ -512,7 +512,7 @@ static void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_ } while (0); } -void app_main() +void app_main(void) { esp_err_t ret; diff --git a/examples/bluetooth/bluedroid/ble/gattc_multi_connect/main/gattc_multi_connect.c b/examples/bluetooth/bluedroid/ble/gattc_multi_connect/main/gattc_multi_connect.c index b6499a766..175c0f98e 100644 --- a/examples/bluetooth/bluedroid/ble/gattc_multi_connect/main/gattc_multi_connect.c +++ b/examples/bluetooth/bluedroid/ble/gattc_multi_connect/main/gattc_multi_connect.c @@ -883,7 +883,7 @@ static void esp_gattc_cb(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp } while (0); } -void app_main() +void app_main(void) { esp_err_t ret = nvs_flash_init(); if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) { diff --git a/examples/bluetooth/bluedroid/classic_bt/a2dp_sink/main/main.c b/examples/bluetooth/bluedroid/classic_bt/a2dp_sink/main/main.c index adaf8ff43..c5a90f089 100644 --- a/examples/bluetooth/bluedroid/classic_bt/a2dp_sink/main/main.c +++ b/examples/bluetooth/bluedroid/classic_bt/a2dp_sink/main/main.c @@ -42,7 +42,7 @@ enum { static void bt_av_hdl_stack_evt(uint16_t event, void *p_param); -void app_main() +void app_main(void) { /* Initialize NVS — it is used to store PHY calibration data */ esp_err_t err = nvs_flash_init(); diff --git a/examples/bluetooth/bluedroid/classic_bt/a2dp_source/main/main.c b/examples/bluetooth/bluedroid/classic_bt/a2dp_source/main/main.c index a3971f8cd..25f66c90f 100644 --- a/examples/bluetooth/bluedroid/classic_bt/a2dp_source/main/main.c +++ b/examples/bluetooth/bluedroid/classic_bt/a2dp_source/main/main.c @@ -107,7 +107,7 @@ static char *bda2str(esp_bd_addr_t bda, char *str, size_t size) return str; } -void app_main() +void app_main(void) { // Initialize NVS. esp_err_t ret = nvs_flash_init(); diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_discovery/main/bt_discovery.c b/examples/bluetooth/bluedroid/classic_bt/bt_discovery/main/bt_discovery.c index af753cb09..cb8a687f0 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_discovery/main/bt_discovery.c +++ b/examples/bluetooth/bluedroid/classic_bt/bt_discovery/main/bt_discovery.c @@ -269,7 +269,7 @@ void bt_app_gap_start_up(void) esp_bt_gap_start_discovery(ESP_BT_INQ_MODE_GENERAL_INQUIRY, 10, 0); } -void app_main() +void app_main(void) { /* Initialize NVS — it is used to store PHY calibration data */ esp_err_t ret = nvs_flash_init(); diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/example_spp_acceptor_demo.c b/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/example_spp_acceptor_demo.c index cf82c2724..c654d8616 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/example_spp_acceptor_demo.c +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/example_spp_acceptor_demo.c @@ -154,7 +154,7 @@ void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *param) return; } -void app_main() +void app_main(void) { esp_err_t ret = nvs_flash_init(); if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) { diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/main/example_spp_initiator_demo.c b/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/main/example_spp_initiator_demo.c index cd4365996..39705a990 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/main/example_spp_initiator_demo.c +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/main/example_spp_initiator_demo.c @@ -235,7 +235,7 @@ static void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *pa } } -void app_main() +void app_main(void) { for (int i = 0; i < SPP_DATA_LEN; ++i) { spp_data[i] = i; diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/main/example_spp_vfs_acceptor_demo.c b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/main/example_spp_vfs_acceptor_demo.c index 092756b72..d24ea1053 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/main/example_spp_vfs_acceptor_demo.c +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/main/example_spp_vfs_acceptor_demo.c @@ -159,7 +159,7 @@ void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *param) return; } -void app_main() +void app_main(void) { esp_err_t ret = nvs_flash_init(); if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) { diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/main/example_spp_vfs_initiator_demo.c b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/main/example_spp_vfs_initiator_demo.c index fc34a8f02..9be627fe6 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/main/example_spp_vfs_initiator_demo.c +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/main/example_spp_vfs_initiator_demo.c @@ -223,7 +223,7 @@ static void esp_spp_stack_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param spp_task_work_dispatch(esp_spp_cb, event, param, sizeof(esp_spp_cb_param_t), NULL); } -void app_main() +void app_main(void) { for (int i = 0; i < SPP_DATA_LEN; ++i) { spp_data[i] = i; diff --git a/examples/bluetooth/bluedroid/coex/a2dp_gatts_coex/main/main.c b/examples/bluetooth/bluedroid/coex/a2dp_gatts_coex/main/main.c index 466a2ce8d..b69fada10 100644 --- a/examples/bluetooth/bluedroid/coex/a2dp_gatts_coex/main/main.c +++ b/examples/bluetooth/bluedroid/coex/a2dp_gatts_coex/main/main.c @@ -669,7 +669,7 @@ static void bt_av_hdl_stack_evt(uint16_t event, void *p_param) } } -void app_main() +void app_main(void) { /* Initialize NVS — it is used to store PHY calibration data */ esp_err_t err = nvs_flash_init(); diff --git a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/gattc_gatts_coex.c b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/gattc_gatts_coex.c index 3e4989372..00172ebd9 100644 --- a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/gattc_gatts_coex.c +++ b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/gattc_gatts_coex.c @@ -942,7 +942,7 @@ static void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_ } while (0); } -void app_main() +void app_main(void) { esp_err_t ret; diff --git a/examples/bluetooth/bluedroid/hci/controller_hci_uart/main/controller_hci_uart_demo.c b/examples/bluetooth/bluedroid/hci/controller_hci_uart/main/controller_hci_uart_demo.c index 0eb7ef778..6214dec13 100644 --- a/examples/bluetooth/bluedroid/hci/controller_hci_uart/main/controller_hci_uart_demo.c +++ b/examples/bluetooth/bluedroid/hci/controller_hci_uart/main/controller_hci_uart_demo.c @@ -31,7 +31,7 @@ static void uart_gpio_reset(void) #endif } -void app_main() +void app_main(void) { esp_err_t ret; diff --git a/examples/bluetooth/bluedroid/hci/controller_vhci_ble_adv/main/app_bt.c b/examples/bluetooth/bluedroid/hci/controller_vhci_ble_adv/main/app_bt.c index 0a67c3246..09f78064c 100644 --- a/examples/bluetooth/bluedroid/hci/controller_vhci_ble_adv/main/app_bt.c +++ b/examples/bluetooth/bluedroid/hci/controller_vhci_ble_adv/main/app_bt.c @@ -210,7 +210,7 @@ void bleAdvtTask(void *pvParameters) } } -void app_main() +void app_main(void) { /* Initialize NVS — it is used to store PHY calibration data */ esp_err_t ret = nvs_flash_init(); diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_adapter.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_adapter.c index 5cf017bdc..b8d1775b3 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_adapter.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_adapter.c @@ -72,7 +72,7 @@ esp_ble_mesh_comp_t *ble_mesh_get_component(uint16_t model_id) return comp; } -void ble_mesh_node_init() +void ble_mesh_node_init(void) { uint16_t i; @@ -100,7 +100,7 @@ void ble_mesh_set_node_prestore_params(uint16_t netkey_index, uint16_t unicast_a xSemaphoreGive(ble_mesh_node_sema); } -void ble_mesh_node_statistics_get() +void ble_mesh_node_statistics_get(void) { xSemaphoreTake(ble_mesh_node_sema, portMAX_DELAY); ESP_LOGI(TAG, "statistics:%d,%d\n", ble_mesh_node_statistics.statistics, ble_mesh_node_statistics.package_num); @@ -156,7 +156,7 @@ int ble_mesh_node_statistics_init(uint16_t package_num) return 0; } -void ble_mesh_node_statistics_destroy() +void ble_mesh_node_statistics_destroy(void) { if (ble_mesh_node_statistics.package_index != NULL) { free(ble_mesh_node_statistics.package_index); diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_adapter.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_adapter.h index 06c876fd6..d7feee5fe 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_adapter.h +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_adapter.h @@ -85,13 +85,13 @@ extern SemaphoreHandle_t ble_mesh_node_sema; } \ }while(0) \ -void ble_mesh_node_init(); +void ble_mesh_node_init(void); void ble_mesh_set_node_prestore_params(uint16_t netkey_index, uint16_t unicast_addr); esp_ble_mesh_model_t *ble_mesh_get_model(uint16_t model_id); esp_ble_mesh_comp_t *ble_mesh_get_component(uint16_t model_id); -void ble_mesh_node_statistics_get(); +void ble_mesh_node_statistics_get(void); int ble_mesh_node_statistics_accumultate(uint8_t *data, uint32_t value, uint16_t type); int ble_mesh_node_statistics_init(uint16_t package_num); -void ble_mesh_node_statistics_destroy(); +void ble_mesh_node_statistics_destroy(void); #endif //_BLE_MESH_ADAOTER_H_ diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_console_decl.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_console_decl.h index 22ab3a7f5..2e983265d 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_console_decl.h +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_console_decl.h @@ -11,18 +11,18 @@ #include "esp_ble_mesh_defs.h" // Register system functions -void register_system(); +void register_system(void); // Register blutooth -void register_bluetooth(); +void register_bluetooth(void); // Register mesh node cmd -void ble_mesh_register_mesh_node(); +void ble_mesh_register_mesh_node(void); // Register mesh config server and generic server operation cmd -void ble_mesh_register_server(); +void ble_mesh_register_server(void); #if (CONFIG_BLE_MESH_CFG_CLI) // Register mesh config client operation cmd -void ble_mesh_register_configuration_client_model(); +void ble_mesh_register_configuration_client_model(void); #endif diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_console_main.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_console_main.c index f1f963552..25857bc96 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_console_main.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_console_main.c @@ -36,7 +36,7 @@ #define MOUNT_PATH "/data" #define HISTORY_PATH MOUNT_PATH "/history.txt" -static void initialize_filesystem() +static void initialize_filesystem(void) { static wl_handle_t wl_handle; const esp_vfs_fat_mount_config_t mount_config = { @@ -51,7 +51,7 @@ static void initialize_filesystem() } #endif // CONFIG_STORE_HISTORY -static void initialize_console() +static void initialize_console(void) { /* Disable buffering on stdin and stdout */ setvbuf(stdin, NULL, _IONBF, 0); diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_console_system.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_console_system.c index cc8805dbf..88c0a6a0a 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_console_system.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_console_system.c @@ -28,11 +28,11 @@ #define CONFIG_ESPTOOLPY_PORT "Which is choosen by Users for CMake" #endif -static void register_free(); -static void register_restart(); -static void register_make(); +static void register_free(void); +static void register_restart(void); +static void register_make(void); -void register_system() +void register_system(void) { register_free(); register_restart(); @@ -47,7 +47,7 @@ static int restart(int argc, char **argv) esp_restart(); } -static void register_restart() +static void register_restart(void) { const esp_console_cmd_t cmd = { .command = "restart", @@ -66,7 +66,7 @@ static int free_mem(int argc, char **argv) return 0; } -static void register_free() +static void register_free(void) { const esp_console_cmd_t cmd = { .command = "free", @@ -169,7 +169,7 @@ R"(MONITOR return 0; } -static void register_make() +static void register_make(void) { const esp_console_cmd_t cmd = { .command = "make", diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_register_node_cmd.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_register_node_cmd.c index 919e69f77..6dc356cda 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_register_node_cmd.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_register_node_cmd.c @@ -86,18 +86,18 @@ ble_mesh_node_status node_status = { SemaphoreHandle_t ble_mesh_node_sema; -void ble_mesh_register_node_cmd(); +void ble_mesh_register_node_cmd(void); // Register callback function void ble_mesh_prov_cb(esp_ble_mesh_prov_cb_event_t event, esp_ble_mesh_prov_cb_param_t *param); void ble_mesh_model_cb(esp_ble_mesh_model_cb_event_t event, esp_ble_mesh_model_cb_param_t *param); -void ble_mesh_register_mesh_node() +void ble_mesh_register_mesh_node(void) { ble_mesh_register_node_cmd(); } -int ble_mesh_register_node_cb() +int ble_mesh_register_node_cb(void) { ESP_LOGD(TAG, "enter %s\n", __func__); ble_mesh_node_init(); @@ -364,7 +364,7 @@ int ble_mesh_node_enable_bearer(int argc, char **argv) return err; } -int ble_mesh_node_reset() +int ble_mesh_node_reset(void) { esp_err_t err; ESP_LOGD(TAG, "enter %s\n", __func__); @@ -437,7 +437,7 @@ int ble_mesh_node_enter_network_auto(int argc, char **argv) return err; } -void ble_mesh_register_node_cmd() +void ble_mesh_register_node_cmd(void) { const esp_console_cmd_t register_cmd = { .command = "bmreg", diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_register_server_cmd.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_register_server_cmd.c index e2ae583bf..6fcb41d4f 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_register_server_cmd.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/ble_mesh_register_server_cmd.c @@ -18,7 +18,7 @@ #include "ble_mesh_console_lib.h" #include "ble_mesh_adapter.h" -void ble_mesh_register_server_operation(); +void ble_mesh_register_server_operation(void); typedef struct { struct arg_str *data; @@ -29,7 +29,7 @@ typedef struct { } ble_mesh_publish_message; ble_mesh_publish_message msg_publish; -void ble_mesh_register_server() +void ble_mesh_register_server(void) { ble_mesh_register_server_operation(); } @@ -63,7 +63,7 @@ int ble_mesh_module_publish_message(int argc, char **argv) return err; } -void ble_mesh_register_server_operation() +void ble_mesh_register_server_operation(void) { msg_publish.data = arg_str1("d", NULL, "", "message data"); msg_publish.opcode = arg_int1("o", NULL, "", "operation opcode"); diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/register_bluetooth.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/register_bluetooth.c index e6b03ed59..0489388ec 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/register_bluetooth.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_node/main/register_bluetooth.c @@ -18,21 +18,21 @@ #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x" -void register_ble_address(); +void register_ble_address(void); -void register_bluetooth() +void register_bluetooth(void) { register_ble_address(); } -int bt_mac() +int bt_mac(void) { const uint8_t *mac = esp_bt_dev_get_address(); printf("+BTMAC:"MACSTR"\n", MAC2STR(mac)); return 0; } -void register_ble_address() +void register_ble_address(void) { const esp_console_cmd_t cmd = { .command = "btmac", diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_adapter.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_adapter.c index 754b0115f..eded5787b 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_adapter.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_adapter.c @@ -77,7 +77,7 @@ esp_ble_mesh_comp_t *ble_mesh_get_component(uint16_t model_id) return comp; } -void ble_mesh_node_init() +void ble_mesh_node_init(void) { uint16_t i; @@ -129,7 +129,7 @@ void ble_mesh_create_send_data(char *data, uint16_t byte_num, uint16_t sequence_ } } -void ble_mesh_test_performance_client_model_get() +void ble_mesh_test_performance_client_model_get(void) { uint32_t i, j; uint32_t sum_time = 0; @@ -155,7 +155,7 @@ void ble_mesh_test_performance_client_model_get() xSemaphoreGive(ble_mesh_test_perf_sema); } -void ble_mesh_test_performance_client_model_get_received_percent() +void ble_mesh_test_performance_client_model_get_received_percent(void) { uint32_t i, j; uint32_t max_time = 1400; @@ -283,7 +283,7 @@ int ble_mesh_test_performance_client_model_init(uint16_t node_num, uint32_t test return 0; } -void ble_mesh_test_performance_client_model_destroy() +void ble_mesh_test_performance_client_model_destroy(void) { if (test_perf_statistics.time != NULL) { free(test_perf_statistics.time); diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_adapter.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_adapter.h index bdc083a21..305026c1a 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_adapter.h +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_adapter.h @@ -106,18 +106,18 @@ extern SemaphoreHandle_t ble_mesh_test_perf_sema; } \ }while(0) \ -void ble_mesh_node_init(); +void ble_mesh_node_init(void); void ble_mesh_set_node_prestore_params(uint16_t netkey_index, uint16_t unicast_addr); esp_ble_mesh_model_t *ble_mesh_get_model(uint16_t model_id); esp_ble_mesh_comp_t *ble_mesh_get_component(uint16_t model_id); void ble_mesh_create_send_data(char *data, uint16_t byte_num, uint16_t sequence_num, uint32_t opcode); -void ble_mesh_test_performance_client_model_get(); -void ble_mesh_test_performance_client_model_get_received_percent(); +void ble_mesh_test_performance_client_model_get(void); +void ble_mesh_test_performance_client_model_get_received_percent(void); void ble_mesh_test_performance_client_model_accumulate_statistics(uint32_t value); int ble_mesh_test_performance_client_model_accumulate_time(uint16_t time, uint8_t *data, uint8_t ack_ttl, uint16_t length); int ble_mesh_test_performance_client_model_init(uint16_t node_num, uint32_t test_num, uint8_t ttl); -void ble_mesh_test_performance_client_model_destroy(); +void ble_mesh_test_performance_client_model_destroy(void); #endif //_BLE_MESH_ADAPTER_H_ \ No newline at end of file diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_console_decl.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_console_decl.h index 90e52a61d..3ba4f496d 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_console_decl.h +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_console_decl.h @@ -11,28 +11,28 @@ #include "esp_ble_mesh_defs.h" // Register system functions -void register_system(); +void register_system(void); // Register bluetooth -void register_bluetooth(); +void register_bluetooth(void); // Register mesh node cmd -void ble_mesh_register_mesh_node(); +void ble_mesh_register_mesh_node(void); // Register Test Perf client cmd -void ble_mesh_register_mesh_test_performance_client(); +void ble_mesh_register_mesh_test_performance_client(void); #if (CONFIG_BLE_MESH_CFG_CLI) // Register mesh config client operation cmd -void ble_mesh_register_configuration_client_model(); +void ble_mesh_register_configuration_client_model(void); #endif #if (CONFIG_BLE_MESH_GENERIC_ONOFF_CLI) // Register mesh client operation cmd -void ble_mesh_register_gen_onoff_client(); +void ble_mesh_register_gen_onoff_client(void); #endif #if CONFIG_BLE_MESH_PROVISIONER // Regitster mesh provisioner cmd -void ble_mesh_register_mesh_provisioner(); +void ble_mesh_register_mesh_provisioner(void); #endif diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_console_main.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_console_main.c index d9d4a9e4e..4618e14b5 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_console_main.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_console_main.c @@ -39,7 +39,7 @@ #define MOUNT_PATH "/data" #define HISTORY_PATH MOUNT_PATH "/history.txt" -static void initialize_filesystem() +static void initialize_filesystem(void) { static wl_handle_t wl_handle; const esp_vfs_fat_mount_config_t mount_config = { @@ -54,7 +54,7 @@ static void initialize_filesystem() } #endif // CONFIG_STORE_HISTORY -static void initialize_console() +static void initialize_console(void) { /* Disable buffering on stdin and stdout */ setvbuf(stdin, NULL, _IONBF, 0); diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_console_system.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_console_system.c index d3dc6c12f..de76b11ae 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_console_system.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_console_system.c @@ -24,11 +24,11 @@ #define CONFIG_ESPTOOLPY_PORT "Which is choosen by Users for CMake" #endif -static void register_free(); -static void register_restart(); -static void register_make(); +static void register_free(void); +static void register_restart(void); +static void register_make(void); -void register_system() +void register_system(void) { register_free(); register_restart(); @@ -43,7 +43,7 @@ static int restart(int argc, char **argv) esp_restart(); } -static void register_restart() +static void register_restart(void) { const esp_console_cmd_t cmd = { .command = "restart", @@ -62,7 +62,7 @@ static int free_mem(int argc, char **argv) return 0; } -static void register_free() +static void register_free(void) { const esp_console_cmd_t cmd = { .command = "free", @@ -165,7 +165,7 @@ R"(MONITOR return 0; } -static void register_make() +static void register_make(void) { const esp_console_cmd_t cmd = { .command = "make", diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_reg_cfg_client_cmd.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_reg_cfg_client_cmd.c index 53a10d38d..59bae35ce 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_reg_cfg_client_cmd.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_reg_cfg_client_cmd.c @@ -33,11 +33,11 @@ typedef struct { } ble_mesh_client_get_set_state_t; ble_mesh_client_get_set_state_t configuration_client_model_operation; -void ble_mesh_register_configuration_client_model_command(); +void ble_mesh_register_configuration_client_model_command(void); void ble_mesh_configuration_client_model_cb(esp_ble_mesh_cfg_client_cb_event_t event, esp_ble_mesh_cfg_client_cb_param_t *param); -void ble_mesh_register_configuration_client_model() +void ble_mesh_register_configuration_client_model(void) { ble_mesh_register_configuration_client_model_command(); } @@ -362,7 +362,7 @@ int ble_mesh_configuration_client_model_operation(int argc, char **argv) } -void ble_mesh_register_configuration_client_model_command() +void ble_mesh_register_configuration_client_model_command(void) { configuration_client_model_operation.action_type = arg_str1("z", NULL, "", "action type"); configuration_client_model_operation.set_state = arg_str0("x", NULL, "", "set state"); diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_reg_gen_onoff_client_cmd.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_reg_gen_onoff_client_cmd.c index 6f34a1b27..f9caa8931 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_reg_gen_onoff_client_cmd.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_reg_gen_onoff_client_cmd.c @@ -32,11 +32,11 @@ typedef struct { } ble_mesh_gen_onoff_state_t; ble_mesh_gen_onoff_state_t gen_onoff_state; -void ble_mesh_register_gen_onoff_client_command(); +void ble_mesh_register_gen_onoff_client_command(void); void ble_mesh_generic_onoff_client_model_cb(esp_ble_mesh_generic_client_cb_event_t event, esp_ble_mesh_generic_client_cb_param_t *param); -void ble_mesh_register_gen_onoff_client() +void ble_mesh_register_gen_onoff_client(void) { ble_mesh_register_gen_onoff_client_command(); } @@ -152,7 +152,7 @@ int ble_mesh_generic_onoff_client_model(int argc, char **argv) return err; } -void ble_mesh_register_gen_onoff_client_command() +void ble_mesh_register_gen_onoff_client_command(void) { gen_onoff_state.action_type = arg_str1("z", NULL, "", "action type"); gen_onoff_state.opcode = arg_int0("o", NULL, "", "message opcode"); diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_reg_test_perf_client_cmd.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_reg_test_perf_client_cmd.c index e46efc8ec..b6b4c898f 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_reg_test_perf_client_cmd.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_reg_test_perf_client_cmd.c @@ -47,9 +47,9 @@ typedef struct { } ble_mesh_test_perf_client_model_statistics_t; ble_mesh_test_perf_client_model_statistics_t test_perf_client_model_statistics; -void ble_mesh_performance_client_model_command(); +void ble_mesh_performance_client_model_command(void); -void ble_mesh_register_mesh_test_performance_client() +void ble_mesh_register_mesh_test_performance_client(void) { ble_mesh_performance_client_model_command(); } @@ -177,7 +177,7 @@ int ble_mesh_test_performance_client_model_performance(int argc, char **argv) return 0; } -void ble_mesh_performance_client_model_command() +void ble_mesh_performance_client_model_command(void) { test_perf_client_model.action_type = arg_str1("z", NULL, "", "action type"); test_perf_client_model.playload_byte = arg_int0("p", NULL, "", "playload byte"); diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_register_node_cmd.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_register_node_cmd.c index 0e0775aca..dc96f7907 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_register_node_cmd.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_register_node_cmd.c @@ -65,18 +65,18 @@ ble_mesh_node_status node_status = { SemaphoreHandle_t ble_mesh_node_sema; -void ble_mesh_register_node_cmd(); +void ble_mesh_register_node_cmd(void); // Register callback function void ble_mesh_prov_cb(esp_ble_mesh_prov_cb_event_t event, esp_ble_mesh_prov_cb_param_t *param); void ble_mesh_model_cb(esp_ble_mesh_model_cb_event_t event, esp_ble_mesh_model_cb_param_t *param); -void ble_mesh_register_mesh_node() +void ble_mesh_register_mesh_node(void) { ble_mesh_register_node_cmd(); } -int ble_mesh_register_node_cb() +int ble_mesh_register_node_cb(void) { ESP_LOGD(TAG, "enter %s\n", __func__); ble_mesh_node_init(); @@ -405,7 +405,7 @@ int ble_mesh_provisioner_enable_bearer(int argc, char **argv) return err; } -void ble_mesh_register_node_cmd() +void ble_mesh_register_node_cmd(void) { const esp_console_cmd_t register_cmd = { .command = "bmreg", diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_register_provisioner_cmd.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_register_provisioner_cmd.c index 2df3ec5b7..4c95d45b2 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_register_provisioner_cmd.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/ble_mesh_register_provisioner_cmd.c @@ -80,12 +80,12 @@ typedef struct { } ble_mesh_provisioner_add_key_t; ble_mesh_provisioner_add_key_t provisioner_add_key; -void ble_mesh_regist_provisioner_cmd(); +void ble_mesh_regist_provisioner_cmd(void); void ble_mesh_prov_adv_cb(const esp_bd_addr_t addr, const esp_ble_addr_type_t addr_type, const uint8_t adv_type, const uint8_t *dev_uuid, uint16_t oob_info, esp_ble_mesh_prov_bearer_t bearer); -void ble_mesh_register_mesh_provisioner() +void ble_mesh_register_mesh_provisioner(void) { ble_mesh_regist_provisioner_cmd(); } @@ -101,7 +101,7 @@ void ble_mesh_prov_adv_cb(const esp_bd_addr_t addr, const esp_ble_addr_type_t ad ESP_LOGD(TAG, "exit %s\n", __func__); } -int ble_mesh_provisioner_register() +int ble_mesh_provisioner_register(void) { ESP_LOGD(TAG, "enter %s \n", __func__); // esp_ble_mesh_register_unprov_adv_pkt_callback(ble_mesh_prov_adv_cb); @@ -322,7 +322,7 @@ int ble_mesh_provision_bind_local_model(int argc, char **argv) return err; } -void ble_mesh_regist_provisioner_cmd() +void ble_mesh_regist_provisioner_cmd(void) { const esp_console_cmd_t prov_register = { .command = "bmpreg", diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/register_bluetooth.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/register_bluetooth.c index 6b856c30f..129617e7e 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/register_bluetooth.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/ble_mesh_provisioner/main/register_bluetooth.c @@ -18,9 +18,9 @@ #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x" -void register_ble_address(); +void register_ble_address(void); -void register_bluetooth() +void register_bluetooth(void) { register_ble_address(); } @@ -32,7 +32,7 @@ int bt_mac(int argc, char** argv) return 0; } -void register_ble_address() +void register_ble_address(void) { const esp_console_cmd_t cmd = { .command = "btmac", diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/cmd_wifi.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/cmd_wifi.c index 8d258dc92..15ebcb21c 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/cmd_wifi.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/components/iperf/cmd_wifi.c @@ -389,7 +389,7 @@ static int heap_size(int argc, char **argv) return 0; } -void register_wifi() +void register_wifi(void) { sta_args.ssid = arg_str1(NULL, NULL, "", "SSID of AP"); sta_args.password = arg_str0(NULL, NULL, "", "password of AP"); diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/ble_mesh_demo_main.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/ble_mesh_demo_main.c index cdb2635ad..b68253c38 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/ble_mesh_demo_main.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/ble_mesh_demo_main.c @@ -829,7 +829,7 @@ static esp_err_t bluetooth_init(void) #define WIFI_CONNECTED_BIT BIT0 -static void initialize_console() +static void initialize_console(void) { /* Disable buffering on stdin and stdout */ setvbuf(stdin, NULL, _IONBF, 0); diff --git a/examples/bluetooth/nimble/blemesh/main/app_mesh.c b/examples/bluetooth/nimble/blemesh/main/app_mesh.c index 691019265..82dde7ec2 100644 --- a/examples/bluetooth/nimble/blemesh/main/app_mesh.c +++ b/examples/bluetooth/nimble/blemesh/main/app_mesh.c @@ -420,7 +420,7 @@ void blemesh_host_task(void *param) nimble_port_run(); } -void app_main() +void app_main(void) { /* Initialize NVS — it is used to store PHY calibration data */ esp_err_t ret = nvs_flash_init(); diff --git a/examples/bluetooth/nimble/bleprph/main/scli.c b/examples/bluetooth/nimble/bleprph/main/scli.c index d5a2fe955..ec47a104c 100644 --- a/examples/bluetooth/nimble/bleprph/main/scli.c +++ b/examples/bluetooth/nimble/bleprph/main/scli.c @@ -80,7 +80,7 @@ static esp_console_cmd_t cmds[] = { }, }; -static int ble_register_cli() +static int ble_register_cli(void) { int cmds_num = sizeof(cmds) / sizeof(esp_console_cmd_t); int i; @@ -144,7 +144,7 @@ static void scli_task(void *arg) vTaskDelete(NULL); } -int scli_init() +int scli_init(void) { /* Register CLI "key " to accept input from user during pairing */ ble_register_cli(); diff --git a/examples/build_system/cmake/idf_as_lib/main.c b/examples/build_system/cmake/idf_as_lib/main.c index 59f0aa0f5..9eb73f55e 100644 --- a/examples/build_system/cmake/idf_as_lib/main.c +++ b/examples/build_system/cmake/idf_as_lib/main.c @@ -12,7 +12,7 @@ #include "esp_system.h" #include "esp_spi_flash.h" -void app_main() +void app_main(void) { printf("Hello world!\n"); diff --git a/examples/build_system/cmake/idf_as_lib/stubs/esp32/cpu_start.c b/examples/build_system/cmake/idf_as_lib/stubs/esp32/cpu_start.c index 44eedcb42..4aa606c8a 100644 --- a/examples/build_system/cmake/idf_as_lib/stubs/esp32/cpu_start.c +++ b/examples/build_system/cmake/idf_as_lib/stubs/esp32/cpu_start.c @@ -1,10 +1,10 @@ #include #include -extern void app_main(); +extern void app_main(void); jmp_buf buf; -int main() +int main(void) { setjmp(buf); app_main(); diff --git a/examples/build_system/cmake/idf_as_lib/stubs/esp32/flash_ops.c b/examples/build_system/cmake/idf_as_lib/stubs/esp32/flash_ops.c index 175e84b6e..72d5b6e4b 100644 --- a/examples/build_system/cmake/idf_as_lib/stubs/esp32/flash_ops.c +++ b/examples/build_system/cmake/idf_as_lib/stubs/esp32/flash_ops.c @@ -1,6 +1,6 @@ #include "esp_spi_flash.h" -int spi_flash_get_chip_size() +int spi_flash_get_chip_size(void) { return (1024 * 1024 * 1024); } \ No newline at end of file diff --git a/examples/build_system/cmake/idf_as_lib/stubs/spi_flash/esp_spi_flash.h b/examples/build_system/cmake/idf_as_lib/stubs/spi_flash/esp_spi_flash.h index 544f3611b..4ca6ae940 100644 --- a/examples/build_system/cmake/idf_as_lib/stubs/spi_flash/esp_spi_flash.h +++ b/examples/build_system/cmake/idf_as_lib/stubs/spi_flash/esp_spi_flash.h @@ -2,4 +2,4 @@ #include -int spi_flash_get_chip_size(); \ No newline at end of file +int spi_flash_get_chip_size(void); \ No newline at end of file diff --git a/examples/common_components/protocol_examples_common/connect.c b/examples/common_components/protocol_examples_common/connect.c index 68895905a..8ee8aea9d 100644 --- a/examples/common_components/protocol_examples_common/connect.c +++ b/examples/common_components/protocol_examples_common/connect.c @@ -41,10 +41,10 @@ static ip6_addr_t s_ipv6_addr; static const char *TAG = "example_connect"; /* set up connection, Wi-Fi or Ethernet */ -static void start(); +static void start(void); /* tear down connection, release resources */ -static void stop(); +static void stop(void); static void on_got_ip(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data) @@ -66,7 +66,7 @@ static void on_got_ipv6(void *arg, esp_event_base_t event_base, #endif // CONFIG_EXAMPLE_CONNECT_IPV6 -esp_err_t example_connect() +esp_err_t example_connect(void) { if (s_connect_event_group != NULL) { return ESP_ERR_INVALID_STATE; @@ -82,7 +82,7 @@ esp_err_t example_connect() return ESP_OK; } -esp_err_t example_disconnect() +esp_err_t example_disconnect(void) { if (s_connect_event_group == NULL) { return ESP_ERR_INVALID_STATE; @@ -114,7 +114,7 @@ static void on_wifi_connect(void *arg, esp_event_base_t event_base, #endif // CONFIG_EXAMPLE_CONNECT_IPV6 -static void start() +static void start(void) { wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); ESP_ERROR_CHECK(esp_wifi_init(&cfg)); @@ -141,7 +141,7 @@ static void start() s_connection_name = CONFIG_EXAMPLE_WIFI_SSID; } -static void stop() +static void stop(void) { ESP_ERROR_CHECK(esp_event_handler_unregister(WIFI_EVENT, WIFI_EVENT_STA_DISCONNECTED, &on_wifi_disconnect)); ESP_ERROR_CHECK(esp_event_handler_unregister(IP_EVENT, IP_EVENT_STA_GOT_IP, &on_got_ip)); @@ -178,7 +178,7 @@ static esp_eth_handle_t s_eth_handle = NULL; static esp_eth_mac_t *s_mac = NULL; static esp_eth_phy_t *s_phy = NULL; -static void start() +static void start(void) { ESP_ERROR_CHECK(tcpip_adapter_set_default_eth_handlers()); ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, IP_EVENT_ETH_GOT_IP, &on_got_ip, NULL)); @@ -229,7 +229,7 @@ static void start() s_connection_name = "Ethernet"; } -static void stop() +static void stop(void) { ESP_ERROR_CHECK(esp_event_handler_unregister(IP_EVENT, IP_EVENT_ETH_GOT_IP, &on_got_ip)); #ifdef CONFIG_EXAMPLE_CONNECT_IPV6 diff --git a/examples/common_components/protocol_examples_common/include/protocol_examples_common.h b/examples/common_components/protocol_examples_common/include/protocol_examples_common.h index e250db14d..d4f6e1fbb 100644 --- a/examples/common_components/protocol_examples_common/include/protocol_examples_common.h +++ b/examples/common_components/protocol_examples_common/include/protocol_examples_common.h @@ -39,12 +39,12 @@ extern "C" { * * @return ESP_OK on successful connection */ -esp_err_t example_connect(); +esp_err_t example_connect(void); /** * Counterpart to example_connect, de-initializes Wi-Fi or Ethernet */ -esp_err_t example_disconnect(); +esp_err_t example_disconnect(void); /** * @brief Configure stdin and stdout to use blocking I/O @@ -52,7 +52,7 @@ esp_err_t example_disconnect(); * This helper function is used in ASIO examples. It wraps installing the * UART driver and configuring VFS layer to use UART driver for console I/O. */ -esp_err_t example_configure_stdin_stdout(); +esp_err_t example_configure_stdin_stdout(void); #ifdef __cplusplus } diff --git a/examples/common_components/protocol_examples_common/stdin_out.c b/examples/common_components/protocol_examples_common/stdin_out.c index cb2220db4..10cc2167f 100644 --- a/examples/common_components/protocol_examples_common/stdin_out.c +++ b/examples/common_components/protocol_examples_common/stdin_out.c @@ -13,7 +13,7 @@ #include "driver/uart.h" #include "sdkconfig.h" -esp_err_t example_configure_stdin_stdout() +esp_err_t example_configure_stdin_stdout(void) { // Initialize VFS & UART so we can use std::cout/cin setvbuf(stdin, NULL, _IONBF, 0); diff --git a/examples/ethernet/basic/main/ethernet_example_main.c b/examples/ethernet/basic/main/ethernet_example_main.c index ed794a32b..a58bab806 100644 --- a/examples/ethernet/basic/main/ethernet_example_main.c +++ b/examples/ethernet/basic/main/ethernet_example_main.c @@ -62,7 +62,7 @@ static void got_ip_event_handler(void *arg, esp_event_base_t event_base, ESP_LOGI(TAG, "~~~~~~~~~~~"); } -void app_main() +void app_main(void) { tcpip_adapter_init(); diff --git a/examples/ethernet/eth2ap/main/ethernet_example_main.c b/examples/ethernet/eth2ap/main/ethernet_example_main.c index 4796cd9a1..3b540fad0 100644 --- a/examples/ethernet/eth2ap/main/ethernet_example_main.c +++ b/examples/ethernet/eth2ap/main/ethernet_example_main.c @@ -226,7 +226,7 @@ static esp_err_t initialize_flow_control(void) return ESP_OK; } -void app_main() +void app_main(void) { esp_err_t ret = nvs_flash_init(); if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) { diff --git a/examples/ethernet/iperf/main/cmd_ethernet.c b/examples/ethernet/iperf/main/cmd_ethernet.c index 832d049b0..d148b5a28 100644 --- a/examples/ethernet/iperf/main/cmd_ethernet.c +++ b/examples/ethernet/iperf/main/cmd_ethernet.c @@ -173,7 +173,7 @@ static void event_handler(void *arg, esp_event_base_t event_base, } } -void register_ethernet() +void register_ethernet(void) { eth_event_group = xEventGroupCreate(); tcpip_adapter_init(); diff --git a/examples/ethernet/iperf/main/cmd_ethernet.h b/examples/ethernet/iperf/main/cmd_ethernet.h index bd619c7ff..e99615151 100644 --- a/examples/ethernet/iperf/main/cmd_ethernet.h +++ b/examples/ethernet/iperf/main/cmd_ethernet.h @@ -13,7 +13,7 @@ extern "C" { #endif // Register Ethernet functions -void register_ethernet(); +void register_ethernet(void); #ifdef __cplusplus } diff --git a/examples/ethernet/iperf/main/ethernet_example_main.c b/examples/ethernet/iperf/main/ethernet_example_main.c index 1f0718fd0..0d881fa5d 100644 --- a/examples/ethernet/iperf/main/ethernet_example_main.c +++ b/examples/ethernet/iperf/main/ethernet_example_main.c @@ -29,7 +29,7 @@ static const char *TAG = "eth_example"; #define MOUNT_PATH "/data" #define HISTORY_PATH MOUNT_PATH "/history.txt" -static void initialize_filesystem() +static void initialize_filesystem(void) { static wl_handle_t wl_handle; const esp_vfs_fat_mount_config_t mount_config = { @@ -44,7 +44,7 @@ static void initialize_filesystem() } #endif // CONFIG_EXAMPLE_STORE_HISTORY -static void initialize_nvs() +static void initialize_nvs(void) { esp_err_t err = nvs_flash_init(); if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) { @@ -54,7 +54,7 @@ static void initialize_nvs() ESP_ERROR_CHECK(err); } -static void initialize_console() +static void initialize_console(void) { /* Disable buffering on stdin */ setvbuf(stdin, NULL, _IONBF, 0); @@ -109,7 +109,7 @@ static void initialize_console() #endif } -void app_main() +void app_main(void) { initialize_nvs(); diff --git a/examples/get-started/blink/main/blink.c b/examples/get-started/blink/main/blink.c index 9c58645f9..610ac8514 100644 --- a/examples/get-started/blink/main/blink.c +++ b/examples/get-started/blink/main/blink.c @@ -17,7 +17,7 @@ */ #define BLINK_GPIO CONFIG_BLINK_GPIO -void app_main() +void app_main(void) { /* Configure the IOMUX register for pad BLINK_GPIO (some pads are muxed to GPIO on reset already, but some default to other diff --git a/examples/get-started/hello_world/main/hello_world_main.c b/examples/get-started/hello_world/main/hello_world_main.c index c17eb1b20..7bb54d2fd 100644 --- a/examples/get-started/hello_world/main/hello_world_main.c +++ b/examples/get-started/hello_world/main/hello_world_main.c @@ -13,7 +13,7 @@ #include "esp_spi_flash.h" -void app_main() +void app_main(void) { printf("Hello world!\n"); diff --git a/examples/peripherals/adc/main/adc1_example_main.c b/examples/peripherals/adc/main/adc1_example_main.c index 00de0ab8b..d0f20a6e6 100644 --- a/examples/peripherals/adc/main/adc1_example_main.c +++ b/examples/peripherals/adc/main/adc1_example_main.c @@ -22,7 +22,7 @@ static const adc_channel_t channel = ADC_CHANNEL_6; //GPIO34 if ADC1, GPIO14 static const adc_atten_t atten = ADC_ATTEN_DB_0; static const adc_unit_t unit = ADC_UNIT_1; -static void check_efuse() +static void check_efuse(void) { //Check TP is burned into eFuse if (esp_adc_cal_check_efuse(ESP_ADC_CAL_VAL_EFUSE_TP) == ESP_OK) { @@ -50,7 +50,7 @@ static void print_char_val_type(esp_adc_cal_value_t val_type) } } -void app_main() +void app_main(void) { //Check if Two Point or Vref are burned into eFuse check_efuse(); diff --git a/examples/peripherals/can/can_alert_and_recovery/main/can_alert_and_recovery_example_main.c b/examples/peripherals/can/can_alert_and_recovery/main/can_alert_and_recovery_example_main.c index fab6d4bb0..ea4ac360e 100644 --- a/examples/peripherals/can/can_alert_and_recovery/main/can_alert_and_recovery_example_main.c +++ b/examples/peripherals/can/can_alert_and_recovery/main/can_alert_and_recovery_example_main.c @@ -127,7 +127,7 @@ static void ctrl_task(void *arg) vTaskDelete(NULL); } -void app_main() +void app_main(void) { tx_task_sem = xSemaphoreCreateBinary(); ctrl_task_sem = xSemaphoreCreateBinary(); diff --git a/examples/peripherals/can/can_network/can_network_listen_only/main/can_network_example_listen_only_main.c b/examples/peripherals/can/can_network/can_network_listen_only/main/can_network_example_listen_only_main.c index 5309bbd0b..2bfc8281a 100644 --- a/examples/peripherals/can/can_network/can_network_listen_only/main/can_network_example_listen_only_main.c +++ b/examples/peripherals/can/can_network/can_network_listen_only/main/can_network_example_listen_only_main.c @@ -97,7 +97,7 @@ static void can_receive_task(void *arg) vTaskDelete(NULL); } -void app_main() +void app_main(void) { rx_sem = xSemaphoreCreateBinary(); xTaskCreatePinnedToCore(can_receive_task, "CAN_rx", 4096, NULL, RX_TASK_PRIO, NULL, tskNO_AFFINITY); diff --git a/examples/peripherals/can/can_network/can_network_master/main/can_network_example_master_main.c b/examples/peripherals/can/can_network/can_network_master/main/can_network_example_master_main.c index 7372e7f77..f744072d8 100644 --- a/examples/peripherals/can/can_network/can_network_master/main/can_network_example_master_main.c +++ b/examples/peripherals/can/can_network/can_network_master/main/can_network_example_master_main.c @@ -205,7 +205,7 @@ static void can_control_task(void *arg) vTaskDelete(NULL); } -void app_main() +void app_main(void) { //Create tasks, queues, and semaphores rx_task_queue = xQueueCreate(1, sizeof(rx_task_action_t)); diff --git a/examples/peripherals/can/can_network/can_network_slave/main/can_network_example_slave_main.c b/examples/peripherals/can/can_network/can_network_slave/main/can_network_example_slave_main.c index 7c4a793bd..17ad07b8b 100644 --- a/examples/peripherals/can/can_network/can_network_slave/main/can_network_example_slave_main.c +++ b/examples/peripherals/can/can_network/can_network_slave/main/can_network_example_slave_main.c @@ -225,7 +225,7 @@ static void can_control_task(void *arg) vTaskDelete(NULL); } -void app_main() +void app_main(void) { //Add short delay to allow master it to initialize first for (int i = 3; i > 0; i--) { diff --git a/examples/peripherals/can/can_self_test/main/can_self_test_example_main.c b/examples/peripherals/can/can_self_test/main/can_self_test_example_main.c index bb17722cc..e3a12522c 100644 --- a/examples/peripherals/can/can_self_test/main/can_self_test_example_main.c +++ b/examples/peripherals/can/can_self_test/main/can_self_test_example_main.c @@ -107,7 +107,7 @@ static void can_control_task(void *arg) vTaskDelete(NULL); } -void app_main() +void app_main(void) { //Create tasks and synchronization primitives tx_sem = xSemaphoreCreateBinary(); diff --git a/examples/peripherals/gpio/main/gpio_example_main.c b/examples/peripherals/gpio/main/gpio_example_main.c index b6e71339e..9609daf79 100644 --- a/examples/peripherals/gpio/main/gpio_example_main.c +++ b/examples/peripherals/gpio/main/gpio_example_main.c @@ -57,7 +57,7 @@ static void gpio_task_example(void* arg) } } -void app_main() +void app_main(void) { gpio_config_t io_conf; //disable interrupt diff --git a/examples/peripherals/i2c/i2c_self_test/main/i2c_example_main.c b/examples/peripherals/i2c/i2c_self_test/main/i2c_example_main.c index 9b108a9aa..7fe6e0ffc 100644 --- a/examples/peripherals/i2c/i2c_self_test/main/i2c_example_main.c +++ b/examples/peripherals/i2c/i2c_self_test/main/i2c_example_main.c @@ -141,7 +141,7 @@ static esp_err_t i2c_master_sensor_test(i2c_port_t i2c_num, uint8_t *data_h, uin /** * @brief i2c master initialization */ -static esp_err_t i2c_master_init() +static esp_err_t i2c_master_init(void) { int i2c_master_port = I2C_MASTER_NUM; i2c_config_t conf; @@ -160,7 +160,7 @@ static esp_err_t i2c_master_init() /** * @brief i2c slave initialization */ -static esp_err_t i2c_slave_init() +static esp_err_t i2c_slave_init(void) { int i2c_slave_port = I2C_SLAVE_NUM; i2c_config_t conf_slave; @@ -281,7 +281,7 @@ static void i2c_test_task(void *arg) vTaskDelete(NULL); } -void app_main() +void app_main(void) { print_mux = xSemaphoreCreateMutex(); ESP_ERROR_CHECK(i2c_slave_init()); diff --git a/examples/peripherals/i2c/i2c_tools/main/cmd_i2ctools.c b/examples/peripherals/i2c/i2c_tools/main/cmd_i2ctools.c index b9c87369c..1030f4387 100644 --- a/examples/peripherals/i2c/i2c_tools/main/cmd_i2ctools.c +++ b/examples/peripherals/i2c/i2c_tools/main/cmd_i2ctools.c @@ -48,7 +48,7 @@ static esp_err_t i2c_get_port(int port, i2c_port_t *i2c_port) return ESP_OK; } -static esp_err_t i2c_master_driver_initialize() +static esp_err_t i2c_master_driver_initialize(void) { i2c_config_t conf = { .mode = I2C_MODE_MASTER, diff --git a/examples/peripherals/i2c/i2c_tools/main/i2ctools_example_main.c b/examples/peripherals/i2c/i2c_tools/main/i2ctools_example_main.c index ea79a854d..0cffbafd6 100644 --- a/examples/peripherals/i2c/i2c_tools/main/i2ctools_example_main.c +++ b/examples/peripherals/i2c/i2c_tools/main/i2ctools_example_main.c @@ -29,7 +29,7 @@ static const char *TAG = "i2c-tools"; #define MOUNT_PATH "/data" #define HISTORY_PATH MOUNT_PATH "/history.txt" -static void initialize_filesystem() +static void initialize_filesystem(void) { static wl_handle_t wl_handle; const esp_vfs_fat_mount_config_t mount_config = { @@ -44,7 +44,7 @@ static void initialize_filesystem() } #endif // CONFIG_EXAMPLE_STORE_HISTORY -static void initialize_nvs() +static void initialize_nvs(void) { esp_err_t err = nvs_flash_init(); if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) { @@ -54,7 +54,7 @@ static void initialize_nvs() ESP_ERROR_CHECK(err); } -static void initialize_console() +static void initialize_console(void) { /* Disable buffering on stdin */ setvbuf(stdin, NULL, _IONBF, 0); @@ -109,7 +109,7 @@ static void initialize_console() #endif } -void app_main() +void app_main(void) { initialize_nvs(); diff --git a/examples/peripherals/i2s/main/i2s_example_main.c b/examples/peripherals/i2s/main/i2s_example_main.c index 36bbabc18..04c90261d 100644 --- a/examples/peripherals/i2s/main/i2s_example_main.c +++ b/examples/peripherals/i2s/main/i2s_example_main.c @@ -77,7 +77,7 @@ static void setup_triangle_sine_waves(int bits) free(samples_data); } -void app_main() +void app_main(void) { //for 36Khz sample rates, we create 100Hz sine wave, every cycle need 36000/100 = 360 samples (4-bytes or 8-bytes each sample) //depend on bits_per_sample diff --git a/examples/peripherals/i2s_adc_dac/main/app_main.c b/examples/peripherals/i2s_adc_dac/main/app_main.c index 9d3018b4b..44bdea4ef 100644 --- a/examples/peripherals/i2s_adc_dac/main/app_main.c +++ b/examples/peripherals/i2s_adc_dac/main/app_main.c @@ -56,7 +56,7 @@ static const char* TAG = "ad/da"; /** * @brief I2S ADC/DAC mode init. */ -void example_i2s_init() +void example_i2s_init(void) { int i2s_num = EXAMPLE_I2S_NUM; i2s_config_t i2s_config = { @@ -81,7 +81,7 @@ void example_i2s_init() /* * @brief erase flash for recording */ -void example_erase_flash() +void example_erase_flash(void) { #if RECORD_IN_FLASH_EN printf("Erasing flash \n"); @@ -118,7 +118,7 @@ void example_disp_buf(uint8_t* buf, int length) /** * @brief Reset i2s clock and mode */ -void example_reset_play_mode() +void example_reset_play_mode(void) { i2s_set_clk(EXAMPLE_I2S_NUM, EXAMPLE_I2S_SAMPLE_RATE, EXAMPLE_I2S_SAMPLE_BITS, EXAMPLE_I2S_CHANNEL_NUM); } @@ -126,7 +126,7 @@ void example_reset_play_mode() /** * @brief Set i2s clock for example audio file */ -void example_set_file_play_mode() +void example_set_file_play_mode(void) { i2s_set_clk(EXAMPLE_I2S_NUM, 16000, EXAMPLE_I2S_SAMPLE_BITS, 1); } @@ -280,7 +280,7 @@ void adc_read_task(void* arg) } } -esp_err_t app_main() +esp_err_t app_main(void) { example_i2s_init(); esp_log_level_set("I2S", ESP_LOG_INFO); diff --git a/examples/peripherals/ledc/main/ledc_example_main.c b/examples/peripherals/ledc/main/ledc_example_main.c index d61e73fba..3a0cd5e97 100644 --- a/examples/peripherals/ledc/main/ledc_example_main.c +++ b/examples/peripherals/ledc/main/ledc_example_main.c @@ -51,7 +51,7 @@ #define LEDC_TEST_DUTY (4000) #define LEDC_TEST_FADE_TIME (3000) -void app_main() +void app_main(void) { int ch; diff --git a/examples/peripherals/mcpwm/mcpwm_basic_config/main/mcpwm_basic_config_example.c b/examples/peripherals/mcpwm/mcpwm_basic_config/main/mcpwm_basic_config_example.c index 7853c1490..ef750de1a 100644 --- a/examples/peripherals/mcpwm/mcpwm_basic_config/main/mcpwm_basic_config_example.c +++ b/examples/peripherals/mcpwm/mcpwm_basic_config/main/mcpwm_basic_config_example.c @@ -62,7 +62,7 @@ xQueueHandle cap_queue; static mcpwm_dev_t *MCPWM[2] = {&MCPWM0, &MCPWM1}; #endif -static void mcpwm_example_gpio_initialize() +static void mcpwm_example_gpio_initialize(void) { printf("initializing mcpwm gpio...\n"); #if MCPWM_GPIO_INIT @@ -167,7 +167,7 @@ static void disp_captured_signal(void *arg) /** * @brief this is ISR handler function, here we check for interrupt that triggers rising edge on CAP0 signal and according take action */ -static void IRAM_ATTR isr_handler() +static void IRAM_ATTR isr_handler(void) { uint32_t mcpwm_intr_status; capture evt; @@ -282,7 +282,7 @@ static void mcpwm_example_config(void *arg) vTaskDelete(NULL); } -void app_main() +void app_main(void) { printf("Testing MCPWM...\n"); cap_queue = xQueueCreate(1, sizeof(capture)); //comment if you don't want to use capture module diff --git a/examples/peripherals/mcpwm/mcpwm_bldc_control/main/mcpwm_bldc_control_hall_sensor_example.c b/examples/peripherals/mcpwm/mcpwm_bldc_control/main/mcpwm_bldc_control_hall_sensor_example.c index ecef139cc..c8bfe0001 100644 --- a/examples/peripherals/mcpwm/mcpwm_bldc_control/main/mcpwm_bldc_control_hall_sensor_example.c +++ b/examples/peripherals/mcpwm/mcpwm_bldc_control/main/mcpwm_bldc_control_hall_sensor_example.c @@ -58,7 +58,7 @@ xQueueHandle cap_queue; static mcpwm_dev_t *MCPWM[2] = {&MCPWM0, &MCPWM1}; -static void mcpwm_example_gpio_initialize() +static void mcpwm_example_gpio_initialize(void) { printf("initializing mcpwm bldc control gpio...\n"); #if MCPWM_GPIO_INIT @@ -162,7 +162,7 @@ static void disp_captured_signal(void *arg) /** * @brief this is ISR handler function, here we check for interrupt that triggers rising edge on CAP0 signal and according take action */ -static void IRAM_ATTR isr_handler() +static void IRAM_ATTR isr_handler(void) { uint32_t mcpwm_intr_status; capture evt; @@ -307,7 +307,7 @@ static void mcpwm_example_bldc_control(void *arg) } } -void app_main() +void app_main(void) { printf("Testing MCPWM BLDC Control...\n"); #if CHANGE_DUTY_CONTINUOUSLY diff --git a/examples/peripherals/mcpwm/mcpwm_brushed_dc_control/main/mcpwm_brushed_dc_control_example.c b/examples/peripherals/mcpwm/mcpwm_brushed_dc_control/main/mcpwm_brushed_dc_control_example.c index 2c721e77a..ee35fcc60 100644 --- a/examples/peripherals/mcpwm/mcpwm_brushed_dc_control/main/mcpwm_brushed_dc_control_example.c +++ b/examples/peripherals/mcpwm/mcpwm_brushed_dc_control/main/mcpwm_brushed_dc_control_example.c @@ -25,7 +25,7 @@ #define GPIO_PWM0A_OUT 15 //Set GPIO 15 as PWM0A #define GPIO_PWM0B_OUT 16 //Set GPIO 16 as PWM0B -static void mcpwm_example_gpio_initialize() +static void mcpwm_example_gpio_initialize(void) { printf("initializing mcpwm gpio...\n"); mcpwm_gpio_init(MCPWM_UNIT_0, MCPWM0A, GPIO_PWM0A_OUT); @@ -88,7 +88,7 @@ static void mcpwm_example_brushed_motor_control(void *arg) } } -void app_main() +void app_main(void) { printf("Testing brushed motor...\n"); xTaskCreate(mcpwm_example_brushed_motor_control, "mcpwm_examlpe_brushed_motor_control", 4096, NULL, 5, NULL); diff --git a/examples/peripherals/mcpwm/mcpwm_servo_control/main/mcpwm_servo_control_example.c b/examples/peripherals/mcpwm/mcpwm_servo_control/main/mcpwm_servo_control_example.c index 2a944e5da..88841f252 100644 --- a/examples/peripherals/mcpwm/mcpwm_servo_control/main/mcpwm_servo_control_example.c +++ b/examples/peripherals/mcpwm/mcpwm_servo_control/main/mcpwm_servo_control_example.c @@ -20,7 +20,7 @@ #define SERVO_MAX_PULSEWIDTH 2000 //Maximum pulse width in microsecond #define SERVO_MAX_DEGREE 90 //Maximum angle in degree upto which servo can rotate -static void mcpwm_example_gpio_initialize() +static void mcpwm_example_gpio_initialize(void) { printf("initializing mcpwm servo control gpio......\n"); mcpwm_gpio_init(MCPWM_UNIT_0, MCPWM0A, 18); //Set GPIO 18 as PWM0A, to which servo is connected @@ -70,7 +70,7 @@ void mcpwm_example_servo_control(void *arg) } } -void app_main() +void app_main(void) { printf("Testing servo motor.......\n"); xTaskCreate(mcpwm_example_servo_control, "mcpwm_example_servo_control", 4096, NULL, 5, NULL); diff --git a/examples/peripherals/pcnt/main/pcnt_example_main.c b/examples/peripherals/pcnt/main/pcnt_example_main.c index f734501fc..89a370363 100644 --- a/examples/peripherals/pcnt/main/pcnt_example_main.c +++ b/examples/peripherals/pcnt/main/pcnt_example_main.c @@ -167,7 +167,7 @@ static void pcnt_example_init(void) pcnt_counter_resume(PCNT_TEST_UNIT); } -void app_main() +void app_main(void) { /* Initialize LEDC to generate sample pulse signal */ ledc_init(); diff --git a/examples/peripherals/rmt_nec_tx_rx/main/infrared_nec_main.c b/examples/peripherals/rmt_nec_tx_rx/main/infrared_nec_main.c index cebffbcae..1dc28e5ac 100644 --- a/examples/peripherals/rmt_nec_tx_rx/main/infrared_nec_main.c +++ b/examples/peripherals/rmt_nec_tx_rx/main/infrared_nec_main.c @@ -235,7 +235,7 @@ static int nec_build_items(int channel, rmt_item32_t* item, int item_num, uint16 /* * @brief RMT transmitter initialization */ -static void nec_tx_init() +static void nec_tx_init(void) { rmt_config_t rmt_tx; rmt_tx.channel = RMT_TX_CHANNEL; @@ -257,7 +257,7 @@ static void nec_tx_init() /* * @brief RMT receiver initialization */ -static void nec_rx_init() +static void nec_rx_init(void) { rmt_config_t rmt_rx; rmt_rx.channel = RMT_RX_CHANNEL; @@ -276,7 +276,7 @@ static void nec_rx_init() * @brief RMT receiver demo, this task will print each received NEC data. * */ -static void rmt_example_nec_rx_task() +static void rmt_example_nec_rx_task(void) { int channel = RMT_RX_CHANNEL; nec_rx_init(); @@ -317,7 +317,7 @@ static void rmt_example_nec_rx_task() * @brief RMT transmitter demo, this task will periodically send NEC data. (100 * 32 bits each time.) * */ -static void rmt_example_nec_tx_task() +static void rmt_example_nec_tx_task(void) { vTaskDelay(10); nec_tx_init(); @@ -355,7 +355,7 @@ static void rmt_example_nec_tx_task() vTaskDelete(NULL); } -void app_main() +void app_main(void) { xTaskCreate(rmt_example_nec_rx_task, "rmt_nec_rx_task", 2048, NULL, 10, NULL); xTaskCreate(rmt_example_nec_tx_task, "rmt_nec_tx_task", 2048, NULL, 10, NULL); diff --git a/examples/peripherals/rmt_tx/main/rmt_tx_main.c b/examples/peripherals/rmt_tx/main/rmt_tx_main.c index ad6e4f6f6..c36672206 100644 --- a/examples/peripherals/rmt_tx/main/rmt_tx_main.c +++ b/examples/peripherals/rmt_tx/main/rmt_tx_main.c @@ -84,7 +84,7 @@ static void IRAM_ATTR u8_to_rmt(const void* src, rmt_item32_t* dest, size_t src_ /* * Initialize the RMT Tx channel */ -static void rmt_tx_int() +static void rmt_tx_int(void) { rmt_config_t config; config.rmt_mode = RMT_MODE_TX; diff --git a/examples/peripherals/sdio/host/main/app_main.c b/examples/peripherals/sdio/host/main/app_main.c index b0b62d15d..b12f18677 100644 --- a/examples/peripherals/sdio/host/main/app_main.c +++ b/examples/peripherals/sdio/host/main/app_main.c @@ -123,7 +123,7 @@ esp_err_t slave_reset(esp_slave_context_t *context) } #ifdef CONFIG_EXAMPLE_SDIO_OVER_SPI -static void gpio_d2_set_high() +static void gpio_d2_set_high(void) { gpio_config_t d2_config = { .pin_bit_mask = BIT(SDIO_SLAVE_SLOT1_IOMUX_PIN_NUM_D2), @@ -257,7 +257,7 @@ esp_err_t slave_init(esp_slave_context_t *context) } -void slave_power_on() +void slave_power_on(void) { #ifdef SLAVE_PWR_GPIO int level_active; @@ -410,7 +410,7 @@ void job_getint(esp_slave_context_t *context) slave_inform_job(context, JOB_SEND_INT); } -void app_main() +void app_main(void) { esp_slave_context_t context; esp_err_t err; diff --git a/examples/peripherals/sdio/slave/main/app_main.c b/examples/peripherals/sdio/slave/main/app_main.c index dd7a73a61..147f4aba4 100644 --- a/examples/peripherals/sdio/slave/main/app_main.c +++ b/examples/peripherals/sdio/slave/main/app_main.c @@ -85,7 +85,7 @@ static const char job_desc[][32] = { //reset counters of the slave hardware, and clean the receive buffer (normally they should be sent back to the host) -static esp_err_t slave_reset() +static esp_err_t slave_reset(void) { esp_err_t ret; sdio_slave_stop(); @@ -106,7 +106,7 @@ static esp_err_t slave_reset() } //sent interrupts to the host in turns -static esp_err_t task_hostint() +static esp_err_t task_hostint(void) { for(int i = 0; i < 8; i++) { ESP_LOGV(TAG, "send intr: %d", i); @@ -120,7 +120,7 @@ static esp_err_t task_hostint() //read the value in a specified register set by the host, and set other register according to this. //the host will read these registers later -static esp_err_t task_write_reg() +static esp_err_t task_write_reg(void) { //the host write REG1, the slave should write its registers according to value of REG1 uint8_t read = sdio_slave_read_reg(1); @@ -157,7 +157,7 @@ static void event_cb(uint8_t pos) DMA_ATTR uint8_t buffer[BUFFER_NUM][BUFFER_SIZE] = {}; //Main application -void app_main() +void app_main(void) { esp_err_t ret; diff --git a/examples/peripherals/sigmadelta/main/sigmadelta_example_main.c b/examples/peripherals/sigmadelta/main/sigmadelta_example_main.c index 38bf2c099..4dee4ad17 100644 --- a/examples/peripherals/sigmadelta/main/sigmadelta_example_main.c +++ b/examples/peripherals/sigmadelta/main/sigmadelta_example_main.c @@ -35,7 +35,7 @@ static void sigmadelta_example_init(void) * Perform the sigma-delta modulation test * by changing the duty of the output signal. */ -void app_main() +void app_main(void) { sigmadelta_example_init(); diff --git a/examples/peripherals/spi_master/main/pretty_effect.c b/examples/peripherals/spi_master/main/pretty_effect.c index 9cd58c066..56903a38c 100644 --- a/examples/peripherals/spi_master/main/pretty_effect.c +++ b/examples/peripherals/spi_master/main/pretty_effect.c @@ -55,7 +55,7 @@ void pretty_effect_calc_lines(uint16_t *dest, int line, int frame, int linect) } -esp_err_t pretty_effect_init() +esp_err_t pretty_effect_init(void) { return decode_image(&pixels); } diff --git a/examples/peripherals/spi_master/main/pretty_effect.h b/examples/peripherals/spi_master/main/pretty_effect.h index 7f54a3245..00f000c04 100644 --- a/examples/peripherals/spi_master/main/pretty_effect.h +++ b/examples/peripherals/spi_master/main/pretty_effect.h @@ -19,4 +19,4 @@ void pretty_effect_calc_lines(uint16_t *dest, int line, int frame, int linect); * * @return ESP_OK on success, an error from the jpeg decoder otherwise. */ -esp_err_t pretty_effect_init(); +esp_err_t pretty_effect_init(void); diff --git a/examples/peripherals/spi_master/main/spi_master_example_main.c b/examples/peripherals/spi_master/main/spi_master_example_main.c index 3d4d304ea..0e4cea345 100644 --- a/examples/peripherals/spi_master/main/spi_master_example_main.c +++ b/examples/peripherals/spi_master/main/spi_master_example_main.c @@ -386,7 +386,7 @@ static void display_pretty_colors(spi_device_handle_t spi) } } -void app_main() +void app_main(void) { esp_err_t ret; spi_device_handle_t spi; diff --git a/examples/peripherals/spi_slave/receiver/main/app_main.c b/examples/peripherals/spi_slave/receiver/main/app_main.c index 1a51c653a..3071e77d2 100644 --- a/examples/peripherals/spi_slave/receiver/main/app_main.c +++ b/examples/peripherals/spi_slave/receiver/main/app_main.c @@ -69,7 +69,7 @@ void my_post_trans_cb(spi_slave_transaction_t *trans) { } //Main application -void app_main() +void app_main(void) { int n=0; esp_err_t ret; diff --git a/examples/peripherals/spi_slave/sender/main/app_main.c b/examples/peripherals/spi_slave/sender/main/app_main.c index af7dc2275..66323dad5 100644 --- a/examples/peripherals/spi_slave/sender/main/app_main.c +++ b/examples/peripherals/spi_slave/sender/main/app_main.c @@ -81,7 +81,7 @@ static void IRAM_ATTR gpio_handshake_isr_handler(void* arg) } //Main application -void app_main() +void app_main(void) { esp_err_t ret; spi_device_handle_t handle; diff --git a/examples/peripherals/timer_group/main/timer_group_example_main.c b/examples/peripherals/timer_group/main/timer_group_example_main.c index 572e35e61..403f9c0a0 100644 --- a/examples/peripherals/timer_group/main/timer_group_example_main.c +++ b/examples/peripherals/timer_group/main/timer_group_example_main.c @@ -163,7 +163,7 @@ static void timer_example_evt_task(void *arg) /* * In this example, we will test hardware timer0 and timer1 of timer group0. */ -void app_main() +void app_main(void) { timer_queue = xQueueCreate(10, sizeof(timer_event_t)); example_tg0_timer_init(TIMER_0, TEST_WITHOUT_RELOAD, TIMER_INTERVAL0_SEC); diff --git a/examples/peripherals/touch_pad_interrupt/main/tp_interrupt_main.c b/examples/peripherals/touch_pad_interrupt/main/tp_interrupt_main.c index 1ed6bcabd..7b3f244ce 100644 --- a/examples/peripherals/touch_pad_interrupt/main/tp_interrupt_main.c +++ b/examples/peripherals/touch_pad_interrupt/main/tp_interrupt_main.c @@ -137,7 +137,7 @@ static void tp_example_rtc_intr(void * arg) /* * Before reading touch pad, we need to initialize the RTC IO. */ -static void tp_example_touch_pad_init() +static void tp_example_touch_pad_init(void) { for (int i = 0;i< TOUCH_PAD_MAX;i++) { //init RTC IO and mode for touch pad. @@ -145,7 +145,7 @@ static void tp_example_touch_pad_init() } } -void app_main() +void app_main(void) { // Initialize touch pad peripheral, it will start a timer to run a filter ESP_LOGI(TAG, "Initializing touch pad"); diff --git a/examples/peripherals/touch_pad_read/main/tp_read_main.c b/examples/peripherals/touch_pad_read/main/tp_read_main.c index 85334c900..3f442d7eb 100644 --- a/examples/peripherals/touch_pad_read/main/tp_read_main.c +++ b/examples/peripherals/touch_pad_read/main/tp_read_main.c @@ -45,14 +45,14 @@ static void tp_example_read_task(void *pvParameter) } } -static void tp_example_touch_pad_init() +static void tp_example_touch_pad_init(void) { for (int i = 0;i< TOUCH_PAD_MAX;i++) { touch_pad_config(i, TOUCH_THRESH_NO_USE); } } -void app_main() +void app_main(void) { // Initialize touch pad peripheral. // The default fsm mode is software trigger mode. diff --git a/examples/peripherals/uart/nmea0183_parser/main/nmea_parser_example_main.c b/examples/peripherals/uart/nmea0183_parser/main/nmea_parser_example_main.c index 3b7c98705..34154a541 100644 --- a/examples/peripherals/uart/nmea0183_parser/main/nmea_parser_example_main.c +++ b/examples/peripherals/uart/nmea0183_parser/main/nmea_parser_example_main.c @@ -52,7 +52,7 @@ static void gps_event_handler(void *event_handler_arg, esp_event_base_t event_ba } } -void app_main() +void app_main(void) { /* NMEA parser configuration */ nmea_parser_config_t config = NMEA_PARSER_CONFIG_DEFAULT(); diff --git a/examples/peripherals/uart/uart_async_rxtxtasks/main/uart_async_rxtxtasks_main.c b/examples/peripherals/uart/uart_async_rxtxtasks/main/uart_async_rxtxtasks_main.c index 1933b0621..f4f4eb18d 100644 --- a/examples/peripherals/uart/uart_async_rxtxtasks/main/uart_async_rxtxtasks_main.c +++ b/examples/peripherals/uart/uart_async_rxtxtasks/main/uart_async_rxtxtasks_main.c @@ -19,7 +19,7 @@ static const int RX_BUF_SIZE = 1024; #define TXD_PIN (GPIO_NUM_4) #define RXD_PIN (GPIO_NUM_5) -void init() { +void init(void) { const uart_config_t uart_config = { .baud_rate = 115200, .data_bits = UART_DATA_8_BITS, @@ -41,7 +41,7 @@ int sendData(const char* logName, const char* data) return txBytes; } -static void tx_task() +static void tx_task(void) { static const char *TX_TASK_TAG = "TX_TASK"; esp_log_level_set(TX_TASK_TAG, ESP_LOG_INFO); @@ -51,7 +51,7 @@ static void tx_task() } } -static void rx_task() +static void rx_task(void) { static const char *RX_TASK_TAG = "RX_TASK"; esp_log_level_set(RX_TASK_TAG, ESP_LOG_INFO); @@ -67,7 +67,7 @@ static void rx_task() free(data); } -void app_main() +void app_main(void) { init(); xTaskCreate(rx_task, "uart_rx_task", 1024*2, NULL, configMAX_PRIORITIES, NULL); diff --git a/examples/peripherals/uart/uart_echo/main/uart_echo_example_main.c b/examples/peripherals/uart/uart_echo/main/uart_echo_example_main.c index 50885eeee..6e6a77a74 100644 --- a/examples/peripherals/uart/uart_echo/main/uart_echo_example_main.c +++ b/examples/peripherals/uart/uart_echo/main/uart_echo_example_main.c @@ -31,7 +31,7 @@ #define BUF_SIZE (1024) -static void echo_task() +static void echo_task(void) { /* Configure parameters of an UART driver, * communication pins and install the driver */ @@ -57,7 +57,7 @@ static void echo_task() } } -void app_main() +void app_main(void) { xTaskCreate(echo_task, "uart_echo_task", 1024, NULL, 10, NULL); } diff --git a/examples/peripherals/uart/uart_echo_rs485/main/rs485_example.c b/examples/peripherals/uart/uart_echo_rs485/main/rs485_example.c index 22204b73f..c68c22edf 100644 --- a/examples/peripherals/uart/uart_echo_rs485/main/rs485_example.c +++ b/examples/peripherals/uart/uart_echo_rs485/main/rs485_example.c @@ -52,7 +52,7 @@ static const char *TAG = "RS485_ECHO_APP"; // An example of echo test with hardware flow control on UART -static void echo_task() +static void echo_task(void) { const int uart_num = ECHO_UART_PORT; uart_config_t uart_config = { @@ -118,7 +118,7 @@ static void echo_task() } } -void app_main() +void app_main(void) { //A uart read/write example without event queue; xTaskCreate(echo_task, "uart_echo_task", ECHO_TASK_STACK_SIZE, NULL, ECHO_TASK_PRIO, NULL); diff --git a/examples/peripherals/uart/uart_events/main/uart_events_example_main.c b/examples/peripherals/uart/uart_events/main/uart_events_example_main.c index 8c9f545cb..f749da0b1 100644 --- a/examples/peripherals/uart/uart_events/main/uart_events_example_main.c +++ b/examples/peripherals/uart/uart_events/main/uart_events_example_main.c @@ -117,7 +117,7 @@ static void uart_event_task(void *pvParameters) vTaskDelete(NULL); } -void app_main() +void app_main(void) { esp_log_level_set(TAG, ESP_LOG_INFO); diff --git a/examples/peripherals/uart/uart_select/main/uart_select_example_main.c b/examples/peripherals/uart/uart_select/main/uart_select_example_main.c index 717042f27..2c46a3d11 100644 --- a/examples/peripherals/uart/uart_select/main/uart_select_example_main.c +++ b/examples/peripherals/uart/uart_select/main/uart_select_example_main.c @@ -20,7 +20,7 @@ static const char* TAG = "uart_select_example"; -static void uart_select_task() +static void uart_select_task(void) { uart_config_t uart_config = { .baud_rate = 115200, @@ -87,7 +87,7 @@ static void uart_select_task() vTaskDelete(NULL); } -void app_main() +void app_main(void) { xTaskCreate(uart_select_task, "uart_select_task", 4*1024, NULL, 5, NULL); } diff --git a/examples/protocols/asio/chat_client/main/chat_client.cpp b/examples/protocols/asio/chat_client/main/chat_client.cpp index d4a111057..0b0f7097f 100644 --- a/examples/protocols/asio/chat_client/main/chat_client.cpp +++ b/examples/protocols/asio/chat_client/main/chat_client.cpp @@ -134,7 +134,7 @@ private: void read_line(char * line, int max_chars); -extern "C" void app_main() +extern "C" void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); tcpip_adapter_init(); diff --git a/examples/protocols/asio/chat_server/main/chat_server.cpp b/examples/protocols/asio/chat_server/main/chat_server.cpp index 56a447e05..c1838b53f 100644 --- a/examples/protocols/asio/chat_server/main/chat_server.cpp +++ b/examples/protocols/asio/chat_server/main/chat_server.cpp @@ -202,7 +202,7 @@ private: //---------------------------------------------------------------------- -extern "C" void app_main() +extern "C" void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); tcpip_adapter_init(); diff --git a/examples/protocols/asio/tcp_echo_server/main/echo_server.cpp b/examples/protocols/asio/tcp_echo_server/main/echo_server.cpp index 008ec6ed7..d1ed69e05 100644 --- a/examples/protocols/asio/tcp_echo_server/main/echo_server.cpp +++ b/examples/protocols/asio/tcp_echo_server/main/echo_server.cpp @@ -84,7 +84,7 @@ private: }; -extern "C" void app_main() +extern "C" void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); tcpip_adapter_init(); diff --git a/examples/protocols/asio/udp_echo_server/main/udp_echo_server.cpp b/examples/protocols/asio/udp_echo_server/main/udp_echo_server.cpp index 06ac3fec9..68adf4148 100644 --- a/examples/protocols/asio/udp_echo_server/main/udp_echo_server.cpp +++ b/examples/protocols/asio/udp_echo_server/main/udp_echo_server.cpp @@ -66,7 +66,7 @@ private: char data_[max_length]; }; -extern "C" void app_main() +extern "C" void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); tcpip_adapter_init(); diff --git a/examples/protocols/esp_http_client/main/esp_http_client_example.c b/examples/protocols/esp_http_client/main/esp_http_client_example.c index 6a642a73f..348471a61 100644 --- a/examples/protocols/esp_http_client/main/esp_http_client_example.c +++ b/examples/protocols/esp_http_client/main/esp_http_client_example.c @@ -76,7 +76,7 @@ esp_err_t _http_event_handler(esp_http_client_event_t *evt) return ESP_OK; } -static void http_rest_with_url() +static void http_rest_with_url(void) { esp_http_client_config_t config = { .url = "http://httpbin.org/get", @@ -160,7 +160,7 @@ static void http_rest_with_url() esp_http_client_cleanup(client); } -static void http_rest_with_hostname_path() +static void http_rest_with_hostname_path(void) { esp_http_client_config_t config = { .host = "httpbin.org", @@ -247,7 +247,7 @@ static void http_rest_with_hostname_path() } -static void http_auth_basic() +static void http_auth_basic(void) { esp_http_client_config_t config = { .url = "http://user:passwd@httpbin.org/basic-auth/user/passwd", @@ -267,7 +267,7 @@ static void http_auth_basic() esp_http_client_cleanup(client); } -static void http_auth_basic_redirect() +static void http_auth_basic_redirect(void) { esp_http_client_config_t config = { .url = "http://user:passwd@httpbin.org/basic-auth/user/passwd", @@ -286,7 +286,7 @@ static void http_auth_basic_redirect() esp_http_client_cleanup(client); } -static void http_auth_digest() +static void http_auth_digest(void) { esp_http_client_config_t config = { .url = "http://user:passwd@httpbin.org/digest-auth/auth/user/passwd/MD5/never", @@ -305,7 +305,7 @@ static void http_auth_digest() esp_http_client_cleanup(client); } -static void https_with_url() +static void https_with_url(void) { esp_http_client_config_t config = { .url = "https://www.howsmyssl.com", @@ -325,7 +325,7 @@ static void https_with_url() esp_http_client_cleanup(client); } -static void https_with_hostname_path() +static void https_with_hostname_path(void) { esp_http_client_config_t config = { .host = "www.howsmyssl.com", @@ -347,7 +347,7 @@ static void https_with_hostname_path() esp_http_client_cleanup(client); } -static void http_relative_redirect() +static void http_relative_redirect(void) { esp_http_client_config_t config = { .url = "http://httpbin.org/relative-redirect/3", @@ -366,7 +366,7 @@ static void http_relative_redirect() esp_http_client_cleanup(client); } -static void http_absolute_redirect() +static void http_absolute_redirect(void) { esp_http_client_config_t config = { .url = "http://httpbin.org/absolute-redirect/3", @@ -385,7 +385,7 @@ static void http_absolute_redirect() esp_http_client_cleanup(client); } -static void http_redirect_to_https() +static void http_redirect_to_https(void) { esp_http_client_config_t config = { .url = "http://httpbin.org/redirect-to?url=https%3A%2F%2Fwww.howsmyssl.com", @@ -405,7 +405,7 @@ static void http_redirect_to_https() } -static void http_download_chunk() +static void http_download_chunk(void) { esp_http_client_config_t config = { .url = "http://httpbin.org/stream-bytes/8912", @@ -424,7 +424,7 @@ static void http_download_chunk() esp_http_client_cleanup(client); } -static void http_perform_as_stream_reader() +static void http_perform_as_stream_reader(void) { char *buffer = malloc(MAX_HTTP_RECV_BUFFER + 1); if (buffer == NULL) { @@ -460,7 +460,7 @@ static void http_perform_as_stream_reader() free(buffer); } -static void https_async() +static void https_async(void) { esp_http_client_config_t config = { .url = "https://postman-echo.com/post", @@ -492,7 +492,7 @@ static void https_async() esp_http_client_cleanup(client); } -static void https_with_invalid_url() +static void https_with_invalid_url(void) { esp_http_client_config_t config = { .url = "https://not.existent.url", @@ -533,7 +533,7 @@ static void http_test_task(void *pvParameters) vTaskDelete(NULL); } -void app_main() +void app_main(void) { esp_err_t ret = nvs_flash_init(); if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) { diff --git a/examples/protocols/esp_local_ctrl/main/app_main.c b/examples/protocols/esp_local_ctrl/main/app_main.c index d19feffda..a55090383 100644 --- a/examples/protocols/esp_local_ctrl/main/app_main.c +++ b/examples/protocols/esp_local_ctrl/main/app_main.c @@ -62,7 +62,7 @@ static void event_handler(void* arg, esp_event_base_t event_base, } } -void wifi_init_sta() +void wifi_init_sta(void) { s_wifi_event_group = xEventGroupCreate(); @@ -95,7 +95,7 @@ void wifi_init_sta() * See local_ctrl_service.c for implementation */ extern void start_esp_local_ctrl_service(void); -void app_main() +void app_main(void) { //Initialize NVS esp_err_t ret = nvs_flash_init(); diff --git a/examples/protocols/http2_request/main/http2_request_example_main.c b/examples/protocols/http2_request/main/http2_request_example_main.c index 180b8b934..9b6bb739e 100644 --- a/examples/protocols/http2_request/main/http2_request_example_main.c +++ b/examples/protocols/http2_request/main/http2_request_example_main.c @@ -128,7 +128,7 @@ static void http2_task(void *args) vTaskDelete(NULL); } -void app_main() +void app_main(void) { ESP_ERROR_CHECK( nvs_flash_init() ); tcpip_adapter_init(); diff --git a/examples/protocols/http_request/main/http_request_example_main.c b/examples/protocols/http_request/main/http_request_example_main.c index 20f1b667f..5626ae796 100644 --- a/examples/protocols/http_request/main/http_request_example_main.c +++ b/examples/protocols/http_request/main/http_request_example_main.c @@ -119,7 +119,7 @@ static void http_get_task(void *pvParameters) } } -void app_main() +void app_main(void) { ESP_ERROR_CHECK( nvs_flash_init() ); tcpip_adapter_init(); diff --git a/examples/protocols/http_server/advanced_tests/main/main.c b/examples/protocols/http_server/advanced_tests/main/main.c index d203c4882..af9ae1a87 100644 --- a/examples/protocols/http_server/advanced_tests/main/main.c +++ b/examples/protocols/http_server/advanced_tests/main/main.c @@ -41,7 +41,7 @@ static void connect_handler(void* arg, esp_event_base_t event_base, } } -void app_main() +void app_main(void) { static httpd_handle_t server = NULL; diff --git a/examples/protocols/http_server/advanced_tests/main/tests.c b/examples/protocols/http_server/advanced_tests/main/tests.c index c41810e61..dd4a97315 100644 --- a/examples/protocols/http_server/advanced_tests/main/tests.c +++ b/examples/protocols/http_server/advanced_tests/main/tests.c @@ -270,7 +270,7 @@ static void register_basic_handlers(httpd_handle_t hd) ESP_LOGI(TAG, "Success"); } -static httpd_handle_t test_httpd_start() +static httpd_handle_t test_httpd_start(void) { pre_start_mem = esp_get_free_heap_size(); httpd_handle_t hd; @@ -299,7 +299,7 @@ static void test_httpd_stop(httpd_handle_t hd) ESP_LOGI(TAG, "HTTPD Stop: Current free memory: %d", post_stop_mem); } -httpd_handle_t start_tests() +httpd_handle_t start_tests(void) { httpd_handle_t hd = test_httpd_start(); if (hd) { diff --git a/examples/protocols/http_server/file_serving/main/main.c b/examples/protocols/http_server/file_serving/main/main.c index 8515f6133..421355da3 100644 --- a/examples/protocols/http_server/file_serving/main/main.c +++ b/examples/protocols/http_server/file_serving/main/main.c @@ -64,7 +64,7 @@ static esp_err_t init_spiffs(void) * file_server.c */ esp_err_t start_file_server(const char *base_path); -void app_main() +void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); tcpip_adapter_init(); diff --git a/examples/protocols/http_server/persistent_sockets/main/main.c b/examples/protocols/http_server/persistent_sockets/main/main.c index 3d551fe26..725de62e1 100644 --- a/examples/protocols/http_server/persistent_sockets/main/main.c +++ b/examples/protocols/http_server/persistent_sockets/main/main.c @@ -211,7 +211,7 @@ static void connect_handler(void* arg, esp_event_base_t event_base, } -void app_main() +void app_main(void) { static httpd_handle_t server = NULL; diff --git a/examples/protocols/http_server/restful_server/main/esp_rest_main.c b/examples/protocols/http_server/restful_server/main/esp_rest_main.c index dc885fa5b..ee13bfa35 100644 --- a/examples/protocols/http_server/restful_server/main/esp_rest_main.c +++ b/examples/protocols/http_server/restful_server/main/esp_rest_main.c @@ -121,7 +121,7 @@ esp_err_t init_fs(void) } #endif -void app_main() +void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); tcpip_adapter_init(); diff --git a/examples/protocols/http_server/simple/main/main.c b/examples/protocols/http_server/simple/main/main.c index 270c93941..d7bec4466 100644 --- a/examples/protocols/http_server/simple/main/main.c +++ b/examples/protocols/http_server/simple/main/main.c @@ -267,7 +267,7 @@ static void connect_handler(void* arg, esp_event_base_t event_base, } -void app_main() +void app_main(void) { static httpd_handle_t server = NULL; diff --git a/examples/protocols/https_mbedtls/main/https_mbedtls_example_main.c b/examples/protocols/https_mbedtls/main/https_mbedtls_example_main.c index 29c97e831..ce5823f60 100644 --- a/examples/protocols/https_mbedtls/main/https_mbedtls_example_main.c +++ b/examples/protocols/https_mbedtls/main/https_mbedtls_example_main.c @@ -271,7 +271,7 @@ static void https_get_task(void *pvParameters) } } -void app_main() +void app_main(void) { ESP_ERROR_CHECK( nvs_flash_init() ); tcpip_adapter_init(); diff --git a/examples/protocols/https_request/main/https_request_example_main.c b/examples/protocols/https_request/main/https_request_example_main.c index 742a4657e..4e07c128a 100644 --- a/examples/protocols/https_request/main/https_request_example_main.c +++ b/examples/protocols/https_request/main/https_request_example_main.c @@ -148,7 +148,7 @@ static void https_get_task(void *pvParameters) } } -void app_main() +void app_main(void) { ESP_ERROR_CHECK( nvs_flash_init() ); tcpip_adapter_init(); diff --git a/examples/protocols/https_server/main/main.c b/examples/protocols/https_server/main/main.c index 7cebabfb9..a71f44e59 100644 --- a/examples/protocols/https_server/main/main.c +++ b/examples/protocols/https_server/main/main.c @@ -98,7 +98,7 @@ static void connect_handler(void* arg, esp_event_base_t event_base, } } -void app_main() +void app_main(void) { static httpd_handle_t server = NULL; diff --git a/examples/protocols/mdns/main/mdns_example_main.c b/examples/protocols/mdns/main/mdns_example_main.c index 11bee313b..a406b74d1 100644 --- a/examples/protocols/mdns/main/mdns_example_main.c +++ b/examples/protocols/mdns/main/mdns_example_main.c @@ -27,7 +27,7 @@ #define EXAMPLE_BUTTON_GPIO 0 static const char *TAG = "mdns-test"; -static char* generate_hostname(); +static char* generate_hostname(void); static void initialise_mdns(void) { @@ -176,7 +176,7 @@ static void mdns_example_task(void *pvParameters) } } -void app_main() +void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); tcpip_adapter_init(); @@ -197,7 +197,7 @@ void app_main() /** Generate host name based on sdkconfig, optionally adding a portion of MAC address to it. * @return host name string allocated from the heap */ -static char* generate_hostname() +static char* generate_hostname(void) { #ifndef CONFIG_MDNS_ADD_MAC_TO_HOSTNAME return strdup(CONFIG_MDNS_HOSTNAME); diff --git a/examples/protocols/modbus_master/main/include/sense_modbus.h b/examples/protocols/modbus_master/main/include/sense_modbus.h index 9860c4057..4c13391da 100644 --- a/examples/protocols/modbus_master/main/include/sense_modbus.h +++ b/examples/protocols/modbus_master/main/include/sense_modbus.h @@ -47,7 +47,7 @@ typedef struct uint64_t timestamp; /*!< Time stamp of last access to parameter */ } characteristic_descriptor_t; -esp_err_t sense_modbus_init(); +esp_err_t sense_modbus_init(void); esp_err_t sense_modbus_get_characteristics(characteristic_descriptor_t** cid_table, uint16_t* table_size); esp_err_t sense_modbus_read_value(uint16_t cid, void* value); esp_err_t sense_modbus_send_value(uint16_t cid, void* value); diff --git a/examples/protocols/modbus_master/main/sense_main.c b/examples/protocols/modbus_master/main/sense_main.c index 00158336d..13d52a983 100644 --- a/examples/protocols/modbus_master/main/sense_main.c +++ b/examples/protocols/modbus_master/main/sense_main.c @@ -137,13 +137,13 @@ static void trigger_operation_task(void *arg) vTaskDelete(NULL); } -static void sense_device_init() +static void sense_device_init(void) { // Initialize and start Modbus controller sense_modbus_init(); } -void app_main() +void app_main(void) { esp_err_t result = ESP_OK; diff --git a/examples/protocols/modbus_master/main/sense_modbus.c b/examples/protocols/modbus_master/main/sense_modbus.c index f8b77539f..8d1ab3539 100644 --- a/examples/protocols/modbus_master/main/sense_modbus.c +++ b/examples/protocols/modbus_master/main/sense_modbus.c @@ -81,14 +81,14 @@ static void* sense_modbus_get_param_data(const mb_parameter_descriptor_t* param_ } // The helper function to get time stamp in microseconds -static uint64_t sense_modbus_get_time_stamp_us() +static uint64_t sense_modbus_get_time_stamp_us(void) { uint64_t time_stamp = esp_timer_get_time(); return time_stamp; } // Initialization of Modbus stack -esp_err_t sense_modbus_init() +esp_err_t sense_modbus_init(void) { mb_communication_info_t comm = { .port = MB_PORTNUM, diff --git a/examples/protocols/modbus_slave/main/freemodbus.c b/examples/protocols/modbus_slave/main/freemodbus.c index e29492c50..abca71999 100644 --- a/examples/protocols/modbus_slave/main/freemodbus.c +++ b/examples/protocols/modbus_slave/main/freemodbus.c @@ -35,7 +35,7 @@ static const char *TAG = "MODBUS_SLAVE_APP"; // Set register values into known state -static void setup_reg_data() +static void setup_reg_data(void) { // Define initial state of parameters discrete_reg_params.discrete_input1 = 1; @@ -64,7 +64,7 @@ static void setup_reg_data() // See deviceparams.h file for more information about assigned Modbus parameters. // These parameters can be accessed from main application and also can be changed // by external Modbus master host. -void app_main() +void app_main(void) { mb_param_info_t reg_info; // keeps the Modbus registers access information mb_communication_info_t comm_info; // Modbus communication parameters diff --git a/examples/protocols/mqtt/publish_test/main/publish_test.c b/examples/protocols/mqtt/publish_test/main/publish_test.c index 15cd2b09b..9183bbb8b 100644 --- a/examples/protocols/mqtt/publish_test/main/publish_test.c +++ b/examples/protocols/mqtt/publish_test/main/publish_test.c @@ -151,7 +151,7 @@ static void get_string(char *line, size_t size) } } -void app_main() +void app_main(void) { char line[256]; char pattern[32]; diff --git a/examples/protocols/mqtt/ssl/main/app_main.c b/examples/protocols/mqtt/ssl/main/app_main.c index e819c8fdc..fd0a49d7b 100644 --- a/examples/protocols/mqtt/ssl/main/app_main.c +++ b/examples/protocols/mqtt/ssl/main/app_main.c @@ -110,7 +110,7 @@ static void mqtt_app_start(void) esp_mqtt_client_start(client); } -void app_main() +void app_main(void) { ESP_LOGI(TAG, "[APP] Startup.."); ESP_LOGI(TAG, "[APP] Free memory: %d bytes", esp_get_free_heap_size()); diff --git a/examples/protocols/mqtt/ssl_mutual_auth/main/app_main.c b/examples/protocols/mqtt/ssl_mutual_auth/main/app_main.c index 21c76ff44..5c6eab7ee 100644 --- a/examples/protocols/mqtt/ssl_mutual_auth/main/app_main.c +++ b/examples/protocols/mqtt/ssl_mutual_auth/main/app_main.c @@ -97,7 +97,7 @@ static void mqtt_app_start(void) esp_mqtt_client_start(client); } -void app_main() +void app_main(void) { ESP_LOGI(TAG, "[APP] Startup.."); ESP_LOGI(TAG, "[APP] Free memory: %d bytes", esp_get_free_heap_size()); diff --git a/examples/protocols/mqtt/tcp/main/app_main.c b/examples/protocols/mqtt/tcp/main/app_main.c index 9e24a3770..7acd68536 100644 --- a/examples/protocols/mqtt/tcp/main/app_main.c +++ b/examples/protocols/mqtt/tcp/main/app_main.c @@ -123,7 +123,7 @@ static void mqtt_app_start(void) esp_mqtt_client_start(client); } -void app_main() +void app_main(void) { ESP_LOGI(TAG, "[APP] Startup.."); ESP_LOGI(TAG, "[APP] Free memory: %d bytes", esp_get_free_heap_size()); diff --git a/examples/protocols/mqtt/ws/main/app_main.c b/examples/protocols/mqtt/ws/main/app_main.c index cb45759ef..cacea73e9 100644 --- a/examples/protocols/mqtt/ws/main/app_main.c +++ b/examples/protocols/mqtt/ws/main/app_main.c @@ -95,7 +95,7 @@ static void mqtt_app_start(void) esp_mqtt_client_start(client); } -void app_main() +void app_main(void) { ESP_LOGI(TAG, "[APP] Startup.."); ESP_LOGI(TAG, "[APP] Free memory: %d bytes", esp_get_free_heap_size()); diff --git a/examples/protocols/mqtt/wss/main/app_main.c b/examples/protocols/mqtt/wss/main/app_main.c index dca752b99..a9de24455 100644 --- a/examples/protocols/mqtt/wss/main/app_main.c +++ b/examples/protocols/mqtt/wss/main/app_main.c @@ -105,7 +105,7 @@ static void mqtt_app_start(void) esp_mqtt_client_start(client); } -void app_main() +void app_main(void) { ESP_LOGI(TAG, "[APP] Startup.."); ESP_LOGI(TAG, "[APP] Free memory: %d bytes", esp_get_free_heap_size()); diff --git a/examples/protocols/pppos_client/main/pppos_client_main.c b/examples/protocols/pppos_client/main/pppos_client_main.c index bd706f6fd..4f376ea68 100644 --- a/examples/protocols/pppos_client/main/pppos_client_main.c +++ b/examples/protocols/pppos_client/main/pppos_client_main.c @@ -179,7 +179,7 @@ static esp_err_t mqtt_event_handler(esp_mqtt_event_handle_t event) return ESP_OK; } -void app_main() +void app_main(void) { tcpip_adapter_init(); event_group = xEventGroupCreate(); diff --git a/examples/protocols/sntp/main/sntp_example_main.c b/examples/protocols/sntp/main/sntp_example_main.c index 157d26063..59d22d7fe 100644 --- a/examples/protocols/sntp/main/sntp_example_main.c +++ b/examples/protocols/sntp/main/sntp_example_main.c @@ -46,7 +46,7 @@ void time_sync_notification_cb(struct timeval *tv) ESP_LOGI(TAG, "Notification of a time synchronization event"); } -void app_main() +void app_main(void) { ++boot_count; ESP_LOGI(TAG, "Boot count: %d", boot_count); diff --git a/examples/protocols/sockets/tcp_client/main/tcp_client.c b/examples/protocols/sockets/tcp_client/main/tcp_client.c index 96657d798..5e98718df 100644 --- a/examples/protocols/sockets/tcp_client/main/tcp_client.c +++ b/examples/protocols/sockets/tcp_client/main/tcp_client.c @@ -109,7 +109,7 @@ static void tcp_client_task(void *pvParameters) vTaskDelete(NULL); } -void app_main() +void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); tcpip_adapter_init(); diff --git a/examples/protocols/sockets/tcp_server/main/tcp_server.c b/examples/protocols/sockets/tcp_server/main/tcp_server.c index 1e71096dc..062268ebd 100644 --- a/examples/protocols/sockets/tcp_server/main/tcp_server.c +++ b/examples/protocols/sockets/tcp_server/main/tcp_server.c @@ -128,7 +128,7 @@ static void tcp_server_task(void *pvParameters) vTaskDelete(NULL); } -void app_main() +void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); tcpip_adapter_init(); diff --git a/examples/protocols/sockets/udp_client/main/udp_client.c b/examples/protocols/sockets/udp_client/main/udp_client.c index 6639082a1..bb3175579 100644 --- a/examples/protocols/sockets/udp_client/main/udp_client.c +++ b/examples/protocols/sockets/udp_client/main/udp_client.c @@ -108,7 +108,7 @@ static void udp_client_task(void *pvParameters) vTaskDelete(NULL); } -void app_main() +void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); tcpip_adapter_init(); diff --git a/examples/protocols/sockets/udp_multicast/main/udp_multicast_example_main.c b/examples/protocols/sockets/udp_multicast/main/udp_multicast_example_main.c index bd2a4cbed..e20ce9fd3 100644 --- a/examples/protocols/sockets/udp_multicast/main/udp_multicast_example_main.c +++ b/examples/protocols/sockets/udp_multicast/main/udp_multicast_example_main.c @@ -107,7 +107,7 @@ static int socket_add_ipv4_multicast_group(int sock, bool assign_source_if) #endif /* CONFIG_EXAMPLE_IPV4 */ #ifdef CONFIG_EXAMPLE_IPV4_ONLY -static int create_multicast_ipv4_socket() +static int create_multicast_ipv4_socket(void) { struct sockaddr_in saddr = { 0 }; int sock = -1; @@ -167,7 +167,7 @@ err: #endif /* CONFIG_EXAMPLE_IPV4_ONLY */ #ifdef CONFIG_EXAMPLE_IPV6 -static int create_multicast_ipv6_socket() +static int create_multicast_ipv6_socket(void) { struct sockaddr_in6 saddr = { 0 }; int netif_index; @@ -481,7 +481,7 @@ static void mcast_example_task(void *pvParameters) } -void app_main() +void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); tcpip_adapter_init(); diff --git a/examples/protocols/sockets/udp_server/main/udp_server.c b/examples/protocols/sockets/udp_server/main/udp_server.c index ce8216832..262d2b213 100644 --- a/examples/protocols/sockets/udp_server/main/udp_server.c +++ b/examples/protocols/sockets/udp_server/main/udp_server.c @@ -109,7 +109,7 @@ static void udp_server_task(void *pvParameters) vTaskDelete(NULL); } -void app_main() +void app_main(void) { ESP_ERROR_CHECK(nvs_flash_init()); tcpip_adapter_init(); diff --git a/examples/protocols/websocket/main/websocket_example.c b/examples/protocols/websocket/main/websocket_example.c index 120a5b4fd..6b64ef25d 100644 --- a/examples/protocols/websocket/main/websocket_example.c +++ b/examples/protocols/websocket/main/websocket_example.c @@ -80,7 +80,7 @@ static void websocket_app_start(void) esp_websocket_client_destroy(client); } -void app_main() +void app_main(void) { ESP_LOGI(TAG, "[APP] Startup.."); ESP_LOGI(TAG, "[APP] Free memory: %d bytes", esp_get_free_heap_size()); diff --git a/examples/provisioning/ble_prov/main/app_main.c b/examples/provisioning/ble_prov/main/app_main.c index 6ce1184c2..1b96f5d12 100644 --- a/examples/provisioning/ble_prov/main/app_main.c +++ b/examples/provisioning/ble_prov/main/app_main.c @@ -25,7 +25,7 @@ static const char *TAG = "app"; -static void start_ble_provisioning(); +static void start_ble_provisioning(void); static void event_handler(void* arg, esp_event_base_t event_base, int event_id, void* event_data) @@ -76,7 +76,7 @@ static void event_handler(void* arg, esp_event_base_t event_base, } } -static void wifi_init_sta() +static void wifi_init_sta(void) { /* Set our event handling */ ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, event_handler, NULL)); @@ -87,7 +87,7 @@ static void wifi_init_sta() ESP_ERROR_CHECK(esp_wifi_start()); } -static void start_ble_provisioning() +static void start_ble_provisioning(void) { /* Security version */ int security = 0; @@ -110,7 +110,7 @@ static void start_ble_provisioning() ESP_ERROR_CHECK(app_prov_start_ble_provisioning(security, pop)); } -void app_main() +void app_main(void) { /* Initialize networking stack */ tcpip_adapter_init(); diff --git a/examples/provisioning/console_prov/main/app_main.c b/examples/provisioning/console_prov/main/app_main.c index 35b3d575e..6d5ef3883 100644 --- a/examples/provisioning/console_prov/main/app_main.c +++ b/examples/provisioning/console_prov/main/app_main.c @@ -47,7 +47,7 @@ static void event_handler(void* arg, esp_event_base_t event_base, } } -static void wifi_init_sta() +static void wifi_init_sta(void) { /* Set our event handling */ ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, event_handler, NULL)); @@ -58,7 +58,7 @@ static void wifi_init_sta() ESP_ERROR_CHECK(esp_wifi_start()); } -static void start_console_provisioning() +static void start_console_provisioning(void) { /* Security version */ int security = 0; @@ -81,7 +81,7 @@ static void start_console_provisioning() ESP_ERROR_CHECK(app_prov_start_console_provisioning(security, pop)); } -void app_main() +void app_main(void) { /* Initialize networking stack */ tcpip_adapter_init(); diff --git a/examples/provisioning/custom_config/main/app_main.c b/examples/provisioning/custom_config/main/app_main.c index 7b23c883c..072e7b5aa 100644 --- a/examples/provisioning/custom_config/main/app_main.c +++ b/examples/provisioning/custom_config/main/app_main.c @@ -47,7 +47,7 @@ static void event_handler(void* arg, esp_event_base_t event_base, } } -static void wifi_init_sta() +static void wifi_init_sta(void) { /* Set our event handling */ ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, event_handler, NULL)); @@ -58,7 +58,7 @@ static void wifi_init_sta() ESP_ERROR_CHECK(esp_wifi_start()); } -static void start_softap_provisioning() +static void start_softap_provisioning(void) { /* Security version */ int security = 0; @@ -82,7 +82,7 @@ static void start_softap_provisioning() CONFIG_EXAMPLE_SSID, CONFIG_EXAMPLE_PASS, security, pop)); } -void app_main() +void app_main(void) { /* Initialize networking stack */ tcpip_adapter_init(); diff --git a/examples/provisioning/manager/main/app_main.c b/examples/provisioning/manager/main/app_main.c index 96634fa71..065b6f8fc 100644 --- a/examples/provisioning/manager/main/app_main.c +++ b/examples/provisioning/manager/main/app_main.c @@ -77,7 +77,7 @@ static void event_handler(void* arg, esp_event_base_t event_base, } } -static void wifi_init_sta() +static void wifi_init_sta(void) { /* Start Wi-Fi in station mode */ ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA)); @@ -93,7 +93,7 @@ static void get_device_service_name(char *service_name, size_t max) ssid_prefix, eth_mac[3], eth_mac[4], eth_mac[5]); } -void app_main() +void app_main(void) { /* Initialize NVS partition */ esp_err_t ret = nvs_flash_init(); diff --git a/examples/provisioning/softap_prov/main/app_main.c b/examples/provisioning/softap_prov/main/app_main.c index a775f7a2f..8ee7ae679 100644 --- a/examples/provisioning/softap_prov/main/app_main.c +++ b/examples/provisioning/softap_prov/main/app_main.c @@ -47,7 +47,7 @@ static void event_handler(void* arg, esp_event_base_t event_base, } } -static void wifi_init_sta() +static void wifi_init_sta(void) { /* Set our event handling */ ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, event_handler, NULL)); @@ -58,7 +58,7 @@ static void wifi_init_sta() ESP_ERROR_CHECK(esp_wifi_start()); } -static void start_softap_provisioning() +static void start_softap_provisioning(void) { /* Security version */ int security = 0; @@ -97,7 +97,7 @@ static void start_softap_provisioning() ssid, CONFIG_EXAMPLE_PASS, security, pop)); } -void app_main() +void app_main(void) { /* Initialize networking stack */ tcpip_adapter_init(); diff --git a/examples/security/flash_encryption/main/flash_encrypt_main.c b/examples/security/flash_encryption/main/flash_encrypt_main.c index 63fd480ba..73ab39afe 100644 --- a/examples/security/flash_encryption/main/flash_encrypt_main.c +++ b/examples/security/flash_encryption/main/flash_encrypt_main.c @@ -16,7 +16,7 @@ #include "esp_flash_encrypt.h" #include "esp_efuse_table.h" -void app_main() +void app_main(void) { uint32_t flash_crypt_cnt = 0; esp_flash_enc_mode_t mode; diff --git a/examples/storage/ext_flash_fatfs/main/ext_flash_fatfs_example_main.c b/examples/storage/ext_flash_fatfs/main/ext_flash_fatfs_example_main.c index c64fb76ad..e0698dccf 100644 --- a/examples/storage/ext_flash_fatfs/main/ext_flash_fatfs_example_main.c +++ b/examples/storage/ext_flash_fatfs/main/ext_flash_fatfs_example_main.c @@ -28,7 +28,7 @@ static wl_handle_t s_wl_handle = WL_INVALID_HANDLE; // Mount path for the partition const char *base_path = "/extflash"; -static esp_flash_t* example_init_ext_flash(); +static esp_flash_t* example_init_ext_flash(void); static const esp_partition_t* example_add_partition(esp_flash_t* ext_flash, const char* partition_label); static bool example_mount_fatfs(const char* partition_label); static void example_get_fatfs_usage(size_t* out_total_bytes, size_t* out_free_bytes); @@ -84,7 +84,7 @@ void app_main(void) ESP_LOGI(TAG, "Read from file: '%s'", line); } -static esp_flash_t* example_init_ext_flash() +static esp_flash_t* example_init_ext_flash(void) { const spi_bus_config_t bus_config = { .mosi_io_num = VSPI_IOMUX_PIN_NUM_MOSI, diff --git a/examples/storage/nvs_rw_blob/main/nvs_blob_example_main.c b/examples/storage/nvs_rw_blob/main/nvs_blob_example_main.c index f6b74766e..431752147 100644 --- a/examples/storage/nvs_rw_blob/main/nvs_blob_example_main.c +++ b/examples/storage/nvs_rw_blob/main/nvs_blob_example_main.c @@ -150,7 +150,7 @@ esp_err_t print_what_saved(void) } -void app_main() +void app_main(void) { esp_err_t err = nvs_flash_init(); if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) { diff --git a/examples/storage/nvs_rw_value/main/nvs_value_example_main.c b/examples/storage/nvs_rw_value/main/nvs_value_example_main.c index 757eeeb30..47abd43a6 100644 --- a/examples/storage/nvs_rw_value/main/nvs_value_example_main.c +++ b/examples/storage/nvs_rw_value/main/nvs_value_example_main.c @@ -16,7 +16,7 @@ #include "nvs_flash.h" #include "nvs.h" -void app_main() +void app_main(void) { // Initialize NVS esp_err_t err = nvs_flash_init(); diff --git a/examples/storage/spiffsgen/main/spiffsgen_example_main.c b/examples/storage/spiffsgen/main/spiffsgen_example_main.c index fde74dcdc..5c67c47c5 100644 --- a/examples/storage/spiffsgen/main/spiffsgen_example_main.c +++ b/examples/storage/spiffsgen/main/spiffsgen_example_main.c @@ -18,7 +18,7 @@ static const char *TAG = "example"; -static void read_hello_txt() +static void read_hello_txt(void) { ESP_LOGI(TAG, "Reading hello.txt"); @@ -38,7 +38,7 @@ static void read_hello_txt() ESP_LOGI(TAG, "Read from hello.txt: %s", buf); } -static void compute_alice_txt_md5() +static void compute_alice_txt_md5(void) { ESP_LOGI(TAG, "Computing alice.txt MD5 hash"); diff --git a/examples/system/app_trace_to_host/main/app_trace_to_host_example_main.c b/examples/system/app_trace_to_host/main/app_trace_to_host_example_main.c index bedeeb35c..f2b382df9 100644 --- a/examples/system/app_trace_to_host/main/app_trace_to_host_example_main.c +++ b/examples/system/app_trace_to_host/main/app_trace_to_host_example_main.c @@ -85,7 +85,7 @@ static int adc1_sample_and_show(int sampling_period) * and logging results with application tracing to the host * as well as for comparison printing out sampling result to UART */ -void app_main() +void app_main(void) { ESP_LOGI(TAG, "Enabling ADC1 on channel 6 / GPIO34."); adc1_config_width(ADC_WIDTH_BIT_12); diff --git a/examples/system/base_mac_address/main/base_mac_address_example_main.c b/examples/system/base_mac_address/main/base_mac_address_example_main.c index c7a114bfe..7353ad76b 100644 --- a/examples/system/base_mac_address/main/base_mac_address_example_main.c +++ b/examples/system/base_mac_address/main/base_mac_address_example_main.c @@ -30,7 +30,7 @@ static esp_err_t external_storage_mac_get(uint8_t *mac) } #endif//CONFIG_BASE_MAC_STORED_OTHER_EXTERNAL_STORAGE -void app_main() +void app_main(void) { #if defined(CONFIG_BASE_MAC_STORED_EFUSE_BLK3) || defined(CONFIG_BASE_MAC_STORED_OTHER_EXTERNAL_STORAGE) uint8_t mac_addr[8] = {0}; diff --git a/examples/system/console/components/cmd_nvs/cmd_nvs.c b/examples/system/console/components/cmd_nvs/cmd_nvs.c index 21d128ecd..3878702eb 100644 --- a/examples/system/console/components/cmd_nvs/cmd_nvs.c +++ b/examples/system/console/components/cmd_nvs/cmd_nvs.c @@ -507,7 +507,7 @@ static int list_entries(int argc, char **argv) return list(part, name, type); } -void register_nvs() +void register_nvs(void) { set_args.key = arg_str1(NULL, NULL, "", "key of the value to be set"); set_args.type = arg_str1(NULL, NULL, "", ARG_TYPE_STR); diff --git a/examples/system/console/components/cmd_nvs/cmd_nvs.h b/examples/system/console/components/cmd_nvs/cmd_nvs.h index 6d0de50dc..d18c2b41f 100644 --- a/examples/system/console/components/cmd_nvs/cmd_nvs.h +++ b/examples/system/console/components/cmd_nvs/cmd_nvs.h @@ -13,7 +13,7 @@ extern "C" { #endif // Register NVS functions -void register_nvs(); +void register_nvs(void); #ifdef __cplusplus } diff --git a/examples/system/console/components/cmd_system/cmd_system.c b/examples/system/console/components/cmd_system/cmd_system.c index 50fe5ec09..caf8d70f2 100644 --- a/examples/system/console/components/cmd_system/cmd_system.c +++ b/examples/system/console/components/cmd_system/cmd_system.c @@ -30,17 +30,17 @@ static const char *TAG = "cmd_system"; -static void register_free(); -static void register_heap(); -static void register_version(); -static void register_restart(); -static void register_deep_sleep(); -static void register_light_sleep(); +static void register_free(void); +static void register_heap(void); +static void register_version(void); +static void register_restart(void); +static void register_deep_sleep(void); +static void register_light_sleep(void); #if WITH_TASKS_INFO -static void register_tasks(); +static void register_tasks(void); #endif -void register_system() +void register_system(void) { register_free(); register_heap(); @@ -72,7 +72,7 @@ static int get_version(int argc, char **argv) return 0; } -static void register_version() +static void register_version(void) { const esp_console_cmd_t cmd = { .command = "version", @@ -91,7 +91,7 @@ static int restart(int argc, char **argv) esp_restart(); } -static void register_restart() +static void register_restart(void) { const esp_console_cmd_t cmd = { .command = "restart", @@ -110,7 +110,7 @@ static int free_mem(int argc, char **argv) return 0; } -static void register_free() +static void register_free(void) { const esp_console_cmd_t cmd = { .command = "free", @@ -129,7 +129,7 @@ static int heap_size(int argc, char **argv) return 0; } -static void register_heap() +static void register_heap(void) { const esp_console_cmd_t heap_cmd = { .command = "heap", @@ -163,7 +163,7 @@ static int tasks_info(int argc, char **argv) return 0; } -static void register_tasks() +static void register_tasks(void) { const esp_console_cmd_t cmd = { .command = "tasks", @@ -221,7 +221,7 @@ static int deep_sleep(int argc, char **argv) esp_deep_sleep_start(); } -static void register_deep_sleep() +static void register_deep_sleep(void) { deep_sleep_args.wakeup_time = arg_int0("t", "time", "", "Wake up time, ms"); @@ -314,7 +314,7 @@ static int light_sleep(int argc, char **argv) return 0; } -static void register_light_sleep() +static void register_light_sleep(void) { light_sleep_args.wakeup_time = arg_int0("t", "time", "", "Wake up time, ms"); diff --git a/examples/system/console/components/cmd_system/cmd_system.h b/examples/system/console/components/cmd_system/cmd_system.h index be746a227..9af96a8ae 100644 --- a/examples/system/console/components/cmd_system/cmd_system.h +++ b/examples/system/console/components/cmd_system/cmd_system.h @@ -13,7 +13,7 @@ extern "C" { #endif // Register system functions -void register_system(); +void register_system(void); #ifdef __cplusplus } diff --git a/examples/system/console/main/cmd_wifi.c b/examples/system/console/main/cmd_wifi.c index eb2024dab..b9c24f0cd 100644 --- a/examples/system/console/main/cmd_wifi.c +++ b/examples/system/console/main/cmd_wifi.c @@ -109,7 +109,7 @@ static int connect(int argc, char **argv) return 0; } -void register_wifi() +void register_wifi(void) { join_args.timeout = arg_int0(NULL, "timeout", "", "Connection timeout, ms"); join_args.ssid = arg_str1(NULL, NULL, "", "SSID of AP"); diff --git a/examples/system/console/main/cmd_wifi.h b/examples/system/console/main/cmd_wifi.h index a1a1655e4..5259dd72f 100644 --- a/examples/system/console/main/cmd_wifi.h +++ b/examples/system/console/main/cmd_wifi.h @@ -13,7 +13,7 @@ extern "C" { #endif // Register WiFi functions -void register_wifi(); +void register_wifi(void); #ifdef __cplusplus } diff --git a/examples/system/console/main/console_example_main.c b/examples/system/console/main/console_example_main.c index e0e48b430..e89196c4b 100644 --- a/examples/system/console/main/console_example_main.c +++ b/examples/system/console/main/console_example_main.c @@ -32,7 +32,7 @@ static const char* TAG = "example"; #define MOUNT_PATH "/data" #define HISTORY_PATH MOUNT_PATH "/history.txt" -static void initialize_filesystem() +static void initialize_filesystem(void) { static wl_handle_t wl_handle; const esp_vfs_fat_mount_config_t mount_config = { @@ -47,7 +47,7 @@ static void initialize_filesystem() } #endif // CONFIG_STORE_HISTORY -static void initialize_nvs() +static void initialize_nvs(void) { esp_err_t err = nvs_flash_init(); if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) { @@ -57,7 +57,7 @@ static void initialize_nvs() ESP_ERROR_CHECK(err); } -static void initialize_console() +static void initialize_console(void) { /* Disable buffering on stdin */ setvbuf(stdin, NULL, _IONBF, 0); @@ -115,7 +115,7 @@ static void initialize_console() #endif } -void app_main() +void app_main(void) { initialize_nvs(); diff --git a/examples/system/cpp_exceptions/main/exception_example_main.cpp b/examples/system/cpp_exceptions/main/exception_example_main.cpp index 24ada9de6..29045beb4 100644 --- a/examples/system/cpp_exceptions/main/exception_example_main.cpp +++ b/examples/system/cpp_exceptions/main/exception_example_main.cpp @@ -36,7 +36,7 @@ protected: }; /* Inside .cpp file, app_main function must be declared with C linkage */ -extern "C" void app_main() +extern "C" void app_main(void) { cout << "app_main starting" << endl; diff --git a/examples/system/cpp_pthread/main/cpp_pthread.cpp b/examples/system/cpp_pthread/main/cpp_pthread.cpp index 59b0870d0..d39ea91f3 100644 --- a/examples/system/cpp_pthread/main/cpp_pthread.cpp +++ b/examples/system/cpp_pthread/main/cpp_pthread.cpp @@ -82,7 +82,7 @@ esp_pthread_cfg_t create_config(const char *name, int core_id, int stack, int pr return cfg; } -extern "C" void app_main() +extern "C" void app_main(void) { // Create a thread using deafult values that can run on any core auto cfg = esp_pthread_get_default_config(); diff --git a/examples/system/deep_sleep/main/deep_sleep_example_main.c b/examples/system/deep_sleep/main/deep_sleep_example_main.c index 5843e64aa..22bfad4b5 100644 --- a/examples/system/deep_sleep/main/deep_sleep_example_main.c +++ b/examples/system/deep_sleep/main/deep_sleep_example_main.c @@ -45,7 +45,7 @@ _Static_assert(ULP_DATA_OFFSET < CONFIG_ESP32_ULP_COPROC_RESERVE_MEM/4 - 6, * The program monitors on-chip temperature sensor and wakes up the SoC when * the temperature goes lower or higher than certain thresholds. */ -static void start_ulp_temperature_monitoring(); +static void start_ulp_temperature_monitoring(void); /** * @brief Utility function which reads data written by ULP program @@ -76,7 +76,7 @@ static inline void ulp_data_write(size_t offset, uint16_t value) static void calibrate_touch_pad(touch_pad_t pad); #endif -void app_main() +void app_main(void) { struct timeval now; gettimeofday(&now, NULL); @@ -210,7 +210,7 @@ static void calibrate_touch_pad(touch_pad_t pad) #endif // CONFIG_ENABLE_TOUCH_WAKEUP #ifdef CONFIG_ENABLE_ULP_TEMPERATURE_WAKEUP -static void start_ulp_temperature_monitoring() +static void start_ulp_temperature_monitoring(void) { /* * This ULP program monitors the on-chip temperature sensor and wakes the chip up when diff --git a/examples/system/esp_timer/main/esp_timer_example_main.c b/examples/system/esp_timer/main/esp_timer_example_main.c index ab6a697c2..975042399 100644 --- a/examples/system/esp_timer/main/esp_timer_example_main.c +++ b/examples/system/esp_timer/main/esp_timer_example_main.c @@ -20,7 +20,7 @@ static void oneshot_timer_callback(void* arg); static const char* TAG = "example"; -void app_main() +void app_main(void) { /* Create two timers: * 1. a periodic timer which will run every 0.5s, and print a message diff --git a/examples/system/freertos/real_time_stats/main/main.c b/examples/system/freertos/real_time_stats/main/main.c index 96a199bfe..9b3b9ce87 100644 --- a/examples/system/freertos/real_time_stats/main/main.c +++ b/examples/system/freertos/real_time_stats/main/main.c @@ -165,7 +165,7 @@ static void stats_task(void *arg) } } -void app_main() +void app_main(void) { //Allow other core to finish initialization vTaskDelay(pdMS_TO_TICKS(100)); diff --git a/examples/system/gcov/main/gcov_example.c b/examples/system/gcov/main/gcov_example.c index e6d745768..5ded23b0d 100644 --- a/examples/system/gcov/main/gcov_example.c +++ b/examples/system/gcov/main/gcov_example.c @@ -52,7 +52,7 @@ static void blink_task(void *pvParameter) } } -void app_main() +void app_main(void) { xTaskCreate(&blink_task, "blink_task", configMINIMAL_STACK_SIZE, NULL, 5, NULL); } diff --git a/examples/system/himem/main/himem_test_main.c b/examples/system/himem/main/himem_test_main.c index 5a83482cc..955046b2d 100644 --- a/examples/system/himem/main/himem_test_main.c +++ b/examples/system/himem/main/himem_test_main.c @@ -87,7 +87,7 @@ static bool test_region(int check_size, int seed) } -void app_main() +void app_main(void) { size_t memcnt=esp_himem_get_phys_size(); size_t memfree=esp_himem_get_free_size(); diff --git a/examples/system/light_sleep/main/light_sleep_example_main.c b/examples/system/light_sleep/main/light_sleep_example_main.c index 36003c68f..8fb02b47b 100644 --- a/examples/system/light_sleep/main/light_sleep_example_main.c +++ b/examples/system/light_sleep/main/light_sleep_example_main.c @@ -27,7 +27,7 @@ /* "Boot" button on GPIO0 is active low */ #define BUTTON_WAKEUP_LEVEL_DEFAULT 0 -void app_main() +void app_main(void) { /* Configure the button GPIO as input, enable wakeup */ const int button_gpio_num = BUTTON_GPIO_NUM_DEFAULT; diff --git a/examples/system/network_tests/main/net_suite.c b/examples/system/network_tests/main/net_suite.c index 2fae24835..9b9dfe2d0 100644 --- a/examples/system/network_tests/main/net_suite.c +++ b/examples/system/network_tests/main/net_suite.c @@ -130,7 +130,7 @@ static size_t process_line(char* line, char* packet) return count; } -void app_main() +void app_main(void) { char packet[128]; diff --git a/examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c b/examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c index c2b01e144..0387e3e68 100644 --- a/examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c +++ b/examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c @@ -103,7 +103,7 @@ ota_end: } } -void app_main() +void app_main(void) { // Initialize NVS. esp_err_t err = nvs_flash_init(); diff --git a/examples/system/ota/native_ota_example/main/native_ota_example.c b/examples/system/ota/native_ota_example/main/native_ota_example.c index 638743892..fc42b7f3b 100644 --- a/examples/system/ota/native_ota_example/main/native_ota_example.c +++ b/examples/system/ota/native_ota_example/main/native_ota_example.c @@ -37,7 +37,7 @@ static void http_cleanup(esp_http_client_handle_t client) esp_http_client_cleanup(client); } -static void __attribute__((noreturn)) task_fatal_error() +static void __attribute__((noreturn)) task_fatal_error(void) { ESP_LOGE(TAG, "Exiting task due to fatal error..."); (void)vTaskDelete(NULL); @@ -219,7 +219,7 @@ static bool diagnostic(void) return diagnostic_is_ok; } -void app_main() +void app_main(void) { uint8_t sha_256[HASH_LEN] = { 0 }; esp_partition_t partition; diff --git a/examples/system/ota/otatool/main/otatool_main.c b/examples/system/ota/otatool/main/otatool_main.c index 50ea3f2ec..86b7a8204 100644 --- a/examples/system/ota/otatool/main/otatool_main.c +++ b/examples/system/ota/otatool/main/otatool_main.c @@ -13,7 +13,7 @@ static const char *TAG = "example"; -void app_main() +void app_main(void) { ESP_LOGI(TAG, "OTA Tool Example"); diff --git a/examples/system/ota/simple_ota_example/main/simple_ota_example.c b/examples/system/ota/simple_ota_example/main/simple_ota_example.c index 9d7c44e3a..9d0187f3b 100644 --- a/examples/system/ota/simple_ota_example/main/simple_ota_example.c +++ b/examples/system/ota/simple_ota_example/main/simple_ota_example.c @@ -95,7 +95,7 @@ void simple_ota_example_task(void *pvParameter) } } -void app_main() +void app_main(void) { // Initialize NVS. esp_err_t err = nvs_flash_init(); diff --git a/examples/system/select/main/select_example.c b/examples/system/select/main/select_example.c index 57daf8fd8..962902429 100644 --- a/examples/system/select/main/select_example.c +++ b/examples/system/select/main/select_example.c @@ -27,13 +27,13 @@ static const char* TAG = "uart_select_example"; static int uart_fd = -1; static int socket_fd = -1; -static void socket_deinit() +static void socket_deinit(void) { close(socket_fd); socket_fd = -1; } -static void socket_init() +static void socket_init(void) { const struct addrinfo hints = { .ai_family = AF_INET, @@ -81,7 +81,7 @@ static void socket_init() freeaddrinfo(res); } -static void uart1_deinit() +static void uart1_deinit(void) { close(uart_fd); uart_fd = -1; @@ -89,7 +89,7 @@ static void uart1_deinit() UART1.conf0.loopback = 0; } -static void uart1_init() +static void uart1_init(void) { uart_config_t uart_config = { .baud_rate = 115200, @@ -198,7 +198,7 @@ static void select_task(void *param) vTaskDelete(NULL); } -void app_main() +void app_main(void) { xTaskCreate(uart1_write_task, "uart1_write_task", 4*1024, NULL, 5, NULL); xTaskCreate(socket_write_task, "socket_write_task", 4*1024, NULL, 5, NULL); diff --git a/examples/system/sysview_tracing/main/sysview_tracing.c b/examples/system/sysview_tracing/main/sysview_tracing.c index c422d9e46..3436b4cbc 100644 --- a/examples/system/sysview_tracing/main/sysview_tracing.c +++ b/examples/system/sysview_tracing/main/sysview_tracing.c @@ -181,7 +181,7 @@ static void example_task(void *p) } } -void app_main() +void app_main(void) { static example_event_data_t event_data[portNUM_PROCESSORS] = { { diff --git a/examples/system/sysview_tracing_heap_log/main/sysview_heap_log.c b/examples/system/sysview_tracing_heap_log/main/sysview_heap_log.c index d34c93de6..9d38fcf70 100644 --- a/examples/system/sysview_tracing_heap_log/main/sysview_heap_log.c +++ b/examples/system/sysview_tracing_heap_log/main/sysview_heap_log.c @@ -57,7 +57,7 @@ static void alloc_task(void *p) while(1); } -void app_main() +void app_main(void) { // redirect log messages to the host using SystemView tracing module esp_log_set_vprintf(&esp_sysview_vprintf); diff --git a/examples/system/task_watchdog/main/task_watchdog_example_main.c b/examples/system/task_watchdog/main/task_watchdog_example_main.c index a5eed91ce..89bce16f0 100644 --- a/examples/system/task_watchdog/main/task_watchdog_example_main.c +++ b/examples/system/task_watchdog/main/task_watchdog_example_main.c @@ -42,7 +42,7 @@ void reset_task(void *arg) } } -void app_main() +void app_main(void) { printf("Initialize TWDT\n"); //Initialize or reinitialize TWDT diff --git a/examples/system/ulp/main/ulp_example_main.c b/examples/system/ulp/main/ulp_example_main.c index 6682294d5..fa6e1eead 100644 --- a/examples/system/ulp/main/ulp_example_main.c +++ b/examples/system/ulp/main/ulp_example_main.c @@ -22,10 +22,10 @@ extern const uint8_t ulp_main_bin_start[] asm("_binary_ulp_main_bin_start"); extern const uint8_t ulp_main_bin_end[] asm("_binary_ulp_main_bin_end"); -static void init_ulp_program(); -static void update_pulse_count(); +static void init_ulp_program(void); +static void update_pulse_count(void); -void app_main() +void app_main(void) { esp_sleep_wakeup_cause_t cause = esp_sleep_get_wakeup_cause(); if (cause != ESP_SLEEP_WAKEUP_ULP) { @@ -41,7 +41,7 @@ void app_main() esp_deep_sleep_start(); } -static void init_ulp_program() +static void init_ulp_program(void) { esp_err_t err = ulp_load_binary(0, ulp_main_bin_start, (ulp_main_bin_end - ulp_main_bin_start) / sizeof(uint32_t)); @@ -91,7 +91,7 @@ static void init_ulp_program() ESP_ERROR_CHECK(err); } -static void update_pulse_count() +static void update_pulse_count(void) { const char* namespace = "plusecnt"; const char* count_key = "count"; diff --git a/examples/system/ulp_adc/main/ulp_adc_example_main.c b/examples/system/ulp_adc/main/ulp_adc_example_main.c index 80f9fc1eb..c7be925ca 100644 --- a/examples/system/ulp_adc/main/ulp_adc_example_main.c +++ b/examples/system/ulp_adc/main/ulp_adc_example_main.c @@ -27,14 +27,14 @@ extern const uint8_t ulp_main_bin_end[] asm("_binary_ulp_main_bin_end"); /* This function is called once after power-on reset, to load ULP program into * RTC memory and configure the ADC. */ -static void init_ulp_program(); +static void init_ulp_program(void); /* This function is called every time before going into deep sleep. * It starts the ULP program and resets measurement counter. */ -static void start_ulp_program(); +static void start_ulp_program(void); -void app_main() +void app_main(void) { esp_sleep_wakeup_cause_t cause = esp_sleep_get_wakeup_cause(); if (cause != ESP_SLEEP_WAKEUP_ULP) { @@ -54,7 +54,7 @@ void app_main() esp_deep_sleep_start(); } -static void init_ulp_program() +static void init_ulp_program(void) { esp_err_t err = ulp_load_binary(0, ulp_main_bin_start, (ulp_main_bin_end - ulp_main_bin_start) / sizeof(uint32_t)); @@ -83,7 +83,7 @@ static void init_ulp_program() esp_deep_sleep_disable_rom_logging(); // suppress boot messages } -static void start_ulp_program() +static void start_ulp_program(void) { /* Reset sample counter */ ulp_sample_counter = 0; diff --git a/examples/system/unit_test/test/main/example_unit_test_test.c b/examples/system/unit_test/test/main/example_unit_test_test.c index a634ce8da..92f2f038a 100644 --- a/examples/system/unit_test/test/main/example_unit_test_test.c +++ b/examples/system/unit_test/test/main/example_unit_test_test.c @@ -13,7 +13,7 @@ static void print_banner(const char* text); -void app_main() +void app_main(void) { /* These are the different ways of running registered tests. * In practice, only one of them is usually needed. diff --git a/examples/wifi/espnow/main/espnow_example_main.c b/examples/wifi/espnow/main/espnow_example_main.c index 4d76a5bea..fbfde5780 100644 --- a/examples/wifi/espnow/main/espnow_example_main.c +++ b/examples/wifi/espnow/main/espnow_example_main.c @@ -361,7 +361,7 @@ static void example_espnow_deinit(example_espnow_send_param_t *send_param) esp_now_deinit(); } -void app_main() +void app_main(void) { // Initialize NVS esp_err_t ret = nvs_flash_init(); diff --git a/examples/wifi/getting_started/softAP/main/softap_example_main.c b/examples/wifi/getting_started/softAP/main/softap_example_main.c index 010289554..624e020ed 100644 --- a/examples/wifi/getting_started/softAP/main/softap_example_main.c +++ b/examples/wifi/getting_started/softAP/main/softap_example_main.c @@ -43,7 +43,7 @@ static void wifi_event_handler(void* arg, esp_event_base_t event_base, } } -void wifi_init_softap() +void wifi_init_softap(void) { tcpip_adapter_init(); ESP_ERROR_CHECK(esp_event_loop_create_default()); @@ -74,7 +74,7 @@ void wifi_init_softap() EXAMPLE_ESP_WIFI_SSID, EXAMPLE_ESP_WIFI_PASS); } -void app_main() +void app_main(void) { //Initialize NVS esp_err_t ret = nvs_flash_init(); diff --git a/examples/wifi/getting_started/station/main/station_example_main.c b/examples/wifi/getting_started/station/main/station_example_main.c index ae6101f2d..869b614ce 100644 --- a/examples/wifi/getting_started/station/main/station_example_main.c +++ b/examples/wifi/getting_started/station/main/station_example_main.c @@ -61,7 +61,7 @@ static void event_handler(void* arg, esp_event_base_t event_base, } } -void wifi_init_sta() +void wifi_init_sta(void) { s_wifi_event_group = xEventGroupCreate(); @@ -90,7 +90,7 @@ void wifi_init_sta() EXAMPLE_ESP_WIFI_SSID, EXAMPLE_ESP_WIFI_PASS); } -void app_main() +void app_main(void) { //Initialize NVS esp_err_t ret = nvs_flash_init(); diff --git a/examples/wifi/iperf/main/cmd_wifi.c b/examples/wifi/iperf/main/cmd_wifi.c index a6fbdaa16..8bd3819a1 100644 --- a/examples/wifi/iperf/main/cmd_wifi.c +++ b/examples/wifi/iperf/main/cmd_wifi.c @@ -369,7 +369,7 @@ static int wifi_cmd_iperf(int argc, char** argv) return 0; } -void register_wifi() +void register_wifi(void) { sta_args.ssid = arg_str1(NULL, NULL, "", "SSID of AP"); sta_args.password = arg_str0(NULL, NULL, "", "password of AP"); diff --git a/examples/wifi/iperf/main/iperf_example_main.c b/examples/wifi/iperf/main/iperf_example_main.c index 797d74961..d3e2eb7c9 100644 --- a/examples/wifi/iperf/main/iperf_example_main.c +++ b/examples/wifi/iperf/main/iperf_example_main.c @@ -26,7 +26,7 @@ #define WIFI_CONNECTED_BIT BIT0 -static void initialize_console() +static void initialize_console(void) { /* Disable buffering on stdin */ setvbuf(stdin, NULL, _IONBF, 0); diff --git a/examples/wifi/power_save/main/power_save.c b/examples/wifi/power_save/main/power_save.c index 04f60cb66..c24dfdaa5 100644 --- a/examples/wifi/power_save/main/power_save.c +++ b/examples/wifi/power_save/main/power_save.c @@ -79,7 +79,7 @@ static void wifi_power_save(void) esp_wifi_set_ps(DEFAULT_PS_MODE); } -void app_main() +void app_main(void) { // Initialize NVS esp_err_t ret = nvs_flash_init(); diff --git a/examples/wifi/scan/main/scan.c b/examples/wifi/scan/main/scan.c index f5b0d29fd..0f54d8e3e 100644 --- a/examples/wifi/scan/main/scan.c +++ b/examples/wifi/scan/main/scan.c @@ -109,7 +109,7 @@ static void wifi_scan(void) ESP_ERROR_CHECK(esp_wifi_start()); } -void app_main() +void app_main(void) { // Initialize NVS esp_err_t ret = nvs_flash_init(); diff --git a/examples/wifi/simple_sniffer/main/cmd_sniffer.c b/examples/wifi/simple_sniffer/main/cmd_sniffer.c index e41f9941f..579a1c069 100644 --- a/examples/wifi/simple_sniffer/main/cmd_sniffer.c +++ b/examples/wifi/simple_sniffer/main/cmd_sniffer.c @@ -80,7 +80,7 @@ static uint32_t hash_func(const char *str, uint32_t max_num) return ret % max_num; } -static void create_wifi_filter_hashtable() +static void create_wifi_filter_hashtable(void) { char *wifi_filter_keys[SNIFFER_WLAN_FILTER_MAX] = {"mgmt", "data", "ctrl", "misc", "mpdu", "ampdu"}; uint32_t wifi_filter_values[SNIFFER_WLAN_FILTER_MAX] = {WIFI_PROMIS_FILTER_MASK_MGMT, WIFI_PROMIS_FILTER_MASK_DATA, @@ -372,7 +372,7 @@ static int do_sniffer_cmd(int argc, char **argv) return 0; } -void register_sniffer() +void register_sniffer(void) { sniffer_args.file = arg_str0("f", "file", "", "name of the file storing the packets in pcap format"); diff --git a/examples/wifi/simple_sniffer/main/cmd_sniffer.h b/examples/wifi/simple_sniffer/main/cmd_sniffer.h index c98f857d6..10d6f21f4 100644 --- a/examples/wifi/simple_sniffer/main/cmd_sniffer.h +++ b/examples/wifi/simple_sniffer/main/cmd_sniffer.h @@ -34,7 +34,7 @@ typedef enum { SNIFFER_WLAN_FILTER_MAX } sniffer_wlan_filter_t; -void register_sniffer(); +void register_sniffer(void); #ifdef __cplusplus } diff --git a/examples/wifi/simple_sniffer/main/simple_sniffer_example_main.c b/examples/wifi/simple_sniffer/main/simple_sniffer_example_main.c index 1b664b039..e1a78a42c 100644 --- a/examples/wifi/simple_sniffer/main/simple_sniffer_example_main.c +++ b/examples/wifi/simple_sniffer/main/simple_sniffer_example_main.c @@ -36,7 +36,7 @@ static const char *TAG = "example"; #if CONFIG_SNIFFER_STORE_HISTORY /* Initialize filesystem for command history store */ -static void initialize_filesystem() +static void initialize_filesystem(void) { static wl_handle_t wl_handle; const esp_vfs_fat_mount_config_t mount_config = { @@ -51,7 +51,7 @@ static void initialize_filesystem() } #endif -static void initialize_nvs() +static void initialize_nvs(void) { esp_err_t err = nvs_flash_init(); if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) { @@ -62,7 +62,7 @@ static void initialize_nvs() } /* Initialize wifi with tcp/ip adapter */ -static void initialize_wifi() +static void initialize_wifi(void) { tcpip_adapter_init(); ESP_ERROR_CHECK(esp_event_loop_create_default()); @@ -73,7 +73,7 @@ static void initialize_wifi() } /* Initialize console component */ -static void initialize_console() +static void initialize_console(void) { /* Disable buffering on stdin */ setvbuf(stdin, NULL, _IONBF, 0); @@ -172,7 +172,7 @@ static int mount(int argc, char **argv) return 0; } -static void register_mount() +static void register_mount(void) { mount_args.device = arg_str1(NULL, NULL, "", "choose a proper device to mount/unmount"); mount_args.end = arg_end(1); @@ -204,7 +204,7 @@ static int unmount(int argc, char **argv) return 0; } -static void register_unmount() +static void register_unmount(void) { mount_args.device = arg_str1(NULL, NULL, "", "choose a proper device to mount/unmount"); mount_args.end = arg_end(1); diff --git a/examples/wifi/smart_config/main/smartconfig_main.c b/examples/wifi/smart_config/main/smartconfig_main.c index 0819f256d..65e7c5033 100644 --- a/examples/wifi/smart_config/main/smartconfig_main.c +++ b/examples/wifi/smart_config/main/smartconfig_main.c @@ -112,7 +112,7 @@ static void smartconfig_example_task(void * parm) } } -void app_main() +void app_main(void) { ESP_ERROR_CHECK( nvs_flash_init() ); initialise_wifi(); diff --git a/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c b/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c index 232065c4b..1cd210c66 100644 --- a/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c +++ b/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c @@ -143,7 +143,7 @@ static void wpa2_enterprise_example_task(void *pvParameters) } } -void app_main() +void app_main(void) { ESP_ERROR_CHECK( nvs_flash_init() ); initialise_wifi(); diff --git a/examples/wifi/wps/main/wps.c b/examples/wifi/wps/main/wps.c index 5ac103b7f..4e1af5d03 100644 --- a/examples/wifi/wps/main/wps.c +++ b/examples/wifi/wps/main/wps.c @@ -115,7 +115,7 @@ static void start_wps(void) ESP_ERROR_CHECK(esp_wifi_wps_start(0)); } -void app_main() +void app_main(void) { /* Initialize NVS — it is used to store PHY calibration data */ esp_err_t ret = nvs_flash_init(); diff --git a/tools/esp_app_trace/test/sysview/blink.c b/tools/esp_app_trace/test/sysview/blink.c index baa345be4..66fb4d31f 100644 --- a/tools/esp_app_trace/test/sysview/blink.c +++ b/tools/esp_app_trace/test/sysview/blink.c @@ -82,7 +82,7 @@ void blink_task(void *pvParameter) } } -void app_main() +void app_main(void) { xTaskCreatePinnedToCore(&blink_task, "blink_task", 2048, NULL, 5, NULL, 0); } diff --git a/tools/kconfig/nconf.gui.c b/tools/kconfig/nconf.gui.c index 8275f0e55..4c964e377 100644 --- a/tools/kconfig/nconf.gui.c +++ b/tools/kconfig/nconf.gui.c @@ -129,7 +129,7 @@ static void no_colors_theme(void) mkattrn(FUNCTION_TEXT, A_REVERSE); } -void set_colors() +void set_colors(void) { start_color(); use_default_colors(); diff --git a/tools/unit-test-app/components/test_utils/include/test_utils.h b/tools/unit-test-app/components/test_utils/include/test_utils.h index eb95f34f7..f9901bb9c 100644 --- a/tools/unit-test-app/components/test_utils/include/test_utils.h +++ b/tools/unit-test-app/components/test_utils/include/test_utils.h @@ -54,7 +54,7 @@ /* Return the 'flash_test' custom data partition (type 0x55) defined in the custom partition table. */ -const esp_partition_t *get_test_data_partition(); +const esp_partition_t *get_test_data_partition(void); /** * @brief Initialize reference clock @@ -62,26 +62,26 @@ const esp_partition_t *get_test_data_partition(); * Reference clock provides timestamps at constant 1 MHz frequency, even when * the APB frequency is changing. */ -void ref_clock_init(); +void ref_clock_init(void); /** * @brief Deinitialize reference clock */ -void ref_clock_deinit(); +void ref_clock_deinit(void); /** * @brief Get reference clock timestamp * @return number of microseconds since the reference clock was initialized */ -uint64_t ref_clock_get(); +uint64_t ref_clock_get(void); /** * @brief Entry point of the test application * * Starts Unity test runner in a separate task and returns. */ -void test_main(); +void test_main(void); /** * @brief Reset automatic leak checking which happens in unit tests. diff --git a/tools/unit-test-app/components/test_utils/ref_clock.c b/tools/unit-test-app/components/test_utils/ref_clock.c index c66ff28b9..afafd42b5 100644 --- a/tools/unit-test-app/components/test_utils/ref_clock.c +++ b/tools/unit-test-app/components/test_utils/ref_clock.c @@ -54,7 +54,7 @@ static intr_handle_t s_intr_handle; static portMUX_TYPE s_lock = portMUX_INITIALIZER_UNLOCKED; static volatile uint32_t s_milliseconds; -void ref_clock_init() +void ref_clock_init(void) { assert(s_intr_handle == NULL && "already initialized"); @@ -134,7 +134,7 @@ static void IRAM_ATTR pcnt_isr(void* arg) portEXIT_CRITICAL_ISR(&s_lock); } -void ref_clock_deinit() +void ref_clock_deinit(void) { assert(s_intr_handle && "deinit called without init"); @@ -153,7 +153,7 @@ void ref_clock_deinit() periph_module_disable(PERIPH_PCNT_MODULE); } -uint64_t ref_clock_get() +uint64_t ref_clock_get(void) { portENTER_CRITICAL(&s_lock); uint32_t microseconds = PCNT.cnt_unit[REF_CLOCK_PCNT_UNIT].cnt_val; diff --git a/tools/unit-test-app/components/test_utils/test_runner.c b/tools/unit-test-app/components/test_utils/test_runner.c index 33247904c..1f00a0168 100644 --- a/tools/unit-test-app/components/test_utils/test_runner.c +++ b/tools/unit-test-app/components/test_utils/test_runner.c @@ -37,7 +37,7 @@ static void unity_task(void *pvParameters) unity_run_menu(); /* Doesn't return */ } -void test_main() +void test_main(void) { // Note: if unpinning this task, change the way run times are calculated in // unity_port_esp32.c @@ -95,7 +95,7 @@ static void check_leak(size_t before_free, size_t after_free, const char *type) TEST_ASSERT_MESSAGE(leaked <= critical_leak_threshold, "The test leaked too much memory"); } -static bool leak_check_required() +static bool leak_check_required(void) { warn_leak_threshold = test_utils_get_leak_level(TYPE_LEAK_WARNING, COMP_LEAK_ALL); critical_leak_threshold = test_utils_get_leak_level(TYPE_LEAK_CRITICAL, COMP_LEAK_ALL); diff --git a/tools/unit-test-app/components/test_utils/test_utils.c b/tools/unit-test-app/components/test_utils/test_utils.c index fc16db9f0..9216a70fd 100644 --- a/tools/unit-test-app/components/test_utils/test_utils.c +++ b/tools/unit-test-app/components/test_utils/test_utils.c @@ -22,7 +22,7 @@ #include "tcpip_adapter.h" #include "lwip/sockets.h" -const esp_partition_t *get_test_data_partition() +const esp_partition_t *get_test_data_partition(void) { /* This finds "flash_test" partition defined in partition_table_unit_test_app.csv */ const esp_partition_t *result = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, @@ -31,7 +31,7 @@ const esp_partition_t *get_test_data_partition() return result; } -void test_case_uses_tcpip() +void test_case_uses_tcpip(void) { // Can be called more than once, does nothing on subsequent calls tcpip_adapter_init(); diff --git a/tools/unit-test-app/main/app_main.c b/tools/unit-test-app/main/app_main.c index 4385b3b0e..f9df657da 100644 --- a/tools/unit-test-app/main/app_main.c +++ b/tools/unit-test-app/main/app_main.c @@ -1,6 +1,6 @@ #include "test_utils.h" -void app_main() +void app_main(void) { test_main(); } diff --git a/tools/windows/tool_setup/cmdlinerunner/cmdlinerunner.c b/tools/windows/tool_setup/cmdlinerunner/cmdlinerunner.c index 0688ea430..c5ee95e3e 100644 --- a/tools/windows/tool_setup/cmdlinerunner/cmdlinerunner.c +++ b/tools/windows/tool_setup/cmdlinerunner/cmdlinerunner.c @@ -35,7 +35,7 @@ struct proc_instance_s { }; #ifdef WITH_DEBUG -static void print_last_error() +static void print_last_error(void) { DWORD dw; TCHAR errmsg[LINESIZE]; @@ -51,7 +51,7 @@ static void print_last_error() #define PRINT_LAST_ERROR() #endif -static proc_instance_t *proc_instance_allocate() +static proc_instance_t *proc_instance_allocate(void) { return (proc_instance_t*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(proc_instance_t)); }