From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from localhost.localdomain (unknown [182.253.183.240]) by gnuweeb.org (Postfix) with ESMTPSA id 593DC8173F; Thu, 24 Nov 2022 16:29:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1669307382; bh=I8+aPRh++xFhEmPVgD+jVUkqZVdfhhklZ90+OLkmncE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AENnaq1Le1MjsOlT6XtI24kwNjHRaIsjRR+b/KuRQq/8wkmLczo3VW/JrmnBLZ1J0 LAbVkKQ7tApKgjFTpG3fT87T2dFuTyZVJbFepyirS8ZC9pAaUElLoMcBd8qwMJ3lfr XjOfW6dLXtdgWUOe6yaEQZp61GMp/Z2enW54ULCPP/NZDrgH78R2mRyypA1qbnLrd5 9pQpib7QqfDjGmumbAnn8AeHtnRu5X9E94HJ5yjAnRped5jqXoJqLdYXDUeRZnzI+y 74611WaTuGTV3tVxCvatD67Bn1CSPbG7gP1Zq07Hvuy+I/ykfwwauiepZRQHphRAMw Tr9BdgJ7uMuCQ== From: Ammar Faizi To: Jens Axboe Cc: Ammar Faizi , Dylan Yudaken , Pavel Begunkov , Gilang Fachrezy , Muhammad Rizki , Alviro Iskandar Setiawan , VNLX Kernel Department , io-uring Mailing List , GNU/Weeb Mailing List Subject: [PATCH liburing v2 7/8] test/Makefile: Omit `-Wmissing-prototypes` from the C++ compiler flags Date: Thu, 24 Nov 2022 23:29:00 +0700 Message-Id: <20221124162633.3856761-8-ammar.faizi@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221124162633.3856761-1-ammar.faizi@intel.com> References: <20221124162633.3856761-1-ammar.faizi@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: From: Ammar Faizi 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 --- 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