diff mbox series

[liburing,v1,7/7] github: Add `-Wmissing-prototypes` for GitHub CI bot

Message ID 20221124075846.3784701-8-ammar.faizi@intel.com (mailing list archive)
State New
Headers show
Series Ensure we mark internal functions and variables as static | expand

Commit Message

Ammar Faizi Nov. 24, 2022, 8:01 a.m. UTC
From: Ammar Faizi <ammarfaizi2@gnuweeb.org>

Using -Wmissing-prototypes ensures we mark functions and variables as
static if we don't use them outside the translation unit. This
enforcement is good because it hints the compiler to do escape analysis
and optimization better.

Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
---
 .github/workflows/build.yml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b0e669d..4c0bd26 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -26,7 +26,8 @@  jobs:
             cxx_pkg: clang
             cc: clang
             cxx: clang++
-            extra_flags: -Wshorten-64-to-32
+            liburing_extra_flags: -Wshorten-64-to-32
+            extra_flags: -Wmissing-prototypes
 
           # x86 (32-bit) gcc
           - arch: i686
@@ -85,10 +86,10 @@  jobs:
             cxx: mips-linux-gnu-g++
 
     env:
-      FLAGS: -g -O3 -Wall -Wextra -Werror
+      FLAGS: -g -O3 -Wall -Wextra -Werror ${{matrix.extra_flags}}
 
       # Flags for building sources in src/ dir only.
-      LIBURING_CFLAGS: ${{matrix.extra_flags}}
+      LIBURING_CFLAGS: ${{matrix.liburing_extra_flags}}
 
     steps:
     - name: Checkout source