Skip to content

Commit 837cfa0

Browse files
committed
Enable old-style-definition diagnostic on atmel-samd
1 parent 17bb1eb commit 837cfa0

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

ports/atmel-samd/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ else
107107
endif
108108
endif
109109

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

112112
ifeq ($(CHIP_FAMILY), samd21)
113113
CFLAGS += \

ports/atmel-samd/audio_dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static audio_dma_t *audio_dma_state[AUDIO_DMA_CHANNEL_COUNT];
3030
// This cannot be in audio_dma_state because it's volatile.
3131
static volatile bool audio_dma_pending[AUDIO_DMA_CHANNEL_COUNT];
3232

33-
uint8_t find_sync_event_channel_raise() {
33+
uint8_t find_sync_event_channel_raise(void) {
3434
uint8_t event_channel = find_sync_event_channel();
3535
if (event_channel >= EVSYS_SYNCH_NUM) {
3636
mp_raise_RuntimeError(MP_ERROR_TEXT("All sync event channels in use"));

ports/atmel-samd/common-hal/_pew/PewPew.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void pewpew_interrupt_handler(uint8_t index) {
3838
tc->COUNT16.INTFLAG.reg = TC_INTFLAG_MC0;
3939
}
4040

41-
void pew_init() {
41+
void pew_init(void) {
4242
pew_obj_t *pew = MP_STATE_VM(pew_singleton);
4343

4444
common_hal_digitalio_digitalinout_switch_to_input(pew->buttons, PULL_UP);
@@ -105,6 +105,6 @@ void pew_reset(void) {
105105
MP_STATE_VM(pew_singleton) = NULL;
106106
}
107107

108-
uint16_t pew_get_ticks() {
108+
uint16_t pew_get_ticks(void) {
109109
return pewpew_ticks;
110110
}

ports/atmel-samd/common-hal/analogio/AnalogIn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void common_hal_analogio_analogin_deinit(analogio_analogin_obj_t *self) {
6464
self->pin = NULL;
6565
}
6666

67-
void analogin_reset() {
67+
void analogin_reset(void) {
6868
}
6969

7070
uint16_t common_hal_analogio_analogin_get_value(analogio_analogin_obj_t *self) {

ports/atmel-samd/common-hal/touchio/TouchIn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void common_hal_touchio_touchin_deinit(touchio_touchin_obj_t *self) {
9191
self->config.pin = NO_PIN;
9292
}
9393

94-
void touchin_reset() {
94+
void touchin_reset(void) {
9595
Ptc *ptc = ((Ptc *)PTC);
9696
if (ptc->CTRLA.bit.ENABLE == 1) {
9797
ptc->CTRLA.bit.ENABLE = 0;

0 commit comments

Comments
 (0)