$OpenBSD$ Index: src/modules/common/rawstr4.cpp --- src/modules/common/rawstr4.cpp.orig +++ src/modules/common/rawstr4.cpp @@ -74,7 +74,7 @@ RawStr4::RawStr4(const char *ipath, int fileMode, bool buf.setFormatted("%s.dat", path); datfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true); - if (datfd < 0) { + if ((long)datfd <= 0) { SWLog::getSystemLog()->logError("%d", errno); } @@ -111,7 +111,7 @@ void RawStr4::getIDXBufDat(long ioffset, char **buf) c { int size; char ch; - if (datfd > 0) { + if ((long)datfd > 0) { datfd->seek(ioffset, SEEK_SET); for (size = 0; datfd->read(&ch, 1) == 1; size++) { if ((ch == '\\') || (ch == 10) || (ch == 13)) @@ -145,7 +145,7 @@ void RawStr4::getIDXBuf(long ioffset, char **buf) cons { __u32 offset; - if (idxfd > 0) { + if ((long)idxfd > 0) { idxfd->seek(ioffset, SEEK_SET); idxfd->read(&offset, 4);