mirror of
https://github.com/vgough/encfs.git
synced 2024-11-24 00:43:41 +01:00
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:
parent
b56ef02055
commit
5203bdb474
@ -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::operator=(const Interface &src) = default;
|
||||
|
||||
const std::string &Interface::name() const { return _name; }
|
||||
|
||||
std::string &Interface::name() { return _name; }
|
||||
|
@ -57,7 +57,7 @@ class Interface {
|
||||
int &revision();
|
||||
int &age();
|
||||
|
||||
Interface &operator=(const Interface &src);
|
||||
Interface &operator=(const Interface &src) = default;
|
||||
|
||||
private:
|
||||
std::string _name;
|
||||
|
@ -725,7 +725,7 @@ int encfs_read(const char *path, char *buf, size_t size, off_t offset,
|
||||
struct fuse_file_info *file) {
|
||||
// Unfortunately we have to convert from ssize_t (pread) to int (fuse), so
|
||||
// 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();
|
||||
}
|
||||
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) {
|
||||
// Unfortunately we have to convert from ssize_t (pwrite) to int (fuse), so
|
||||
// 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();
|
||||
}
|
||||
EncFS_Context *ctx = context();
|
||||
|
Loading…
Reference in New Issue
Block a user