py: Eliminate warnings about unused arguments when debugging disabled.
This commit is contained in:
parent
5801a003f0
commit
4ee2c2a4cd
|
@ -2776,6 +2776,8 @@ STATIC int compile_viper_type_annotation(compiler_t *comp, mp_parse_node_t pn_an
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
STATIC void compile_scope_func_lambda_param(compiler_t *comp, mp_parse_node_t pn, pn_kind_t pn_name, pn_kind_t pn_star, pn_kind_t pn_dbl_star) {
|
STATIC void compile_scope_func_lambda_param(compiler_t *comp, mp_parse_node_t pn, pn_kind_t pn_name, pn_kind_t pn_star, pn_kind_t pn_dbl_star) {
|
||||||
|
(void)pn_dbl_star;
|
||||||
|
|
||||||
// check that **kw is last
|
// check that **kw is last
|
||||||
if ((comp->scope_cur->scope_flags & MP_SCOPE_FLAG_VARKEYWORDS) != 0) {
|
if ((comp->scope_cur->scope_flags & MP_SCOPE_FLAG_VARKEYWORDS) != 0) {
|
||||||
compile_syntax_error(comp, pn, "invalid syntax");
|
compile_syntax_error(comp, pn, "invalid syntax");
|
||||||
|
|
|
@ -2574,6 +2574,7 @@ STATIC void emit_native_return_value(emit_t *emit) {
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC void emit_native_raise_varargs(emit_t *emit, mp_uint_t n_args) {
|
STATIC void emit_native_raise_varargs(emit_t *emit, mp_uint_t n_args) {
|
||||||
|
(void)n_args;
|
||||||
assert(n_args == 1);
|
assert(n_args == 1);
|
||||||
vtype_kind_t vtype_exc;
|
vtype_kind_t vtype_exc;
|
||||||
emit_pre_pop_reg(emit, &vtype_exc, REG_ARG_1); // arg1 = object to raise
|
emit_pre_pop_reg(emit, &vtype_exc, REG_ARG_1); // arg1 = object to raise
|
||||||
|
|
|
@ -147,6 +147,7 @@ STATIC mp_uint_t bufwriter_write(mp_obj_t self_in, const void *buf, mp_uint_t si
|
||||||
buf = (byte*)buf + rem;
|
buf = (byte*)buf + rem;
|
||||||
size -= rem;
|
size -= rem;
|
||||||
mp_uint_t out_sz = mp_stream_write_exactly(self->stream, self->buf, self->alloc, errcode);
|
mp_uint_t out_sz = mp_stream_write_exactly(self->stream, self->buf, self->alloc, errcode);
|
||||||
|
(void)out_sz;
|
||||||
if (*errcode != 0) {
|
if (*errcode != 0) {
|
||||||
return MP_STREAM_ERROR;
|
return MP_STREAM_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -165,6 +166,7 @@ STATIC mp_obj_t bufwriter_flush(mp_obj_t self_in) {
|
||||||
if (self->len != 0) {
|
if (self->len != 0) {
|
||||||
int err;
|
int err;
|
||||||
mp_uint_t out_sz = mp_stream_write_exactly(self->stream, self->buf, self->len, &err);
|
mp_uint_t out_sz = mp_stream_write_exactly(self->stream, self->buf, self->len, &err);
|
||||||
|
(void)out_sz;
|
||||||
// TODO: try to recover from a case of non-blocking stream, e.g. move
|
// TODO: try to recover from a case of non-blocking stream, e.g. move
|
||||||
// remaining chunk to the beginning of buffer.
|
// remaining chunk to the beginning of buffer.
|
||||||
assert(out_sz == self->len);
|
assert(out_sz == self->len);
|
||||||
|
|
Loading…
Reference in New Issue