From 38350a09bd16f7f58469fc21e3113b4e81888c86 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 29 Dec 2014 15:47:28 -0800 Subject: [PATCH] client: fix quota signed/unsigned warning client/Client.cc: In member function 'bool Client::is_quota_bytes_exceeded(Inode*, uint64_t)': client/Client.cc:10393:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (quota->max_bytes && (rstat->rbytes + new_bytes) > quota->max_bytes) Signed-off-by: Sage Weil --- src/client/Client.cc | 2 +- src/client/Client.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index b7a87115ecfbe..64e28dffd06cf 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -10381,7 +10381,7 @@ bool Client::is_quota_files_exceeded(Inode *in) return false; } -bool Client::is_quota_bytes_exceeded(Inode *in, uint64_t new_bytes) +bool Client::is_quota_bytes_exceeded(Inode *in, int64_t new_bytes) { if (!cct->_conf->client_quota) return false; diff --git a/src/client/Client.h b/src/client/Client.h index 0cb4c20bc1122..f93c89a707cd4 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -473,7 +473,7 @@ protected: void invalidate_quota_tree(Inode *in); Inode* get_quota_root(Inode *in); bool is_quota_files_exceeded(Inode *in); - bool is_quota_bytes_exceeded(Inode *in, uint64_t new_bytes); + bool is_quota_bytes_exceeded(Inode *in, int64_t new_bytes); bool is_quota_bytes_approaching(Inode *in); public: -- 2.39.5