diff options
author | dzwdz | 2022-04-12 19:50:19 +0200 |
---|---|---|
committer | dzwdz | 2022-04-12 19:50:19 +0200 |
commit | 49d095e34b9d9a364437bb3b1b6b1e7b07328d38 (patch) | |
tree | 367e2be882ee0d9c18d54e7becf71185a24ef76a /src | |
parent | 73d7e865e9ded43295b7d91cc000e323ccad82e2 (diff) |
shared: fix some minor warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/init/driver/ansiterm.c | 2 | ||||
-rw-r--r-- | src/init/driver/ps2.c | 2 | ||||
-rw-r--r-- | src/init/fs/misc.c | 2 | ||||
-rw-r--r-- | src/kernel/tests/util.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/init/driver/ansiterm.c b/src/init/driver/ansiterm.c index 115744b..01ad984 100644 --- a/src/init/driver/ansiterm.c +++ b/src/init/driver/ansiterm.c @@ -83,7 +83,7 @@ void ansiterm_drv(void) { break; case VFSOP_WRITE: - for (int i = 0; i < res.len; i++) + for (size_t i = 0; i < res.len; i++) in_char(buf[i]); /* if (pendingFlush) */ flush(); _syscall_fs_respond(NULL, res.len); diff --git a/src/init/driver/ps2.c b/src/init/driver/ps2.c index 55869f5..c0bd50f 100644 --- a/src/init/driver/ps2.c +++ b/src/init/driver/ps2.c @@ -61,7 +61,7 @@ static void main_loop(void) { /* read raw input until we have something to output */ int len = _syscall_read(fd, buf, sizeof buf, 0); if (len == 0) break; - for (size_t i = 0; i < len; i++) + for (int i = 0; i < len; i++) parse_scancode(buf[i]); } if (res.capacity > backlog_size) diff --git a/src/init/fs/misc.c b/src/init/fs/misc.c index dc14ac4..ddb230f 100644 --- a/src/init/fs/misc.c +++ b/src/init/fs/misc.c @@ -117,7 +117,7 @@ void fs_dir_inject(const char *path) { const char *inject; }; - const int path_len = strlen(path); + const size_t path_len = strlen(path); struct fs_wait_response res; struct fs_dir_handle handles[16]; // TODO hardcoded FD_MAX - use malloc instead int handle_next = 0; diff --git a/src/kernel/tests/util.c b/src/kernel/tests/util.c index 2442d47..cf16b75 100644 --- a/src/kernel/tests/util.c +++ b/src/kernel/tests/util.c @@ -32,7 +32,7 @@ TEST(strcmp) { } TEST(ring) { - char buf[16], backbuf[16]; + char backbuf[16]; size_t num_read = 0, num_written = 0; uint8_t c; |