fix compiler warnings

This commit is contained in:
Sebastian Messmer 2014-11-12 12:36:04 +01:00
parent 8561d90de0
commit a0a30e3c75

View File

@ -34,14 +34,14 @@ int CryOpenFile::read(void *buf, size_t count, off_t offset) {
CHECK_RETVAL(retval); CHECK_RETVAL(retval);
//printf("retval: %d, count: %d\n", retval, count); //printf("retval: %d, count: %d\n", retval, count);
//fflush(stdout); //fflush(stdout);
assert(retval <= count); assert(static_cast<unsigned int>(retval) <= count);
return retval; return retval;
} }
void CryOpenFile::write(const void *buf, size_t count, off_t offset) { void CryOpenFile::write(const void *buf, size_t count, off_t offset) {
int retval = ::pwrite(_descriptor, buf, count, offset); int retval = ::pwrite(_descriptor, buf, count, offset);
CHECK_RETVAL(retval); CHECK_RETVAL(retval);
assert(retval == count); assert(static_cast<unsigned int>(retval) == count);
} }
void CryOpenFile::fsync() { void CryOpenFile::fsync() {