8000 Enable -Werror=old-style-definition against more ports · Neradoc/circuitpython@5cbecae · GitHub
[go: up one dir, main page]

Skip to content

Commit 5cbecae

Browse files
committed
Enable -Werror=old-style-definition against more ports
1 parent 837cfa0 commit 5cbecae

File tree

23 files changed

+30
-30
lines changed

23 files changed

+30
-30
lines changed

ports/broadcom/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ else
9595
endif
9696

9797

98-
CFLAGS += $(INC) -Wall -Werror -std=gnu11 $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) $(DISABLE_WARNINGS)
98+
CFLAGS += $(INC) -Wall -Werror -std=gnu11 $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) $(DISABLE_WARNINGS) -Werror=old-style-definition
9999

100100
$(BUILD)/lib/tlsf/tlsf.o: CFLAGS += -Wno-cast-align
101101

ports/cxd56/common-hal/camera/Camera.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static const image_size_t isx019_image_size_table[] = {
4444
{ VIDEO_HSIZE_QUADVGA, VIDEO_VSIZE_QUADVGA },
4545
};
4646

47-
static const char *get_imgsensor_name() {
47+
static const char *get_imgsensor_name(void) {
4848
static struct v4l2_capability cap;
4949

5050
ioctl(camera_dev.fd, VIDIOC_QUERYCAP, (unsigned long)&cap);
@@ -113,7 +113,7 @@ static void camera_start_streaming(enum v4l2_buf_type type) {
113113
ioctl(camera_dev.fd, VIDIOC_STREAMON, (unsigned long)&type);
114114
}
115115

116-
static void camera_start_preview() {
116+
static void camera_start_preview(void) {
117117
camera_set_format(V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_PIX_FMT_UYVY, VIDEO_HSIZE_QVGA, VIDEO_VSIZE_QVGA);
118118

119119
v4l2_buffer_t buf;

ports/espressif/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ endif
191191
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
192192
CFLAGS += $(OPTIMIZATION_FLAGS)
193193

194-
CFLAGS += $(INC) -Werror -Wall -std=gnu11 -Wl,--gc-sections $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes
194+
CFLAGS += $(INC) -Werror -Wall -std=gnu11 -Wl,--gc-sections $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes -Werror=old-style-definition
195195

196196
# Most current ESPs have nano versions of newlib in ROM so we use them.
197197
ifneq ($(IDF_TARGET),esp32c6)

ports/espressif/common-hal/_bleio/__init__.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static uint64_t _timeout_start_time;
3131

3232
background_callback_t bleio_background_callback;
3333

34-
void bleio_user_reset() {
34+
void bleio_user_reset(void) {
3535
// Stop any user scanning or advertising.
3636
common_hal_bleio_adapter_stop_scan(&common_hal_bleio_adapter_obj);
3737
common_hal_bleio_adapter_stop_advertising(&common_hal_bleio_adapter_obj);
@@ -43,7 +43,7 @@ void bleio_user_reset() {
4343
}
4444

4545
// Turn off BLE on a reset or reload.
46-
void bleio_reset() {
46+
void bleio_reset(void) {
4747
// Set this explicitly to save data.
4848
if (!common_hal_bleio_adapter_get_enabled(&common_hal_bleio_adapter_obj)) {
4949
return;

ports/espressif/common-hal/sdioio/SDCard.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ void common_hal_sdioio_sdcard_never_reset(sdioio_sdcard_obj_t *self) {
245245
}
246246
}
247247

248-
void sdioio_reset() {
248+
void sdioio_reset(void) {
249249
for (size_t i = 0; i < MP_ARRAY_SIZE(slot_in_use); i++) {
250250
if (!never_reset_sdio[i]) {
251251
slot_in_use[i] = false;

ports/espressif/supervisor/port.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,19 +461,19 @@ void port_disable_tick(void) {
461461
esp_timer_stop(_tick_timer);
462462
}
463463

464-
void port_wake_main_task() {
464+
void port_wake_main_task(void) {
465465
xTaskNotifyGive(circuitpython_task);
466466
}
467467

468-
void port_wake_main_task_from_isr() {
468+
void port_wake_main_task_from_isr(void) {
469469
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
470470
vTaskNotifyGiveFromISR(circuitpython_task, &xHigherPriorityTaskWoken);
471471
if (xHigherPriorityTaskWoken == pdTRUE) {
472472
portYIELD_FROM_ISR();
473473
}
474474
}
475475

476-
void port_yield() {
476+
void port_yield(void) {
477477
vTaskDelay(4);
478478
}
479479

ports/litex/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ endif
3838
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
3939
CFLAGS += $(OPTIMIZATION_FLAGS)
4040

41-
CFLAGS += $(INC) -Werror -Wall -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes
41+
CFLAGS += $(INC) -Werror -Wall -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes -Werror=old-style-definition
4242

4343
# TODO: check this
4444
CFLAGS += -D__START=main -DFOMU

ports/mimxrt10xx/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ ifeq ($(DEBUG), 1)
4545
CFLAGS += -fno-ipa-sra
4646
endif
4747

48-
CFLAGS += $(INC) -ggdb -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes
48+
CFLAGS += $(INC) -ggdb -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes -Werror=old-style-definition
4949

5050
# TODO: add these when -Werror is applied
5151
# Disable some warnings, as do most ports. NXP SDK causes undef, tinyusb causes cast-align

ports/mimxrt10xx/common-hal/audiobusio/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,6 @@ void port_i2s_resume(i2s_t *self) {
439439
self->paused = false;
440440
}
441441

442-
void i2s_reset() {
442+
void i2s_reset(void) {
443443
// this port relies on object finalizers for reset
444444
}

ports/nordic/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ endif
4747
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
4848
CFLAGS += $(OPTIMIZATION_FLAGS)
4949

50-
CFLAGS += $(INC) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes
50+
CFLAGS += $(INC) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes -Werror=old-style-definition
5151

5252
# Nordic Softdevice SDK header files contains inline assembler that has
5353
# broken constraints. As a result the IPA-modref pass, introduced in gcc-11,

0 commit comments

Comments
 (0)
0