$OpenBSD$ Index: src/keys/treekeyidx.cpp --- src/keys/treekeyidx.cpp.orig +++ src/keys/treekeyidx.cpp @@ -61,7 +61,7 @@ TreeKeyIdx::TreeKeyIdx(const char *idxPath, int fileMo buf.setFormatted("%s.dat", path); datfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); - if (datfd <= 0) { + if ((long)datfd <= 0) { SWLog::getSystemLog()->logError("%d", errno); error = errno; } @@ -331,7 +331,7 @@ void TreeKeyIdx::getTreeNodeFromDatOffset(long ioffset __s32 tmp; __u16 tmp2; - if (datfd > 0) { + if ((long)datfd > 0) { datfd->seek(ioffset, SEEK_SET); @@ -385,7 +385,7 @@ char TreeKeyIdx::getTreeNodeFromIdxOffset(long ioffset } node->offset = ioffset; - if (idxfd > 0) { + if ((long)idxfd > 0) { if (idxfd->getFd() > 0) { idxfd->seek(ioffset, SEEK_SET); if (idxfd->read(&offset, 4) == 4) { @@ -422,7 +422,7 @@ void TreeKeyIdx::saveTreeNodeOffsets(TreeNode *node) { long datOffset = 0; __s32 tmp; - if (idxfd > 0) { + if ((long)idxfd > 0) { idxfd->seek(node->offset, SEEK_SET); if (idxfd->read(&tmp, 4) != 4) { datOffset = datfd->seek(0, SEEK_END); @@ -488,7 +488,7 @@ void TreeKeyIdx::copyFrom(const TreeKeyIdx &ikey) { void TreeKeyIdx::saveTreeNode(TreeNode *node) { long datOffset = 0; __s32 tmp; - if (idxfd > 0) { + if ((long)idxfd > 0) { idxfd->seek(node->offset, SEEK_SET); datOffset = datfd->seek(0, SEEK_END);