Installer: fixed two warnings.
* warnings about comparison between signed and unsigned integer expressions. * also use std::min() instead of min_c()
This commit is contained in:
@@ -431,14 +431,14 @@ CopyEngine::_CopyFolder(const char* _source, const char* _destination,
|
|||||||
uint8 buffer[size];
|
uint8 buffer[size];
|
||||||
off_t offset = 0;
|
off_t offset = 0;
|
||||||
ssize_t read = sourceNode.ReadAttr(attrName, info.type,
|
ssize_t read = sourceNode.ReadAttr(attrName, info.type,
|
||||||
offset, buffer, min_c(size, info.size));
|
offset, buffer, std::min((off_t)size, info.size));
|
||||||
// NOTE: It's important to still write the attribute even if
|
// NOTE: It's important to still write the attribute even if
|
||||||
// we have read 0 bytes!
|
// we have read 0 bytes!
|
||||||
while (read >= 0) {
|
while (read >= 0) {
|
||||||
targetNode.WriteAttr(attrName, info.type, offset, buffer, read);
|
targetNode.WriteAttr(attrName, info.type, offset, buffer, read);
|
||||||
offset += read;
|
offset += read;
|
||||||
read = sourceNode.ReadAttr(attrName, info.type,
|
read = sourceNode.ReadAttr(attrName, info.type,
|
||||||
offset, buffer, min_c(size, info.size - offset));
|
offset, buffer, std::min((off_t)size, info.size - offset));
|
||||||
if (read == 0)
|
if (read == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user