summaryrefslogtreecommitdiff
path: root/unix/main.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-01-16 17:47:07 +0000
committerDamien George <damien.p.george@gmail.com>2015-01-16 17:47:07 +0000
commit963a5a3e82ded7ee75adae72ae7cb14796fa150e (patch)
tree78402c85b98c1c8f1889d7af7dc6f4828a8f55a5 /unix/main.c
parentf12ea7c7ed1ef97ee48c4356dbbc808cc2bdee4a (diff)
py, unix: Allow to compile with -Wsign-compare.
See issue #699.
Diffstat (limited to 'unix/main.c')
-rw-r--r--unix/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/main.c b/unix/main.c
index d63512778..346324e7c 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -355,7 +355,7 @@ int main(int argc, char **argv) {
mp_obj_list_get(mp_sys_path, &path_num, &path_items);
path_items[0] = MP_OBJ_NEW_QSTR(MP_QSTR_);
char *p = path;
- for (int i = 1; i < path_num; i++) {
+ for (mp_uint_t i = 1; i < path_num; i++) {
char *p1 = strchr(p, PATHLIST_SEP_CHAR);
if (p1 == NULL) {
p1 = p + strlen(p);
@@ -364,7 +364,7 @@ int main(int argc, char **argv) {
// Expand standalone ~ to $HOME
CHECKBUF(buf, PATH_MAX);
CHECKBUF_APPEND(buf, home, strlen(home));
- CHECKBUF_APPEND(buf, p + 1, p1 - p - 1);
+ CHECKBUF_APPEND(buf, p + 1, (size_t)(p1 - p - 1));
path_items[i] = MP_OBJ_NEW_QSTR(qstr_from_strn(buf, CHECKBUF_LEN(buf)));
} else {
path_items[i] = MP_OBJ_NEW_QSTR(qstr_from_strn(p, p1 - p));