From 8e3cf4cacbee8c7103dd8911511719eebfaa837a Mon Sep 17 00:00:00 2001 From: andy5995 Date: Mon, 20 Dec 2021 01:20:29 -0600 Subject: [PATCH] =?UTF-8?q?fix=20warning:=20implicit=20declaration=20of=20?= =?UTF-8?q?function=20=E2=80=98strcasecmp=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On gcc 11.1.0 (Manjaro), I got this warning ``` [58/93] Compiling C object meson-out/libui.so.0.p/unix_text.c.o ../unix/text.c: In function ‘uiprivStricmp’: ../unix/text.c:16:16: warning: implicit declaration of function ‘strcasecmp’; did you mean ‘g_strcasecmp’? [-Wimplicit-function-declaration] 16 | return strcasecmp(a, b); | ^~~~~~~~~~ | g_strcasecmp ``` I assume you'd want to use a g_* function here so you don't have to Apparently g_strcasecmp is deprecated. Some extra info at https://people.gnome.org/~ryanl/glib-docs/glib-String-Utility-Functions.html#g-strcasecmp --- unix/text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/text.c b/unix/text.c index 9a2a9dc06..940bf2045 100644 --- a/unix/text.c +++ b/unix/text.c @@ -13,5 +13,5 @@ void uiFreeText(char *t) int uiprivStricmp(const char *a, const char *b) { - return strcasecmp(a, b); + return g_ascii_strcasecmp(a, b); }