Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2449093ybl; Thu, 9 Jan 2020 13:00:17 -0800 (PST) X-Google-Smtp-Source: APXvYqz5SIh2ZHmoZVXVXXC1QJTxckVbdNTawmeJIkzKCB3dJT5WvW/QnA9UWyy3pP2ILMMmebG/ X-Received: by 2002:aca:1012:: with SMTP id 18mr4536741oiq.151.1578603617627; Thu, 09 Jan 2020 13:00:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578603617; cv=none; d=google.com; s=arc-20160816; b=vgq9NKxzlapEZ6UEK9GcOZQsPf/4LN0thPqST0tN/YrjGRjrlPdakf9Lvi1YrF7TpY ZVYcNhokyT84OKZDIxkxaDy+D4kA4Nlg7n+GCfc2Frk0TBl3OoMUZcA7TjRsEaKITqgo +37m6Qav++C3/dHIXMKe1XhC2DYPoX56FdT15Bo1VGgaCPqLAnZZNYR9C4tSvTp28Zsu ufk0lvA/3fYx/kkXsF1zYnbJsjRDvYS784c4SDpMrjyw9Ychf58+MoJGXvO4VkJmtvXP nYRFFJefwYY4khGjfGAI0T3ZPWdltzNU+eM4hranOtPCJr6AoCl/BQ0ttzCupxMeztD9 SqxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:dkim-filter; bh=AqJ/xCc4C+EoY9ZSnwE5jiP6hg2Sr1yHiLOvcetf/bQ=; b=s5fIYfUkEosfbHblxeFlW01Bg+xpppEyEWd96dbyz94VVVguTsNplYpWTORhWs4w/t l3IpYlqAc8CnrsH6XPx5oFfsYErV/zGjN55OmtM9fbiSikywQs306xEdXuNhkQ0bQp9n UIH1sxSAmhmpvV39Vc225fyL0dEWv4AfbYZqIPTgDzEVbfkQcq2mmOLp/mGeW3WLxVLG 1+DhpQFsn473MFwxuU7YSd5OansntWYuZrmkPfGWZai3B5p0nBYA28GmDLliYsWUe9ri 6v/j+avwueEReAoIv4mGYjX6Wmn0YC4dgJw1x0hl6qzexnxlhAwQpMwMqyzmLlkz5C3r CTdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=dSABy3Fr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a128si4309740oib.142.2020.01.09.13.00.05; Thu, 09 Jan 2020 13:00:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=dSABy3Fr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732687AbgAIP7C (ORCPT + 99 others); Thu, 9 Jan 2020 10:59:02 -0500 Received: from conssluserg-06.nifty.com ([210.131.2.91]:51239 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728488AbgAIP7C (ORCPT ); Thu, 9 Jan 2020 10:59:02 -0500 Received: from mail-vk1-f177.google.com (mail-vk1-f177.google.com [209.85.221.177]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 009FwiPo026239; Fri, 10 Jan 2020 00:58:45 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 009FwiPo026239 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1578585525; bh=AqJ/xCc4C+EoY9ZSnwE5jiP6hg2Sr1yHiLOvcetf/bQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dSABy3Fr9rRGVz/zvukRpgXU5BVu5Z6BG0JLUvmN+FgQfRisxUQ4O7pdVq8IKGJlC Q0SMySoHBKWHqDiZZiqN44caYJ9/Yt7Q9Ud5lycWuz4fSXhEQOGYNEw6TSFgg0HHzz 2y6XMq/bRkLdI48/yaFhENpqKpeqhlV7ngOzZ0Ynl+XBmIWlVe4DFByTXI0Bzm7c5v 8XPw7QANBo+/qpZHQPObF/vDyL+HOgkTiegqox4DngP3FiXm2bDEBA4mMs19T1AAfZ HjnQ9tP/3g7bCCZ+MilrymB6hBuPHEYeG6XyVNvg5Xpxmx9ELx/5DPfIBznuQYK4D6 fyUnosw9lndHA== X-Nifty-SrcIP: [209.85.221.177] Received: by mail-vk1-f177.google.com with SMTP id t129so2086199vkg.6; Thu, 09 Jan 2020 07:58:44 -0800 (PST) X-Gm-Message-State: APjAAAVVqrWm9DDt9Tef/zEHawzH0MrYBuY2yBMFbBJ3x4uqTKw+gqnb UxkBmqzHP/Uom2LZm44Cyvv+oDAhGAgSwzVtwJI= X-Received: by 2002:a1f:18b:: with SMTP id 133mr7051654vkb.73.1578585523664; Thu, 09 Jan 2020 07:58:43 -0800 (PST) MIME-Version: 1.0 References: <20200109125627.24654-1-brgl@bgdev.pl> In-Reply-To: <20200109125627.24654-1-brgl@bgdev.pl> From: Masahiro Yamada Date: Fri, 10 Jan 2020 00:58:07 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kconfig: fix an "implicit declaration of function" warning To: Bartosz Golaszewski Cc: Linux Kbuild mailing list , Linux Kernel Mailing List , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 9, 2020 at 9:56 PM Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > strncasecmp() & strcasecmp() functions are declared in strings.h, not > string.h. On most environments the former is implicitly included by > the latter but on some setups, building menuconfig results in the > following warning: > > HOSTCC scripts/kconfig/mconf.o > scripts/kconfig/mconf.c: In function =E2=80=98search_conf=E2=80=99: > scripts/kconfig/mconf.c:423:6: warning: implicit declaration of function = =E2=80=98strncasecmp=E2=80=99 [-Wimplicit-function-declaration] > if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) =3D=3D 0= ) > ^~~~~~~~~~~ > scripts/kconfig/mconf.c: In function =E2=80=98main=E2=80=99: > scripts/kconfig/mconf.c:1021:8: warning: implicit declaration of function= =E2=80=98strcasecmp=E2=80=99 [-Wimplicit-function-declaration] > if (!strcasecmp(mode, "single_menu")) > ^~~~~~~~~~ > > Fix it by explicitly including strings.h. > > Signed-off-by: Bartosz Golaszewski Thanks. I see strncasecmp() in scripts/kconfig/nconf.c too. Could you fix both in a single patch? You can try it with "make nconfig". > --- > scripts/kconfig/mconf.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c > index 49c26ea9dd98..4063dbc1b927 100644 > --- a/scripts/kconfig/mconf.c > +++ b/scripts/kconfig/mconf.c > @@ -15,6 +15,7 @@ > #include > #include > #include > +#include > #include > #include > > -- > 2.23.0 > --=20 Best Regards Masahiro Yamada