Skip to content

Commit a9baa44

Browse files
committed
disable -Wunused-parameter on subscr functions
1 parent 75e1e7d commit a9baa44

14 files changed

Lines changed: 14 additions & 0 deletions

File tree

extmod/machine_mem.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ STATIC void machine_mem_print(const mp_print_t *print, mp_obj_t self_in, mp_prin
6060
mp_printf(print, "<%u-bit memory>", 8 * self->elem_size);
6161
}
6262

63+
#pragma GCC diagnostic ignored "-Wunused-parameter"
6364
STATIC mp_obj_t machine_mem_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
6465
// TODO support slice index to read/write multiple values at once
6566
machine_mem_obj_t *self = MP_OBJ_TO_PTR(self_in);

extmod/modbtree.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ STATIC mp_obj_t btree_iternext(mp_obj_t self_in) {
246246
}
247247
}
248248

249+
#pragma GCC diagnostic ignored "-Wunused-parameter"
249250
STATIC mp_obj_t btree_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
250251
mp_obj_btree_t *self = MP_OBJ_TO_PTR(self_in);
251252
if (value == MP_OBJ_NULL) {

extmod/moductypes.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ STATIC void uctypes_struct_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
518518
}
519519
}
520520

521+
#pragma GCC diagnostic ignored "-Wunused-parameter"
521522
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) {
522523
mp_obj_uctypes_struct_t *self = MP_OBJ_TO_PTR(self_in);
523524

ports/unix/modjni.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ STATIC void get_jclass_name(jobject obj, char *buf) {
241241
check_exception();
242242
}
243243

244+
#pragma GCC diagnostic ignored "-Wunused-parameter"
244245
STATIC mp_obj_t jobject_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
245246
mp_obj_jobject_t *self = self_in;
246247
mp_uint_t idx = mp_obj_get_int(index);

py/objarray.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ STATIC mp_obj_t array_extend(mp_obj_t self_in, mp_obj_t arg_in) {
396396
STATIC MP_DEFINE_CONST_FUN_OBJ_2(array_extend_obj, array_extend);
397397
#endif
398398

399+
#pragma GCC diagnostic ignored "-Wunused-parameter"
399400
STATIC mp_obj_t array_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value, mp_obj_t instance) {
400401
if (value == MP_OBJ_NULL) {
401402
// delete item

py/objdict.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ mp_obj_t mp_obj_dict_get(mp_obj_t self_in, mp_obj_t index) {
174174
}
175175
}
176176

177+
#pragma GCC diagnostic ignored "-Wunused-parameter"
177178
STATIC mp_obj_t dict_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
178179
if (value == MP_OBJ_NULL) {
179180
// delete

py/objlist.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ STATIC mp_obj_t list_binary_op(mp_binary_op_t op, mp_obj_t lhs, mp_obj_t rhs) {
158158
}
159159
}
160160

161+
#pragma GCC diagnostic ignored "-Wunused-parameter"
161162
STATIC mp_obj_t list_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
162163
if (value == MP_OBJ_NULL) {
163164
// delete

py/objrange.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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
158158
}
159159
#endif
160160

161+
#pragma GCC diagnostic ignored "-Wunused-parameter"
161162
STATIC mp_obj_t range_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
162163
if (value == MP_OBJ_SENTINEL) {
163164
// load

py/objstr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ const byte *str_index_to_ptr(const mp_obj_type_t *type, const byte *self_data, s
439439
#endif
440440

441441
// This is used for both bytes and 8-bit strings. This is not used for unicode strings.
442+
#pragma GCC diagnostic ignored "-Wunused-parameter"
442443
STATIC mp_obj_t bytes_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
443444
mp_obj_type_t *type = mp_obj_get_type(self_in);
444445
GET_STR_DATA_LEN(self_in, self_data, self_len);

py/objstrunicode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ const byte *str_index_to_ptr(const mp_obj_type_t *type, const byte *self_data, s
197197
return s;
198198
}
199199

200+
#pragma GCC diagnostic ignored "-Wunused-parameter"
200201
STATIC mp_obj_t str_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value, mp_obj_t instance) {
201202
mp_obj_type_t *type = mp_obj_get_type(self_in);
202203
assert(type == &mp_type_str);

0 commit comments

Comments
 (0)