diff --git a/.drone.yml b/.drone.yml index 1ffef5c66ef2b..72c474c5d46b7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,23 +3,23 @@ name: qt-5.15 steps: - name: cmake - image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4 + image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8 volumes: - name: build path: /drone/build commands: - cd /drone/build - - cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror ../src + - cmake -G Ninja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 ../src - name: compile - image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4 + image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8 volumes: - name: build path: /drone/build commands: - cd /drone/build - - make -j$(nproc) + - ninja - name: test - image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4 + image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8 volumes: - name: build path: /drone/build @@ -47,15 +47,15 @@ name: qt-5.15-clang steps: - name: cmake - image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4 + image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8 volumes: - name: build path: /drone/build commands: - cd /drone/build - - cmake -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror ../src + - cmake -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 ../src - name: compile - image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4 + image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8 volumes: - name: build path: /drone/build @@ -63,7 +63,7 @@ steps: - cd /drone/build - ninja - name: test - image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4 + image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8 volumes: - name: build path: /drone/build @@ -73,7 +73,7 @@ steps: - chown -R test:test . - su -c 'ASAN_OPTIONS=detect_leaks=0 xvfb-run ctest --output-on-failure' test - name: clang-tidy - image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4 + image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8 volumes: - name: build path: /drone/build @@ -98,7 +98,7 @@ name: AppImage steps: - name: build - image: ghcr.io/nextcloud/continuous-integration-client-appimage:client-appimage-3 + image: ghcr.io/nextcloud/continuous-integration-client-appimage:client-appimage-4 environment: CI_UPLOAD_GIT_TOKEN: from_secret: CI_UPLOAD_GIT_TOKEN diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 4843f25b6a0b5..c2f8386992101 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -9,7 +9,7 @@ jobs: build: name: Build runs-on: ubuntu-latest - container: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4 + container: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8 env: SONAR_SERVER_URL: "https://sonarcloud.io" BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed @@ -28,8 +28,8 @@ jobs: run: | mkdir build cd build - cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DBUILD_COVERAGE=ON - build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make -j 2 + cmake .. -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DBUILD_COVERAGE=ON -DOPENSSL_ROOT_DIR=/usr/local/lib64 + build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} ninja - name: Run tests run: | cd build diff --git a/admin/linux/build-appimage.sh b/admin/linux/build-appimage.sh index ac124872bf31e..d9d18143b10b0 100755 --- a/admin/linux/build-appimage.sh +++ b/admin/linux/build-appimage.sh @@ -84,8 +84,8 @@ cp ./usr/share/icons/hicolor/512x512/apps/*.png . # Workaround for linuxeployqt # Because distros need to get their shit together cp -R /usr/lib/x86_64-linux-gnu/libssl.so* ./usr/lib/ cp -R /usr/lib/x86_64-linux-gnu/libcrypto.so* ./usr/lib/ -cp -P /usr/local/lib/libssl.so* ./usr/lib/ -cp -P /usr/local/lib/libcrypto.so* ./usr/lib/ +cp -P /usr/local/lib*/libssl.so* ./usr/lib/ +cp -P /usr/local/lib*/libcrypto.so* ./usr/lib/ # NSS fun cp -P -r /usr/lib/x86_64-linux-gnu/nss ./usr/lib/ diff --git a/src/gui/creds/webflowcredentials.cpp b/src/gui/creds/webflowcredentials.cpp index 2b7ea3eec4a45..278d81b94cc18 100644 --- a/src/gui/creds/webflowcredentials.cpp +++ b/src/gui/creds/webflowcredentials.cpp @@ -150,6 +150,7 @@ void WebFlowCredentials::askFromUser() { #ifdef WITH_WEBENGINE bool useFlow2 = (type != DetermineAuthTypeJob::WebViewFlow); #else // WITH_WEBENGINE + Q_UNUSED(type) bool useFlow2 = true; #endif // WITH_WEBENGINE diff --git a/src/gui/sharelinkwidget.cpp b/src/gui/sharelinkwidget.cpp index 09186e9723d9c..cc3a0952ce287 100644 --- a/src/gui/sharelinkwidget.cpp +++ b/src/gui/sharelinkwidget.cpp @@ -82,13 +82,10 @@ ShareLinkWidget::ShareLinkWidget(AccountPtr account, _ui->errorLabel->hide(); - auto sharingPossible = true; if (!_account->capabilities().sharePublicLink()) { qCWarning(lcShareLink) << "Link shares have been disabled"; - sharingPossible = false; } else if (!(maxSharingPermissions & SharePermissionShare)) { qCWarning(lcShareLink) << "The file can not be shared because it was shared without sharing permission."; - sharingPossible = false; } _ui->enableShareLink->setChecked(false); diff --git a/src/libsync/clientsideencryption.cpp b/src/libsync/clientsideencryption.cpp index 7a923e490e464..3a75707f5b4da 100644 --- a/src/libsync/clientsideencryption.cpp +++ b/src/libsync/clientsideencryption.cpp @@ -1656,7 +1656,6 @@ bool EncryptionHelper::fileEncryption(const QByteArray &key, const QByteArray &i QByteArray out(blockSize + OCC::Constants::e2EeTagSize - 1, '\0'); int len = 0; - int total_len = 0; qCDebug(lcCse) << "Starting to encrypt the file" << input->fileName() << input->atEnd(); while(!input->atEnd()) { @@ -1673,7 +1672,6 @@ bool EncryptionHelper::fileEncryption(const QByteArray &key, const QByteArray &i } output->write(out, len); - total_len += len; } if(1 != EVP_EncryptFinal_ex(ctx, unsignedData(out), &len)) { @@ -1681,7 +1679,6 @@ bool EncryptionHelper::fileEncryption(const QByteArray &key, const QByteArray &i return false; } output->write(out, len); - total_len += len; /* Get the e2EeTag */ QByteArray e2EeTag(OCC::Constants::e2EeTagSize, '\0'); @@ -1865,7 +1862,6 @@ QByteArray EncryptionHelper::StreamingDecryptor::chunkDecryption(const char *inp return QByteArray(); } - qint64 bytesWritten = 0; qint64 inputPos = 0; QByteArray decryptedBlock(blockSize + OCC::Constants::e2EeTagSize - 1, '\0'); @@ -1894,8 +1890,6 @@ QByteArray EncryptionHelper::StreamingDecryptor::chunkDecryption(const char *inp return QByteArray(); } - bytesWritten += writtenToOutput; - // advance input position for further read inputPos += encryptedBlock.size(); @@ -1934,8 +1928,6 @@ QByteArray EncryptionHelper::StreamingDecryptor::chunkDecryption(const char *inp return QByteArray(); } - bytesWritten += writtenToOutput; - _decryptedSoFar += OCC::Constants::e2EeTagSize; _isFinished = true;