Fix warnings with GCC9 (#560)

* Fix warning about implicitly defined copy constructor (GCC9)

* Fix warning about comparing values with different signedness (GCC9)

Co-authored-by: Ben RUBSON <6764151+benrubson@users.noreply.github.com>
This commit is contained in:
Rogelio Domínguez Hernández 2020-02-26 16:25:35 -06:00 committed by GitHub
parent b56ef02055
commit 5203bdb474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 5 deletions

View File

@ -38,8 +38,6 @@ Interface::Interface(std::string name_, int Current, int Revision, int Age)
Interface::Interface() : _current(0), _revision(0), _age(0) {} Interface::Interface() : _current(0), _revision(0), _age(0) {}
Interface &Interface::operator=(const Interface &src) = default;
const std::string &Interface::name() const { return _name; } const std::string &Interface::name() const { return _name; }
std::string &Interface::name() { return _name; } std::string &Interface::name() { return _name; }

View File

@ -57,7 +57,7 @@ class Interface {
int &revision(); int &revision();
int &age(); int &age();
Interface &operator=(const Interface &src); Interface &operator=(const Interface &src) = default;
private: private:
std::string _name; std::string _name;

View File

@ -725,7 +725,7 @@ int encfs_read(const char *path, char *buf, size_t size, off_t offset,
struct fuse_file_info *file) { struct fuse_file_info *file) {
// Unfortunately we have to convert from ssize_t (pread) to int (fuse), so // Unfortunately we have to convert from ssize_t (pread) to int (fuse), so
// let's check this will be OK // let's check this will be OK
if (size > std::numeric_limits<int>::max()) { if (size > (size_t)std::numeric_limits<int>::max()) {
size = std::numeric_limits<int>::max(); size = std::numeric_limits<int>::max();
} }
return withFileNode("read", path, file, return withFileNode("read", path, file,
@ -753,7 +753,7 @@ int encfs_write(const char *path, const char *buf, size_t size, off_t offset,
struct fuse_file_info *file) { struct fuse_file_info *file) {
// Unfortunately we have to convert from ssize_t (pwrite) to int (fuse), so // Unfortunately we have to convert from ssize_t (pwrite) to int (fuse), so
// let's check this will be OK // let's check this will be OK
if (size > std::numeric_limits<int>::max()) { if (size > (size_t)std::numeric_limits<int>::max()) {
size = std::numeric_limits<int>::max(); size = std::numeric_limits<int>::max();
} }
EncFS_Context *ctx = context(); EncFS_Context *ctx = context();