Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix warning: implicit declaration of function ‘strcasecmp’ #546

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix warning: implicit declaration of function ‘strcasecmp’ #546

wants to merge 1 commit into from

Conversation

andy5995
Copy link

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant