From: Ammar Faizi <[email protected]>
To: Jens Axboe <[email protected]>
Cc: Ammar Faizi <[email protected]>,
Pavel Begunkov <[email protected]>,
io-uring Mailing List <[email protected]>,
GNU/Weeb Mailing List <[email protected]>,
Gilang Fachrezy <[email protected]>,
Muhammad Rizki <[email protected]>,
Alviro Iskandar Setiawan <[email protected]>,
VNLX Kernel Department <[email protected]>
Subject: [PATCH liburing v1 6/7] test/Makefile: Omit `-Wmissing-prototypes` from the C++ compiler flags
Date: Thu, 24 Nov 2022 15:01:01 +0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
From: Ammar Faizi <[email protected]>
This is a preparation patch to integrate -Wmissing-prototypes to the
CI test robot. Clang++ is not happy with -Wmissing-prototypes:
cc1plus: warning: command-line option '-Wmissing-prototypes' \
is valid for C/ObjC but not for C++
Omit this flag when we are compiling a C++ source file.
Using -Wmissing-prototypes ensures we mark functions and variables as
static if we don't use them outside the translation unit.
Signed-off-by: Ammar Faizi <[email protected]>
---
test/Makefile | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/test/Makefile b/test/Makefile
index 8ad9964..87b1fe1 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -214,8 +214,17 @@ helpers.o: helpers.c
%.t: %.c $(helpers) helpers.h ../src/liburing.a
$(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(helpers) $(LDFLAGS)
+#
+# Clang++ is not happy with -Wmissing-prototypes:
+#
+# cc1plus: warning: command-line option '-Wmissing-prototypes' \
+# is valid for C/ObjC but not for C++
+#
%.t: %.cc $(helpers) helpers.h ../src/liburing.a
- $(QUIET_CXX)$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $< $(helpers) $(LDFLAGS)
+ $(QUIET_CXX)$(CXX) \
+ $(patsubst -Wmissing-prototypes,,$(CPPFLAGS)) \
+ $(patsubst -Wmissing-prototypes,,$(CXXFLAGS)) \
+ -o $@ $< $(helpers) $(LDFLAGS)
install: $(test_targets) runtests.sh runtests-loop.sh
--
Ammar Faizi
next prev parent reply other threads:[~2022-11-24 8:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-24 8:00 [PATCH liburing v1 0/7] Ensure we mark internal functions and variables as static Ammar Faizi
2022-11-24 8:00 ` [PATCH liburing v1 1/7] liburing.h: Export `__io_uring_flush_sq()` function Ammar Faizi
2022-11-24 10:14 ` Dylan Yudaken
2022-11-24 11:47 ` Ammar Faizi
2022-11-24 13:27 ` Jens Axboe
2022-11-24 8:00 ` [PATCH liburing v1 2/7] test/io_uring_setup: Remove unused functions Ammar Faizi
2022-11-24 8:00 ` [PATCH liburing v1 3/7] ucontext-cp: Remove an unused function Ammar Faizi
2022-11-24 8:00 ` [PATCH liburing v1 4/7] tests: Mark internal functions as static Ammar Faizi
2022-11-24 8:01 ` [PATCH liburing v1 5/7] ucontext-cp: " Ammar Faizi
2022-11-24 8:01 ` Ammar Faizi [this message]
2022-11-24 8:01 ` [PATCH liburing v1 7/7] github: Add `-Wmissing-prototypes` for GitHub CI bot Ammar Faizi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox