Commit 7e42330d authored by DonLakeFlyer's avatar DonLakeFlyer

parent 5e1e48f0
...@@ -110,6 +110,10 @@ SOURCES += \ ...@@ -110,6 +110,10 @@ SOURCES += \
# #
# [REQUIRED] zlib library # [REQUIRED] zlib library
Windows {
INCLUDEPATH += $$SOURCE_DIR/libszlib/windows/include
LIBS += -L$$SOURCE_DIR/libszlib/windows/lib
}
LIBS += -lz LIBS += -lz
# #
...@@ -147,7 +151,7 @@ contains(DEFINES, QGC_ENABLE_PAIRING) { ...@@ -147,7 +151,7 @@ contains(DEFINES, QGC_ENABLE_PAIRING) {
exists(/usr/local/Cellar/openssl/1.0.2t/include) { exists(/usr/local/Cellar/openssl/1.0.2t/include) {
INCLUDEPATH += /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 += -L/usr/local/Cellar/openssl/1.0.2t/lib
LIBS += -lcrypto -lz LIBS += -lcrypto
} else { } else {
# There is some circular reference settings going on between QGCExternalLibs.pri and gqgroundcontrol.pro. # 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. # 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) { ...@@ -157,7 +161,7 @@ contains(DEFINES, QGC_ENABLE_PAIRING) {
#- Pairing is not supported on Windows #- Pairing is not supported on Windows
DEFINES -= QGC_ENABLE_PAIRING DEFINES -= QGC_ENABLE_PAIRING
} else { } else {
LIBS += -lcrypto -lz LIBS += -lcrypto
AndroidBuild { AndroidBuild {
contains(QT_ARCH, arm) { contains(QT_ARCH, arm) {
LIBS += $$ANDROID_EXTRA_LIBS LIBS += $$ANDROID_EXTRA_LIBS
......
...@@ -900,17 +900,17 @@ void FirmwareUpgradeController::_ardupilotManifestDownloadFinished(QString remot ...@@ -900,17 +900,17 @@ void FirmwareUpgradeController::_ardupilotManifestDownloadFinished(QString remot
} }
int ret; int ret;
int cBuffer = 1024 * 5; const int cBuffer = 1024 * 5;
unsigned char inputBuffer[cBuffer]; unsigned char inputBuffer[cBuffer];
unsigned char outputBuffer[cBuffer]; unsigned char outputBuffer[cBuffer];
z_stream strm; z_stream strm;
QByteArray jsonBytes; QByteArray jsonBytes;
strm.zalloc = Z_NULL; strm.zalloc = nullptr;
strm.zfree = Z_NULL; strm.zfree = nullptr;
strm.opaque = Z_NULL; strm.opaque = nullptr;
strm.avail_in = 0; strm.avail_in = 0;
strm.next_in = Z_NULL; strm.next_in = nullptr;
ret = inflateInit2(&strm, 16+MAX_WBITS); ret = inflateInit2(&strm, 16+MAX_WBITS);
if (ret != Z_OK) { if (ret != Z_OK) {
...@@ -920,7 +920,7 @@ void FirmwareUpgradeController::_ardupilotManifestDownloadFinished(QString remot ...@@ -920,7 +920,7 @@ void FirmwareUpgradeController::_ardupilotManifestDownloadFinished(QString remot
} }
do { 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) { if (strm.avail_in == 0) {
break; break;
} }
...@@ -939,7 +939,7 @@ void FirmwareUpgradeController::_ardupilotManifestDownloadFinished(QString remot ...@@ -939,7 +939,7 @@ void FirmwareUpgradeController::_ardupilotManifestDownloadFinished(QString remot
} }
unsigned cBytesInflated = cBuffer - strm.avail_out; 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 (strm.avail_out == 0);
} while (ret != Z_STREAM_END); } 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