Re: [PATCH v2] kconfig: fix an "implicit declaration of function" warning
From: Masahiro Yamada
Date: Sat Jan 11 2020 - 02:16:59 EST
On Fri, Jan 10, 2020 at 1:16 AM Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
>
> From: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
>
> 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 âsearch_confâ:
> scripts/kconfig/mconf.c:423:6: warning: implicit declaration of function âstrncasecmpâ [-Wimplicit-function-declaration]
> if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0)
> ^~~~~~~~~~~
> scripts/kconfig/mconf.c: In function âmainâ:
> scripts/kconfig/mconf.c:1021:8: warning: implicit declaration of function âstrcasecmpâ [-Wimplicit-function-declaration]
> if (!strcasecmp(mode, "single_menu"))
> ^~~~~~~~~~
>
> Fix it by explicitly including strings.h.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
Applied to linux-kbuild.
Thanks.
--
Best Regards
Masahiro Yamada