Commit 35762f31 authored by Rahix's avatar Rahix
Browse files

chore(pycardium-modules): Fix all warnings



Fix all warnings in pycardium/modules.
Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent d1826066
...@@ -29,7 +29,7 @@ bool pycrd_filename_restricted(const char *path) ...@@ -29,7 +29,7 @@ bool pycrd_filename_restricted(const char *path)
} }
fname = path; fname = path;
for (int i = 0; for (size_t i = 0;
i < sizeof(forbidden_files) / sizeof(forbidden_files[0]); i < sizeof(forbidden_files) / sizeof(forbidden_files[0]);
i++) { i++) {
if (strcasecmp(fname, forbidden_files[i]) == 0) { if (strcasecmp(fname, forbidden_files[i]) == 0) {
......
...@@ -120,7 +120,7 @@ static mp_obj_t mp_display_line(size_t n_args, const mp_obj_t *args) ...@@ -120,7 +120,7 @@ static mp_obj_t mp_display_line(size_t n_args, const mp_obj_t *args)
uint16_t ls = mp_obj_get_int(args[5]); uint16_t ls = mp_obj_get_int(args[5]);
uint16_t ps = mp_obj_get_int(args[6]); uint16_t ps = mp_obj_get_int(args[6]);
if (ls > 1 || ls < 0) { if (ls > 1) {
mp_raise_ValueError("Line style has to be 0 or 1"); mp_raise_ValueError("Line style has to be 0 or 1");
} }
...@@ -145,7 +145,7 @@ static mp_obj_t mp_display_rect(size_t n_args, const mp_obj_t *args) ...@@ -145,7 +145,7 @@ static mp_obj_t mp_display_rect(size_t n_args, const mp_obj_t *args)
uint16_t fs = mp_obj_get_int(args[5]); uint16_t fs = mp_obj_get_int(args[5]);
uint16_t ps = mp_obj_get_int(args[6]); uint16_t ps = mp_obj_get_int(args[6]);
if (fs > 1 || fs < 0) { if (fs > 1) {
mp_raise_ValueError("Fill style has to be 0 or 1"); mp_raise_ValueError("Fill style has to be 0 or 1");
} }
...@@ -169,7 +169,7 @@ static mp_obj_t mp_display_circ(size_t n_args, const mp_obj_t *args) ...@@ -169,7 +169,7 @@ static mp_obj_t mp_display_circ(size_t n_args, const mp_obj_t *args)
uint16_t fs = mp_obj_get_int(args[4]); uint16_t fs = mp_obj_get_int(args[4]);
uint16_t ps = mp_obj_get_int(args[5]); uint16_t ps = mp_obj_get_int(args[5]);
if (fs > 1 || fs < 0) { if (fs > 1) {
mp_raise_ValueError("Fill style has to be 0 or 1"); mp_raise_ValueError("Fill style has to be 0 or 1");
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment