diff mbox series

[liburing,v1,3/3] github: Append `-Wshorten-64-to-32` flag for clang build

Message ID 20221020114814.63133-4-ammar.faizi@intel.com (mailing list archive)
State New
Headers show
Series Clean up clang `-Wshorten-64-to-32` warnings | expand

Commit Message

Ammar Faizi Oct. 20, 2022, 11:52 a.m. UTC
From: Ammar Faizi <ammarfaizi2@gnuweeb.org>

liburing has a couple of int shortening issues found by clang. A
previous commit has cleaned them up. Integrate -Wshorten-64-to-32
flag to the GitHub bot to spot the same issue in the future.

This flag is clang-specific, it currently doesn't exist in GCC.

Co-authored-by: Dylan Yudaken <dylany@fb.com>
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
---
 .github/workflows/build.yml | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2608644..b0e669d 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -26,6 +26,7 @@  jobs:
             cxx_pkg: clang
             cc: clang
             cxx: clang++
+            extra_flags: -Wshorten-64-to-32
 
           # x86 (32-bit) gcc
           - arch: i686
@@ -86,6 +87,9 @@  jobs:
     env:
       FLAGS: -g -O3 -Wall -Wextra -Werror
 
+      # Flags for building sources in src/ dir only.
+      LIBURING_CFLAGS: ${{matrix.extra_flags}}
+
     steps:
     - name: Checkout source
       uses: actions/checkout@v2