8000 Merge pull request #10372 from jepler/old-style-definition · adafruit/circuitpython@17bb1eb · GitHub
[go: up one dir, main page]

Skip to content

Commit 17bb1eb

Browse files
authored
Merge pull request #10372 from jepler/old-style-definition
2 parents af8de21 + 953694d commit 17bb1eb

File tree

11 files changed

+27
-24
lines changed

11 files changed

+27
-24
lines changed

devices/ble_hci/common-hal/_bleio/__init__.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ bool vm_used_ble;
4040
void common_hal_bleio_init(void) {
4141
}
4242

43-
void bleio_user_reset() {
43+
void bleio_user_reset(void) {
4444
// HCI doesn't support the BLE workflow so just do a full reset.
4545
bleio_reset();
4646
}
4747

4848
// Turn off BLE on a reset or reload.
49-
void bleio_reset() {
49+
void bleio_reset(void) {
5050
// Create a UUID object for all CCCD's.
5151
cccd_uuid.base.type = &bleio_uuid_type;
5252
common_hal_bleio_uuid_construct(&cccd_uuid, BLE_UUID_CCCD, NULL);

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ void gc_collect(void) {
11801180
}
11811181

11821182
// Ports may provide an implementation of this function if it is needed
1183-
MP_WEAK void port_gc_collect() {
1183+
MP_WEAK void port_gc_collect(void) {
11841184
}
11851185

11861186
size_t gc_get_max_new_split(void) {

ports/raspberrypi/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ endif
223223

224224
DISABLE_WARNINGS = -Wno-cast-align
225225

226-
CFLAGS += $(INC) -Wtype-limits -Wall -Werror -std=gnu11 -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) $(DISABLE_WARNINGS) -Werror=missing-prototypes
226+
CFLAGS += $(INC) -Wtype-limits -Wall -Werror -std=gnu11 -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) $(DISABLE_WARNINGS) -Werror=missing-prototypes -Wold-style-definition
227227

228228
PICO_LDFLAGS = --specs=nosys.specs --specs=nano.specs
229229

@@ -562,12 +562,15 @@ SRC_C += \
562562
common-hal/picodvi/Framebuffer_$(CHIP_VARIANT).c \
563563

564564
ifeq ($(CHIP_VARIANT),RP2040)
565-
SRC_C += \
565+
SRC_PICODVI := \
566566
lib/PicoDVI/software/libdvi/dvi.c \
567567
lib/PicoDVI/software/libdvi/dvi_serialiser.c \
568568
lib/PicoDVI/software/libdvi/dvi_timing.c \
569569
lib/PicoDVI/software/libdvi/tmds_encode.c \
570570

571+
SRC_C += $(SRC_PICODVI)
572+
$(patsubst %.c,$(BUILD)/%.o,$(SRC_PICODVI))): CFLAGS += -Wno-old-style-definition
573+
571574
endif
572575

573576
endif

ports/raspberrypi/bindings/cyw43/__init__.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ MP_DEFINE_CONST_OBJ_TYPE(
4343
print, shared_bindings_microcontroller_pin_print
4444
);
4545

46-
uint32_t cyw43_get_power_management_value() {
46+
uint32_t cyw43_get_power_management_value(void) {
4747
return power_management_value;
4848
}
4949

@@ -103,7 +103,7 @@ static MP_DEFINE_CONST_FUN_OBJ_1(cyw43_set_power_management_obj, cyw43_set_power
103103
//| """Retrieve the power management register"""
104104
//|
105105
//|
106-
static mp_obj_t cyw43_get_power_management() {
106+
static mp_obj_t cyw43_get_power_management(void) {
107107
return mp_obj_new_int(power_management_value);
108108
}
109109
static MP_DEFINE_CONST_FUN_OBJ_0(cyw43_get_power_management_obj, cyw43_get_power_management);

ports/raspberrypi/common-hal/alarm/pin/PinAlarm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static void gpio_callback(uint gpio, uint32_t events) {
3939
}
4040
}
4141

42-
void alarm_pin_pinalarm_entering_deep_sleep() {
42+
void alarm_pin_pinalarm_entering_deep_sleep(void) {
4343
_not_yet_deep_sleeping = false;
4444
}
4545

ports/raspberrypi/supervisor/port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ __attribute__((used)) void __not_in_flash_func(isr_hardfault)(void) {
584584
}
585585
}
586586

587-
void port_yield() {
587+
void port_yield(void) {
588588
#if CIRCUITPY_CYW43
589589
cyw43_arch_poll();
590590
#endif

shared-module/touchio/TouchIn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void common_hal_touchio_touchin_deinit(touchio_touchin_obj_t *self) {
8686
self->digitalinout = MP_OBJ_NULL;
8787
}
8888

89-
void touchin_reset() {
89+
void touchin_reset(void) {
9090
}
9191

9292
bool common_hal_touchio_touchin_get_value(touchio_touchin_obj_t *self) {

supervisor/shared/background_callback.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ inline bool background_callback_pending(void) {
5858

5959
static int background_prevention_count;
6060

61-
void PLACE_IN_ITCM(background_callback_run_all)() {
61+
void PLACE_IN_ITCM(background_callback_run_all)(void) {
6262
port_background_task();
6363
if (!background_callback_pending()) {
6464
return;
@@ -89,21 +89,21 @@ void PLACE_IN_ITCM(background_callback_run_all)() {
8989
CALLBACK_CRITICAL_END;
9090
}
9191

92-
void background_callback_prevent() {
92+
void background_callback_prevent(void) {
9393
CALLBACK_CRITICAL_BEGIN;
9494
++background_prevention_count;
9595
CALLBACK_CRITICAL_END;
9696
}
9797

98-
void background_callback_allow() {
98+
void background_callback_allow(void) {
9999
CALLBACK_CRITICAL_BEGIN;
100100
--background_prevention_count;
101101
CALLBACK_CRITICAL_END;
102102
}
103103

104104

105105
// Filter out queued callbacks if they are allocated on the heap.
106-
void background_callback_reset() {
106+
void background_callback_reset(void) {
107107
background_callback_t *new_head = NULL;
108108
background_callback_t **previous_next = &new_head;
109109
background_callback_t *new_tail = NULL;

supervisor/shared/reload.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ void reload_initiate(supervisor_run_reason_t run_reason) {
3535
port_wake_main_task();
3636
}
3737

38-
void autoreload_reset() {
38+
void autoreload_reset(void) {
3939
last_autoreload_trigger = 0;
4040
}
4141

42-
void autoreload_enable() {
42+
void autoreload_enable(void) {
4343
autoreload_enabled = true;
4444
last_autoreload_trigger = 0;
4545
}
4646

47-
void autoreload_disable() {
47+
void autoreload_disable(void) {
4848
autoreload_enabled = false;
4949
}
5050

@@ -56,11 +56,11 @@ void autoreload_resume(uint32_t suspend_reason_mask) {
5656
autoreload_suspended &= ~suspend_reason_mask;
5757
}
5858

59-
inline bool autoreload_is_enabled() {
59+
inline bool autoreload_is_enabled(void) {
6060
return autoreload_enabled;
6161
}
6262

63-
void autoreload_trigger() {
63+
void autoreload_trigger(void) {
6464
if (!autoreload_enabled || autoreload_suspended != 0) {
6565
return;
6666
}
@@ -78,7 +78,7 @@ void autoreload_trigger() {
7878
}
7979
}
8080

81-
bool autoreload_ready() {
81+
bool autoreload_ready(void) {
8282
if (last_autoreload_trigger == 0 || autoreload_suspended != 0) {
8383
return false;
8484
}

supervisor/shared/status_leds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static uint32_t current_status_color = 0;
112112
#endif
113113

114114
static bool status_led_init_in_progress = false;
115-
void status_led_init() {
115+
void status_led_init(void) {
116116
if (status_led_init_in_progress) {
117117
// Avoid recursion.
118118
return;
@@ -186,7 +186,7 @@ void status_led_init() {
186186
status_led_init_in_progress = false;
187187
}
188188

189-
void status_led_deinit() {
189+
void status_led_deinit(void) {
190190
#ifdef MICROPY_HW_NEOPIXEL
191191
// Make sure the pin stays low for the reset period. The pin reset may pull
192192
// it up and stop the reset period.

supervisor/shared/tick.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ static uint64_t _get_raw_subticks(void) {
9292
return (ticks << 5) | subticks;
9393
}
9494

95-
uint64_t supervisor_ticks_ms64() {
95+
uint64_t supervisor_ticks_ms64(void) {
9696
uint64_t result;
9797
result = port_get_raw_ticks(NULL);
9898
result = result * 1000 / 1024;
9999
return result;
100100
}
101101

102-
uint32_t supervisor_ticks_ms32() {
102+
uint32_t supervisor_ticks_ms32(void) {
103103
return supervisor_ticks_ms64();
104104
}
105105

0 commit comments

Comments
 (0)
0