summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Hooper <rhooper@toybox.ca>2019-11-23 13:52:14 -0500
committerRoy Hooper <rhooper@toybox.ca>2019-11-23 13:52:14 -0500
commita9baa441c94bf4ba9fe676a34e8a47fee6001559 (patch)
tree05f914a9697010523cfcacf807cee99318eb910b
parent75e1e7da4b2cae6adae2b3e12ec4fb6de628598d (diff)
disable -Wunused-parameter on subscr functions
-rw-r--r--extmod/machine_mem.c1
-rw-r--r--extmod/modbtree.c1
-rw-r--r--extmod/moductypes.c1
-rw-r--r--ports/unix/modjni.c1
-rw-r--r--py/objarray.c1
-rw-r--r--py/objdict.c1
-rw-r--r--py/objlist.c1
-rw-r--r--py/objrange.c1
-rw-r--r--py/objstr.c1
-rw-r--r--py/objstrunicode.c1
-rw-r--r--py/objtuple.c1
-rw-r--r--shared-bindings/displayio/Bitmap.c1
-rw-r--r--shared-bindings/displayio/Group.c1
-rw-r--r--shared-bindings/displayio/Palette.c1
14 files changed, 14 insertions, 0 deletions
diff --git a/extmod/machine_mem.c b/extmod/machine_mem.c
index b80eaea99..826c59d0f 100644
--- a/extmod/machine_mem.c
+++ b/extmod/machine_mem.c
@@ -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);
diff --git a/extmod/modbtree.c b/extmod/modbtree.c
index cfc614c13..97a4de3d5 100644
--- a/extmod/modbtree.c
+++ b/extmod/modbtree.c
@@ -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) {
diff --git a/extmod/moductypes.c b/extmod/moductypes.c
index 2165152ea..722f4bb87 100644
--- a/extmod/moductypes.c
+++ b/extmod/moductypes.c
@@ -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);
diff --git a/ports/unix/modjni.c b/ports/unix/modjni.c
index 4aefb2476..50dd10dd2 100644
--- a/ports/unix/modjni.c
+++ b/ports/unix/modjni.c
@@ -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);
diff --git a/py/objarray.c b/py/objarray.c
index 70e57f190..6fffa8412 100644
--- a/py/objarray.c
+++ b/py/objarray.c
@@ -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
diff --git a/py/objdict.c b/py/objdict.c
index c13ad88e5..2c07331e7 100644
--- a/py/objdict.c
+++ b/py/objdict.c
@@ -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
diff --git a/py/objlist.c b/py/objlist.c
index b0c62a6ee..c544c27f0 100644
--- a/py/objlist.c
+++ b/py/objlist.c
@@ -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
diff --git a/py/objrange.c b/py/objrange.c
index f8b960900..328416303 100644
--- a/py/objrange.c
+++ b/py/objrange.c
@@ -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
diff --git a/py/objstr.c b/py/objstr.c
index 4e1715322..fd802fe85 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -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);
diff --git a/py/objstrunicode.c b/py/objstrunicode.c
index e29926683..dc8c0743d 100644
--- a/py/objstrunicode.c
+++ b/py/objstrunicode.c
@@ -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);
diff --git a/py/objtuple.c b/py/objtuple.c
index 625c53bdd..b6640def5 100644
--- a/py/objtuple.c
+++ b/py/objtuple.c
@@ -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
diff --git a/shared-bindings/displayio/Bitmap.c b/shared-bindings/displayio/Bitmap.c
index 764313e1e..7c77d05ed 100644
--- a/shared-bindings/displayio/Bitmap.c
+++ b/shared-bindings/displayio/Bitmap.c
@@ -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
diff --git a/shared-bindings/displayio/Group.c b/shared-bindings/displayio/Group.c
index 2288026dc..40f2704c0 100644
--- a/shared-bindings/displayio/Group.c
+++ b/shared-bindings/displayio/Group.c
@@ -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);
diff --git a/shared-bindings/displayio/Palette.c b/shared-bindings/displayio/Palette.c
index 491f9343b..2fa65867a 100644
--- a/shared-bindings/displayio/Palette.c
+++ b/shared-bindings/displayio/Palette.c
@@ -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