Commit 7e42330d authored by DonLakeFlyer's avatar DonLakeFlyer

parent 5e1e48f0
......@@ -110,6 +110,10 @@ SOURCES += \
#
# [REQUIRED] zlib library
Windows {
INCLUDEPATH += $$SOURCE_DIR/libszlib/windows/include
LIBS += -L$$SOURCE_DIR/libszlib/windows/lib
}
LIBS += -lz
#
......@@ -147,7 +151,7 @@ contains(DEFINES, QGC_ENABLE_PAIRING) {
exists(/usr/local/Cellar/openssl/1.0.2t/include) {
INCLUDEPATH += /usr/local/Cellar/openssl/1.0.2t/include
LIBS += -L/usr/local/Cellar/openssl/1.0.2t/lib
LIBS += -lcrypto -lz
LIBS += -lcrypto
} else {
# There is some circular reference settings going on between QGCExternalLibs.pri and gqgroundcontrol.pro.
# So this duplicates some of the enable/disable logic which would normally be in qgroundcontrol.pro.
......@@ -157,7 +161,7 @@ contains(DEFINES, QGC_ENABLE_PAIRING) {
#- Pairing is not supported on Windows
DEFINES -= QGC_ENABLE_PAIRING
} else {
LIBS += -lcrypto -lz
LIBS += -lcrypto
AndroidBuild {
contains(QT_ARCH, arm) {
LIBS += $$ANDROID_EXTRA_LIBS
......
......@@ -900,17 +900,17 @@ void FirmwareUpgradeController::_ardupilotManifestDownloadFinished(QString remot
}
int ret;
int cBuffer = 1024 * 5;
const int cBuffer = 1024 * 5;
unsigned char inputBuffer[cBuffer];
unsigned char outputBuffer[cBuffer];
z_stream strm;
QByteArray jsonBytes;
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;
strm.zalloc = nullptr;
strm.zfree = nullptr;
strm.opaque = nullptr;
strm.avail_in = 0;
strm.next_in = Z_NULL;
strm.next_in = nullptr;
ret = inflateInit2(&strm, 16+MAX_WBITS);
if (ret != Z_OK) {
......@@ -920,7 +920,7 @@ void FirmwareUpgradeController::_ardupilotManifestDownloadFinished(QString remot
}
do {
strm.avail_in = inputFile.read((char *)inputBuffer, cBuffer);
strm.avail_in = static_cast<unsigned>(inputFile.read((char*)inputBuffer, cBuffer));
if (strm.avail_in == 0) {
break;
}
......@@ -939,7 +939,7 @@ void FirmwareUpgradeController::_ardupilotManifestDownloadFinished(QString remot
}
unsigned cBytesInflated = cBuffer - strm.avail_out;
jsonBytes.append((char*)outputBuffer, cBytesInflated);
jsonBytes.append((char*)outputBuffer, static_cast<int>(cBytesInflated));
} while (strm.avail_out == 0);
} while (ret != Z_STREAM_END);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment