From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AF60C4332F for ; Thu, 24 Nov 2022 08:01:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229697AbiKXIBu (ORCPT ); Thu, 24 Nov 2022 03:01:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229717AbiKXIBt (ORCPT ); Thu, 24 Nov 2022 03:01:49 -0500 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ED15C6611 for ; Thu, 24 Nov 2022 00:01:48 -0800 (PST) Received: from localhost.localdomain (unknown [182.253.183.240]) by gnuweeb.org (Postfix) with ESMTPSA id D1B9C816FF; Thu, 24 Nov 2022 08:01:44 +0000 (UTC) X-GW-Data: lPqxHiMPbJw1wb7CM9QUryAGzr0yq5atzVDdxTR0iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1669276908; bh=I8+aPRh++xFhEmPVgD+jVUkqZVdfhhklZ90+OLkmncE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CJtpFAMrVlWU5FM4cAulJ8XV2htCkp/nyWEXhujh+DvzGNLZKileiMv+Aq2BtYSWw hi0dmE2sGO+ezgdxVT+0+qVj54KohYn4onpXMTD0t1cLjDOHjs+dnjzkphLCPYCW3O qlgNSLJHLIovPUSJCAMehNTm+UhNqQoUjHy7k0aBqxmmtpbzCRpFzIdhJ0EB13nQRJ qujP0267+ovIyuD1A2viX/LHlvoN/N4J+p2HXv2e8XATi/oL/n+OhH+TnP8uDfDHe1 ss8H7zbVlPU9bW2yCINwlwoQFZYOutxdt0zvfkCN9IBZaFvihvk9R7bShFr25xHwnw f9Jud+s1oghBQ== From: Ammar Faizi To: Jens Axboe Cc: Ammar Faizi , Pavel Begunkov , io-uring Mailing List , GNU/Weeb Mailing List , Gilang Fachrezy , Muhammad Rizki , Alviro Iskandar Setiawan , VNLX Kernel Department 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 Message-Id: <20221124075846.3784701-7-ammar.faizi@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221124075846.3784701-1-ammar.faizi@intel.com> References: <20221124075846.3784701-1-ammar.faizi@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org 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