From 56efe80f8580cc91055ab5a0ada2a86237baad2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 29 Apr 2013 20:29:10 +0200 Subject: [PATCH] nfs4: fixed two warnings. * warnings about comparison between signed and unsigned integer expressions. * the use of max_c() was superflous anyway as the result is only used for a comparison with the left value. --- src/add-ons/kernel/file_systems/nfs4/InodeRegular.cpp | 2 +- src/add-ons/kernel/file_systems/nfs4/MetadataCache.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/file_systems/nfs4/InodeRegular.cpp b/src/add-ons/kernel/file_systems/nfs4/InodeRegular.cpp index a343f7c60d..d591fddda2 100644 --- a/src/add-ons/kernel/file_systems/nfs4/InodeRegular.cpp +++ b/src/add-ons/kernel/file_systems/nfs4/InodeRegular.cpp @@ -419,7 +419,7 @@ Inode::Write(OpenFileCookie* cookie, off_t pos, const void* _buffer, if ((cookie->fMode & O_APPEND) != 0) pos = fMaxFileSize; - uint64 fileSize = max_c((off_t)fMaxFileSize, pos + *_length); + uint64 fileSize = pos + *_length; if (fileSize > fMaxFileSize) { status_t result = file_cache_set_size(fFileCache, fileSize); if (result != B_OK) diff --git a/src/add-ons/kernel/file_systems/nfs4/MetadataCache.cpp b/src/add-ons/kernel/file_systems/nfs4/MetadataCache.cpp index 570f6da44b..643fb4659b 100644 --- a/src/add-ons/kernel/file_systems/nfs4/MetadataCache.cpp +++ b/src/add-ons/kernel/file_systems/nfs4/MetadataCache.cpp @@ -75,7 +75,7 @@ void MetadataCache::GrowFile(size_t newSize) { MutexLocker _(fLock); - fStatCache.st_size = max_c(newSize, fStatCache.st_size); + fStatCache.st_size = max_c((off_t)newSize, fStatCache.st_size); }