From 9e8dfb664479b5dc6723720de95ec9ee394e68e4 Mon Sep 17 00:00:00 2001 From: Turiiya <34311583+ttytm@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:17:10 +0100 Subject: [PATCH] chore: remove comptime else branch to workaround enum cast issue with -cstrict; re-enable -cstrict ci runs --- .github/workflows/linux.yml | 7 +++---- .github/workflows/windows.yml | 2 +- curl/instructions/easy.v | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index a947684..d8a5b73 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,11 +42,10 @@ jobs: matrix: os: [ubuntu-20.04, ubuntu-latest] cc: [tcc, gcc, clang] - include: - - cc: clang + optimization: ['', '-W -cstrict'] + exclude: + - cc: tcc optimization: '-W -cstrict' - - cc: gcc - optimization: '-W' fail-fast: false runs-on: ${{ matrix.os }} env: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2ee988c..57e55b5 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -37,7 +37,7 @@ jobs: runs-on: windows-latest strategy: matrix: - optimization: ['', '-W'] + optimization: ['', '-cstrict'] fail-fast: false steps: - name: Restore cache diff --git a/curl/instructions/easy.v b/curl/instructions/easy.v index ba830a0..0fefa63 100644 --- a/curl/instructions/easy.v +++ b/curl/instructions/easy.v @@ -29,9 +29,8 @@ pub fn easy_strerror(err_code state.Ecode) string { pub fn easy_setopt[T](handle &C.CURL, option state.Opt, parameter T) state.Ecode { $if T is string { return ecode(C.curl_easy_setopt(handle, int(option), &char(parameter.str))) - } $else { - return ecode(C.curl_easy_setopt(handle, int(option), parameter)) } + return ecode(C.curl_easy_setopt(handle, int(option), parameter)) } pub fn easy_perform(handle &C.CURL) state.Ecode {