From patchwork Thu May 7 12:21:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1285208 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256 header.s=dec2015msa header.b=lpiGirDm; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Hszq3SyLz9sSc for ; Thu, 7 May 2020 22:22:43 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8B92982272; Thu, 7 May 2020 14:22:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="lpiGirDm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7759A81D5E; Thu, 7 May 2020 14:22:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_MSPIKE_BL,RCVD_IN_MSPIKE_L3,SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C358A81D5E for ; Thu, 7 May 2020 14:22:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=yamada.masahiro@socionext.com Received: from oscar.flets-west.jp (softbank126090202047.bbtec.net [126.90.202.47]) (authenticated) by conuserg-08.nifty.com with ESMTP id 047CLUhM031321; Thu, 7 May 2020 21:21:30 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com 047CLUhM031321 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1588854091; bh=NKRUyCR4WhqJnWYQFNukwPhmL086E2Q6IFxkBf8KRKo=; h=From:To:Cc:Subject:Date:From; b=lpiGirDmUR7EeSJZj2VfuiazbGM/lNM8yJrWqz9qOSjZVEP6ZPwTgMDDSt8INHcNI xolZy6yWH8X94KQJGsXrvSicm20zcrxMXtSDA6kzB85faXjtdPZNWOdY19VPjaN5/O PfhZce8R+yKJsY7gqh+M377yEf/v70q294ZsVB6+oeNly3klttZ49/1M6suSQXKoKu OYl8aw5DepQ2xeVJAid1P3mOTwzgZOb/M3J9WWaLgb4/qGMmtbS+tLgCPEvK+d8rLX pToQn75HR3fzIAbJi1ePpB176813ZpP/H8i/cFWplEMxAFK+ZvvCjnJpk5E9+0ecby G1VflMZE2FQYw== X-Nifty-SrcIP: [126.90.202.47] From: Masahiro Yamada To: u-boot@lists.denx.de Cc: Masahiro Yamada , Bin Meng , Heinrich Schuchardt , Jagan Teki , Kever Yang , Michal Simek , Simon Glass Subject: [PATCH] kbuild: add -Werror=implicit-function-declaration Date: Thu, 7 May 2020 21:21:27 +0900 Message-Id: <20200507122127.1345392-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Add -Werror=implicit-function-declaration as Linux does. If you do not check the prototype, it may go wrong run-time. It is better to break the build, and require to include correct headers. Signed-off-by: Masahiro Yamada --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cc99873062..f8b136a07f 100644 --- a/Makefile +++ b/Makefile @@ -419,7 +419,7 @@ CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__ KBUILD_CFLAGS := -Wall -Wstrict-prototypes \ - -Wno-format-security \ + -Werror=implicit-function-declaration -Wno-format-security \ -fno-builtin -ffreestanding $(CSTD_FLAG) KBUILD_CFLAGS += -fshort-wchar -fno-strict-aliasing KBUILD_AFLAGS := -D__ASSEMBLY__