disable -Wunused-parameter on subscr functions
This commit is contained in:
parent
75e1e7da4b
commit
a9baa441c9
|
@ -60,6 +60,7 @@ STATIC void machine_mem_print(const mp_print_t *print, mp_obj_t self_in, mp_prin
|
|||
mp_printf(print, "<%u-bit memory>", 8 * self->elem_size);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
STATIC mp_obj_t machine_mem_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
|
||||
// TODO support slice index to read/write multiple values at once
|
||||
machine_mem_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
|
|
|
@ -246,6 +246,7 @@ STATIC mp_obj_t btree_iternext(mp_obj_t self_in) {
|
|||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
STATIC mp_obj_t btree_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
|
||||
mp_obj_btree_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
if (value == MP_OBJ_NULL) {
|
||||
|
|
|
@ -518,6 +518,7 @@ STATIC void uctypes_struct_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
|
|||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
STATIC mp_obj_t uctypes_struct_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value, mp_obj_t instance) {
|
||||
mp_obj_uctypes_struct_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
|
||||
|
|
|
@ -241,6 +241,7 @@ STATIC void get_jclass_name(jobject obj, char *buf) {
|
|||
check_exception();
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
STATIC mp_obj_t jobject_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
|
||||
mp_obj_jobject_t *self = self_in;
|
||||
mp_uint_t idx = mp_obj_get_int(index);
|
||||
|
|
|
@ -396,6 +396,7 @@ STATIC mp_obj_t array_extend(mp_obj_t self_in, mp_obj_t arg_in) {
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(array_extend_obj, array_extend);
|
||||
#endif
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
STATIC mp_obj_t array_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value, mp_obj_t instance) {
|
||||
if (value == MP_OBJ_NULL) {
|
||||
// delete item
|
||||
|
|
|
@ -174,6 +174,7 @@ mp_obj_t mp_obj_dict_get(mp_obj_t self_in, mp_obj_t index) {
|
|||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
STATIC mp_obj_t dict_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
|
||||
if (value == MP_OBJ_NULL) {
|
||||
// delete
|
||||
|
|
|
@ -158,6 +158,7 @@ STATIC mp_obj_t list_binary_op(mp_binary_op_t op, mp_obj_t lhs, mp_obj_t rhs) {
|
|||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
STATIC mp_obj_t list_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
|
||||
if (value == MP_OBJ_NULL) {
|
||||
// delete
|
||||
|
|
|
@ -158,6 +158,7 @@ STATIC mp_obj_t range_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs
|
|||
}
|
||||
#endif
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
STATIC mp_obj_t range_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
|
||||
if (value == MP_OBJ_SENTINEL) {
|
||||
// load
|
||||
|
|
|
@ -439,6 +439,7 @@ const byte *str_index_to_ptr(const mp_obj_type_t *type, const byte *self_data, s
|
|||
#endif
|
||||
|
||||
// This is used for both bytes and 8-bit strings. This is not used for unicode strings.
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
STATIC mp_obj_t bytes_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
|
||||
mp_obj_type_t *type = mp_obj_get_type(self_in);
|
||||
GET_STR_DATA_LEN(self_in, self_data, self_len);
|
||||
|
|
|
@ -197,6 +197,7 @@ const byte *str_index_to_ptr(const mp_obj_type_t *type, const byte *self_data, s
|
|||
return s;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
STATIC mp_obj_t str_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
|
||||
mp_obj_type_t *type = mp_obj_get_type(self_in);
|
||||
assert(type == &mp_type_str);
|
||||
|
|
|
@ -177,6 +177,7 @@ mp_obj_t mp_obj_tuple_binary_op(mp_binary_op_t op, mp_obj_t lhs, mp_obj_t rhs) {
|
|||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
mp_obj_t mp_obj_tuple_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
|
||||
if (value == MP_OBJ_SENTINEL) {
|
||||
// load
|
||||
|
|
|
@ -133,6 +133,7 @@ const mp_obj_property_t displayio_bitmap_height_obj = {
|
|||
//|
|
||||
//| bitmap[0,1] = 3
|
||||
//|
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
STATIC mp_obj_t bitmap_subscr(mp_obj_t self_in, mp_obj_t index_obj, mp_obj_t value_obj, mp_obj_t instance) {
|
||||
if (value_obj == mp_const_none) {
|
||||
// delete item
|
||||
|
|
|
@ -310,6 +310,7 @@ STATIC mp_obj_t group_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
|
|||
//|
|
||||
//| del group[0]
|
||||
//|
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
STATIC mp_obj_t group_subscr(mp_obj_t self_in, mp_obj_t index_obj, mp_obj_t value, mp_obj_t instance) {
|
||||
displayio_group_t *self = native_group(self_in);
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ STATIC mp_obj_t group_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
|
|||
//| palette[2] = b'\xff\xff\x00\x00' # set using 4 bytes
|
||||
//| palette[3] = bytearray(b'\x00\x00\xFF') # set using a bytearay of 3 or 4 bytes
|
||||
//|
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
STATIC mp_obj_t palette_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value, mp_obj_t instance) {
|
||||
if (value == MP_OBJ_NULL) {
|
||||
// delete item
|
||||
|
|
Loading…
Reference in New Issue