From a7d21bad55ed8185ba7d561e3488ea0dcbd44c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 4 Sep 2003 04:20:42 +0000 Subject: [PATCH] Fixed some warnings. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4495 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/fs/fd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/kernel/core/fs/fd.c b/src/kernel/core/fs/fd.c index fea4adcbce..6b096154c2 100644 --- a/src/kernel/core/fs/fd.c +++ b/src/kernel/core/fs/fd.c @@ -70,7 +70,7 @@ int new_fd(struct io_context *context, struct file_descriptor *descriptor) { int fd = -1; - int i; + uint32 i; mutex_lock(&context->io_mutex); @@ -127,7 +127,7 @@ get_fd(struct io_context *context, int fd) mutex_lock(&context->io_mutex); - if (fd < context->table_size) + if ((uint32)fd < context->table_size) descriptor = context->fds[fd]; if (descriptor != NULL) // fd is valid @@ -153,7 +153,7 @@ remove_fd(struct io_context *context, int fd) mutex_lock(&context->io_mutex); - if (fd < context->table_size) + if ((uint32)fd < context->table_size) descriptor = context->fds[fd]; if (descriptor) { // fd is valid @@ -209,8 +209,8 @@ dup2_fd(int oldfd, int newfd, bool kernel) // Check if the fds are valid (mutex must be locked because // the table size could be changed) - if (oldfd >= context->table_size - || newfd >= context->table_size + if ((uint32)oldfd >= context->table_size + || (uint32)newfd >= context->table_size || context->fds[oldfd] == NULL) { mutex_unlock(&context->io_mutex); return B_FILE_ERROR;