Skip to content

Commit e3c66a5

Browse files
committed
stmhal/file: Paranoid compiler warnings cleanness.
1 parent baf47c8 commit e3c66a5

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

stmhal/file.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ typedef struct _pyb_file_obj_t {
7070
FIL fp;
7171
} pyb_file_obj_t;
7272

73-
void file_obj_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
73+
STATIC void file_obj_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
74+
(void)kind;
7475
mp_printf(print, "<io.%s %p>", mp_obj_get_type_str(self_in), self_in);
7576
}
7677

@@ -108,14 +109,15 @@ STATIC mp_obj_t file_obj_flush(mp_obj_t self_in) {
108109
}
109110
STATIC MP_DEFINE_CONST_FUN_OBJ_1(file_obj_flush_obj, file_obj_flush);
110111

111-
mp_obj_t file_obj_close(mp_obj_t self_in) {
112+
STATIC mp_obj_t file_obj_close(mp_obj_t self_in) {
112113
pyb_file_obj_t *self = MP_OBJ_TO_PTR(self_in);
113114
f_close(&self->fp);
114115
return mp_const_none;
115116
}
116117
STATIC MP_DEFINE_CONST_FUN_OBJ_1(file_obj_close_obj, file_obj_close);
117118

118-
mp_obj_t file_obj___exit__(size_t n_args, const mp_obj_t *args) {
119+
STATIC mp_obj_t file_obj___exit__(size_t n_args, const mp_obj_t *args) {
120+
(void)n_args;
119121
return file_obj_close(args[0]);
120122
}
121123
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(file_obj___exit___obj, 4, 4, file_obj___exit__);

0 commit comments

Comments
 (0)