diff --git a/YACReaderLibrary/yacreader_local_server.cpp b/YACReaderLibrary/yacreader_local_server.cpp index 0e55078d..247cb4eb 100644 --- a/YACReaderLibrary/yacreader_local_server.cpp +++ b/YACReaderLibrary/yacreader_local_server.cpp @@ -127,10 +127,10 @@ void YACReaderClientConnectionWorker::run() tries = 0; QByteArray data; int dataRead = 0; - while(data.size() < totalSize && tries < 200) + while((quint32)data.size() < totalSize && tries < 200) { data.append(clientConnection->readAll()); - if(data.length() < totalSize) + if((quint32)data.length() < totalSize) clientConnection->waitForReadyRead(100); if(dataRead == data.length()) //no bytes were read tries++; diff --git a/compressed_archive/compressed_archive.cpp b/compressed_archive/compressed_archive.cpp index fe665cca..43412799 100644 --- a/compressed_archive/compressed_archive.cpp +++ b/compressed_archive/compressed_archive.cpp @@ -73,12 +73,12 @@ struct SevenZipInterface { //SevenZipInterface * szInterface; -const char rar[7]={static_cast(0x52), static_cast(0x61), static_cast(0x72), static_cast(0x21), static_cast(0x1A), static_cast(0x07), static_cast(0x00)}; -const char rar5[8]={static_cast(0x52), static_cast(0x61), static_cast(0x72), static_cast(0x21), static_cast(0x1A), static_cast(0x07), static_cast(0x01), static_cast(0x00)}; -const char zip[2]={static_cast(0x50), static_cast(0x4B)}; -const char sevenz[6]={static_cast(0x37), static_cast(0x7A), static_cast(0xBC), static_cast(0xAF), static_cast(0x27), static_cast(0x1C)}; -const char tar[6]="ustar"; -const char arj[2]={static_cast(0x60), static_cast(0xEA)}; +const unsigned char rar[7]={static_cast(0x52), static_cast(0x61), static_cast(0x72), static_cast(0x21), static_cast(0x1A), static_cast(0x07), static_cast(0x00)}; +const unsigned char rar5[8]={static_cast(0x52), static_cast(0x61), static_cast(0x72), static_cast(0x21), static_cast(0x1A), static_cast(0x07), static_cast(0x01), static_cast(0x00)}; +const unsigned char zip[2]={static_cast(0x50), static_cast(0x4B)}; +const unsigned char sevenz[6]={static_cast(0x37), static_cast(0x7A), static_cast(0xBC), static_cast(0xAF), static_cast(0x27), static_cast(0x1C)}; +const unsigned char tar[6]="ustar"; +const unsigned char arj[2]={static_cast(0x60), static_cast(0xEA)}; CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent) : QObject(parent),sevenzLib(0),valid(false),tools(false) @@ -404,7 +404,7 @@ QVector CompressedArchive::translateIndexes(const QVector & in foreach(quint32 i, indexes) { - if(i < offsets.length()) + if(i < (quint32)offsets.length()) translatedIndexes.append(offsets.at(i)); }