Enable extended compiler warnings and resolve occurring ones

This commit is contained in:
Sebastian Messmer 2015-05-08 02:11:34 +02:00
parent 4a7e4efe26
commit 7beb7f1198
2 changed files with 7 additions and 2 deletions

View File

@ -9,6 +9,8 @@ ACTIVATE_CPP14()
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64)
ENABLE_STYLE_WARNINGS()
# You can safely delete lines from here...
###############################################################################

View File

@ -24,16 +24,19 @@ public:
case fspp::Dir::EntryType::DIR:
mode |= S_IFDIR;
break;
case fspp::Dir::EntryType::SYMLINK:
mode |= S_IFLNK;
break;
}
assert((S_ISREG(mode) && type == fspp::Dir::EntryType::FILE) || (S_ISDIR(mode) && type == fspp::Dir::EntryType::DIR) || (type == fspp::Dir::EntryType::SYMLINK));
assert((S_ISREG(mode) && type == fspp::Dir::EntryType::FILE) || (S_ISDIR(mode) && type == fspp::Dir::EntryType::DIR) || (S_ISLNK(mode) && type == fspp::Dir::EntryType::SYMLINK));
}
fspp::Dir::EntryType type;
std::string name;
blockstore::Key key;
mode_t mode;
uid_t uid;
gid_t gid;
mode_t mode;
};
static std::unique_ptr<DirBlob> InitializeEmptyDir(std::unique_ptr<blobstore::Blob> blob, CryDevice *device);