[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46509: 28.0.50; Unused static function in xfns.c with GTK2
From: |
Basil L. Contovounesios |
Subject: |
bug#46509: 28.0.50; Unused static function in xfns.c with GTK2 |
Date: |
Mon, 15 Feb 2021 09:15:05 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
martin rudalics <rudalics@gmx.at> writes:
>> What about this?
>
> Don't like it. Did you test it with a non-GTK toolkit?
No, that would have been far too clever.
What about this instead:
>From 577ac1e3884efb73d3519a68e074911b5befea39 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Sun, 14 Feb 2021 16:58:06 +0000
Subject: [PATCH] Fix unused function warning in xfns.c with GTK2
* src/xfns.c (x_get_net_workarea): Define only when using GTK other
than GTK3, or when not using GTK, to match its use in
Fx_display_monitor_attributes_list.
(x_get_monitor_for_frame, x_make_monitor_attribute_list)
(x_get_monitor_attributes_fallback, x_get_monitor_attributes_xrandr)
(x_get_monitor_attributes_xinerama, x_get_monitor_attributes):
Condition definitions on !USE_GTK, to match their use in
Fx_display_monitor_attributes_list (bug#46509).
(x_get_monitor_attributes_xrandr): Undefine RANDR13_LIBRARY after
it's been used.
---
src/xfns.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/xfns.c b/src/xfns.c
index 481ee0e225..d90644819b 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4599,7 +4599,7 @@ DEFUN ("x-display-save-under", Fx_display_save_under,
return Qnil;
}
-#if !defined USE_GTK || !defined HAVE_GTK3
+#if !(defined USE_GTK && defined HAVE_GTK3)
/* Store the geometry of the workarea on display DPYINFO into *RECT.
Return false if and only if the workarea information cannot be
@@ -4662,6 +4662,9 @@ x_get_net_workarea (struct x_display_info *dpyinfo,
XRectangle *rect)
return result;
}
+#endif /* !(USE_GTK && HAVE_GTK3) */
+
+#ifndef USE_GTK
/* Return monitor number where F is "most" or closest to. */
static int
@@ -4877,6 +4880,8 @@ #define RANDR13_LIBRARY \
pxid = XRRGetOutputPrimary (dpy, dpyinfo->root_window);
#endif
+#undef RANDR13_LIBRARY
+
for (i = 0; i < n_monitors; ++i)
{
XRROutputInfo *info = XRRGetOutputInfo (dpy, resources,
--
2.30.0
Thanks,
--
Basil
- bug#46509: 28.0.50; Unused static function in xfns.c with GTK2, Basil L. Contovounesios, 2021/02/14
- bug#46509: 28.0.50; Unused static function in xfns.c with GTK2, Eli Zaretskii, 2021/02/14
- bug#46509: 28.0.50; Unused static function in xfns.c with GTK2, martin rudalics, 2021/02/14
- bug#46509: 28.0.50; Unused static function in xfns.c with GTK2, Basil L. Contovounesios, 2021/02/14
- bug#46509: 28.0.50; Unused static function in xfns.c with GTK2, martin rudalics, 2021/02/15
- bug#46509: 28.0.50; Unused static function in xfns.c with GTK2,
Basil L. Contovounesios <=
- bug#46509: 28.0.50; Unused static function in xfns.c with GTK2, martin rudalics, 2021/02/15
- bug#46509: 28.0.50; Unused static function in xfns.c with GTK2, Robert Pluim, 2021/02/15
- bug#46509: 28.0.50; Unused static function in xfns.c with GTK2, Basil L. Contovounesios, 2021/02/15
- bug#46509: 28.0.50; Unused static function in xfns.c with GTK2, martin rudalics, 2021/02/16
- bug#46509: 28.0.50; Unused static function in xfns.c with GTK2, Basil L. Contovounesios, 2021/02/16