updated: [master] [ad96349] x11: fix `-Wdeprecated-declarations` for `g_module_build_path`

2 views
Skip to first unread message

Yury V. Zaytsev

unread,
Aug 15, 2024, 3:09:50 PM8/15/24
to mc-co...@googlegroups.com
The following commit has been merged in the master branch:
commit ad96349c912690d6d7dd2979def79cede491c71f
Author: Yury V. Zaytsev <yu...@shurup.com>
Date: Fri Aug 9 07:31:04 2024 +0200

x11: fix `-Wdeprecated-declarations` for `g_module_build_path`

```
x11conn.c:140:5: warning: 'g_module_build_path' is deprecated [-Wdeprecated-declarations]
140 | x11_module_fname = g_module_build_path (NULL, "X11");
| ^~~~~~~~~~~~~~~~
```

Reported-by: David Martín <dhma...@yahoo.es>
Signed-off-by: Yury V. Zaytsev <yu...@shurup.com>

diff --git a/lib/tty/x11conn.c b/lib/tty/x11conn.c
index cdb60f1..fb471b9 100644
--- a/lib/tty/x11conn.c
+++ b/lib/tty/x11conn.c
@@ -129,21 +129,16 @@ static gboolean
x11_available (void)
{
#ifdef HAVE_GMODULE
- gchar *x11_module_fname;
-
if (lost_connection)
return FALSE;

if (x11_module != NULL)
return TRUE;

- x11_module_fname = g_module_build_path (NULL, "X11");
- x11_module = g_module_open (x11_module_fname, G_MODULE_BIND_LAZY);
+ x11_module = g_module_open ("X11", G_MODULE_BIND_LAZY);
if (x11_module == NULL)
x11_module = g_module_open ("libX11.so.6", G_MODULE_BIND_LAZY);

- g_free (x11_module_fname);
-
if (x11_module == NULL)
return FALSE;


--
Midnight Commander Development
Reply all
Reply to author
Forward
0 new messages