Fix unused variable diagnostics, make it a fatal error
This commit is contained in:
parent
37620d4eb0
commit
afc1c0e3bb
@ -198,7 +198,7 @@ else
|
||||
endif
|
||||
|
||||
# Remove -Wno-stringop-overflow after we can test with CI's GCC 10. Mac's looks weird.
|
||||
DISABLE_WARNINGS = -Wno-stringop-overflow -Wno-unused-variable -Wno-strict-overflow -Wno-cast-align
|
||||
DISABLE_WARNINGS = -Wno-stringop-overflow -Wno-strict-overflow -Wno-cast-align
|
||||
|
||||
CFLAGS += $(INC) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) $(DISABLE_WARNINGS) -Werror=missing-prototypes
|
||||
|
||||
@ -256,7 +256,7 @@ SRC_SDK := \
|
||||
$(SRC_SDK_CYW43) \
|
||||
|
||||
SRC_SDK := $(addprefix sdk/, $(SRC_SDK))
|
||||
$(patsubst %.c,$(BUILD)/%.o,$(SRC_SDK) $(SRC_CYW43)): CFLAGS += -Wno-missing-prototypes -Wno-undef -Wno-unused-function -Wno-nested-externs -Wno-strict-prototypes -Wno-double-promotion -Wno-sign-compare
|
||||
$(patsubst %.c,$(BUILD)/%.o,$(SRC_SDK) $(SRC_CYW43)): CFLAGS += -Wno-missing-prototypes -Wno-undef -Wno-unused-function -Wno-nested-externs -Wno-strict-prototypes -Wno-double-promotion -Wno-sign-compare -Wno-unused-variable
|
||||
|
||||
SRC_C += \
|
||||
boards/$(BOARD)/board.c \
|
||||
|
@ -259,10 +259,10 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n
|
||||
bufinfo.buf, bufinfo.len / 2,
|
||||
args[ARG_frequency].u_int,
|
||||
init_bufinfo.buf, init_bufinfo.len / 2,
|
||||
first_out_pin, args[ARG_out_pin_count].u_int, args[ARG_initial_out_pin_state].u_int, args[ARG_initial_out_pin_direction].u_int,
|
||||
first_in_pin, args[ARG_in_pin_count].u_int, args[ARG_pull_in_pin_up].u_int, args[ARG_pull_in_pin_down].u_int,
|
||||
first_set_pin, args[ARG_set_pin_count].u_int, args[ARG_initial_set_pin_state].u_int, args[ARG_initial_set_pin_direction].u_int,
|
||||
first_sideset_pin, args[ARG_sideset_pin_count].u_int, args[ARG_initial_sideset_pin_state].u_int, args[ARG_initial_sideset_pin_direction].u_int,
|
||||
first_out_pin, out_pin_count, args[ARG_initial_out_pin_state].u_int, args[ARG_initial_out_pin_direction].u_int,
|
||||
first_in_pin, in_pin_count, args[ARG_pull_in_pin_up].u_int, args[ARG_pull_in_pin_down].u_int,
|
||||
first_set_pin, set_pin_count, args[ARG_initial_set_pin_state].u_int, args[ARG_initial_set_pin_direction].u_int,
|
||||
first_sideset_pin, sideset_pin_count, args[ARG_initial_sideset_pin_state].u_int, args[ARG_initial_sideset_pin_direction].u_int,
|
||||
args[ARG_sideset_enable].u_bool,
|
||||
jmp_pin, jmp_pin_pull,
|
||||
0,
|
||||
@ -397,7 +397,6 @@ STATIC mp_obj_t rp2pio_statemachine_write(size_t n_args, const mp_obj_t *pos_arg
|
||||
return mp_const_none;
|
||||
}
|
||||
|
||||
uint8_t *original_pointer = bufinfo.buf;
|
||||
int stride_in_bytes = mp_binary_get_size('@', bufinfo.typecode, NULL);
|
||||
if (stride_in_bytes > 4) {
|
||||
mp_raise_ValueError(translate("Buffer elements must be 4 bytes long or less"));
|
||||
@ -606,7 +605,6 @@ STATIC mp_obj_t rp2pio_statemachine_readinto(size_t n_args, const mp_obj_t *pos_
|
||||
return mp_const_none;
|
||||
}
|
||||
|
||||
uint8_t *original_pointer = bufinfo.buf;
|
||||
int stride_in_bytes = mp_binary_get_size('@', bufinfo.typecode, NULL);
|
||||
if (stride_in_bytes > 4) {
|
||||
mp_raise_ValueError(translate("Buffer elements must be 4 bytes long or less"));
|
||||
|
@ -31,7 +31,6 @@ void common_hal_countio_counter_construct(countio_counter_obj_t *self,
|
||||
mp_raise_RuntimeError(translate("PWM slice already in use"));
|
||||
}
|
||||
|
||||
uint8_t ab_channel = pwm_gpio_to_channel(self->pin);
|
||||
if (!pwmio_claim_slice_ab_channels(self->slice_num)) {
|
||||
mp_raise_RuntimeError(translate("PWM slice channel A already in use"));
|
||||
}
|
||||
|
@ -158,7 +158,6 @@ digitalinout_result_t common_hal_digitalio_digitalinout_set_drive_mode(
|
||||
}
|
||||
}
|
||||
#endif
|
||||
const uint8_t pin = self->pin->number;
|
||||
bool value = common_hal_digitalio_digitalinout_get_value(self);
|
||||
self->open_drain = drive_mode == DRIVE_MODE_OPEN_DRAIN;
|
||||
// True is implemented differently between modes so reset the value to make
|
||||
|
@ -120,11 +120,6 @@ void common_hal_imagecapture_parallelimagecapture_construct(imagecapture_paralle
|
||||
true, 32, true, // in settings
|
||||
false, // Not user-interruptible.
|
||||
2, 5); // wrap settings
|
||||
|
||||
|
||||
PIO pio = self->state_machine.pio;
|
||||
uint8_t pio_index = pio_get_index(pio);
|
||||
uint sm = self->state_machine.state_machine;
|
||||
}
|
||||
|
||||
void common_hal_imagecapture_parallelimagecapture_deinit(imagecapture_parallelimagecapture_obj_t *self) {
|
||||
|
@ -871,7 +871,7 @@ bool common_hal_rp2pio_statemachine_get_txstall(rp2pio_statemachine_obj_t *self)
|
||||
}
|
||||
|
||||
void common_hal_rp2pio_statemachine_clear_txstall(rp2pio_statemachine_obj_t *self) {
|
||||
uint8_t level = pio_sm_get_rx_fifo_level(self->pio, self->state_machine);
|
||||
(void)pio_sm_get_rx_fifo_level(self->pio, self->state_machine);
|
||||
uint32_t stall_mask = 1 << (PIO_FDEBUG_TXSTALL_LSB + self->state_machine);
|
||||
self->pio->fdebug = stall_mask;
|
||||
}
|
||||
|
@ -829,7 +829,6 @@ socketpool_socket_obj_t *common_hal_socketpool_socket_accept(socketpool_socket_o
|
||||
|
||||
bool common_hal_socketpool_socket_bind(socketpool_socket_obj_t *socket,
|
||||
const char *host, size_t hostlen, uint32_t port) {
|
||||
uint8_t ip[NETUTILS_IPV4ADDR_BUFSIZE];
|
||||
|
||||
// get address
|
||||
ip_addr_t bind_addr;
|
||||
|
@ -82,7 +82,6 @@ void wifi_reset(void) {
|
||||
}
|
||||
// the cyw43 wifi chip is not reset due to https://github.com/raspberrypi/pico-sdk/issues/980
|
||||
common_hal_wifi_monitor_deinit(MP_STATE_VM(wifi_monitor_singleton));
|
||||
wifi_radio_obj_t *radio = &common_hal_wifi_radio_obj;
|
||||
common_hal_wifi_radio_obj.current_scan = NULL;
|
||||
// common_hal_wifi_radio_set_enabled(radio, false);
|
||||
supervisor_workflow_request_background();
|
||||
|
Loading…
Reference in New Issue
Block a user