diff --git a/.github/codeql/MsvcRules.ruleset b/.github/codeql/MsvcRules.ruleset deleted file mode 100644 index eb834eed..00000000 --- a/.github/codeql/MsvcRules.ruleset +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 4d217001..00000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: CodeQL - -on: - workflow_dispatch: - branches: [ master ] - schedule: - - cron: '39 0 * * 1' - -env: - VCPKG_VERSION: '962e5e39f8a25f42522f51fffc574e05a3efd26b' - -jobs: - analyze: - name: 'Windows/2022/CodeQL' - runs-on: windows-2022 - permissions: - actions: read - contents: read - security-events: write - - steps: - - uses: actions/checkout@v2 - - - name: Install vcpkg - uses: lukka/run-vcpkg@v10 - with: - vcpkgDirectory: '${{ runner.workspace }}/vcpkg' - vcpkgGitCommitId: '${{ env.VCPKG_VERSION }}' - vcpkgJsonGlob: 'vcpkg.json' - appendedCacheKey: 'codeql' - - - name: Run vcpkg - run: ${{ env.VCPKG_ROOT }}/vcpkg install --recurse --clean-after-build --triplet x64-windows-release --host-triplet x64-windows-release --x-install-root=${{ runner.workspace }}/vcpkg_installed --overlay-ports=${{ github.workspace }}/deps - - - name: Configure CMake - run: cmake --preset default -DCMAKE_BUILD_TYPE=Release -DVCPKG_TARGET_TRIPLET=x64-windows-release -DVCPKG_INSTALLED_DIR=${{ runner.workspace }}/vcpkg_installed -DVCPKG_MANIFEST_INSTALL=off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=on -DASIO_GRPC_ENABLE_CHECK_HEADER_SYNTAX_TARGET=off - - - name: Build - run: cmake --build --preset default --config Release --parallel 1 --target asio-grpc-example-protos asio-grpc-test-protos - - - name: Initialize MSVC Code Analysis - uses: microsoft/msvc-code-analysis-action@96315324a485db21449515180214ecb78c16a1c5 - id: run-analysis - with: - cmakeBuildDirectory: ${{ github.workspace }}/build - buildConfiguration: Release - ruleset: ${{ github.workspace }}/.github/codeql/MsvcRules.ruleset - ignoredPaths: ${{ runner.workspace }}/vcpkg_installed - - - name: Upload SARIF to GitHub - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: ${{ steps.run-analysis.outputs.sarif }} diff --git a/src/agrpc/detail/server_rpc_sender.hpp b/src/agrpc/detail/server_rpc_sender.hpp index e9495431..51379b35 100644 --- a/src/agrpc/detail/server_rpc_sender.hpp +++ b/src/agrpc/detail/server_rpc_sender.hpp @@ -63,11 +63,11 @@ struct ServerRequestSenderImplementation : detail::GrpcSenderImplementationBase explicit ServerRequestSenderImplementation(RPC& rpc) noexcept : rpc_(rpc) {} - void complete(agrpc::GrpcContext& grpc_context, bool ok) const noexcept + void complete([[maybe_unused]] agrpc::GrpcContext& grpc_context, [[maybe_unused]] bool ok) const noexcept { - if (ok) + if constexpr (IsNotifyWhenDone) { - if constexpr (IsNotifyWhenDone) + if (ok) { grpc_context.work_started(); }