[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 11:42:57 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Robert Pluim <rpluim@gmail.com> writes:
>>>>>> On Mon, 15 Feb 2021 11:05:59 +0100, martin rudalics <rudalics@gmx.at>
>>>>>> said:
>
> >> What about this instead:
> martin> Better. The ChangeLog is slightly excessive.
>
> And ChangeLog entries for changes depending on preprocessor directives
> are supposed to put the directives in [ ], eg
I know (although I forgot to indicate this for RANDR13_LIBRARY), but in
this case the relevant directives are being changed, and I didn't know
how best to indicate that. Here's the last commit in this area, for
example:
>From 338154240e05a06a9fedb806940ef671868b4722 Mon Sep 17 00:00:00 2001
From: Eli Zaretskii <eliz@gnu.org>
Date: Wed, 1 Jan 2020 19:55:35 +0200
Subject: [PATCH] Fix compilation with GTK versions older than 3
* src/xfns.c (x_get_net_workarea): Change a recently moved #ifndef
so that GTK builds which need this function will compile it.
Reported by John <jpff@codemist.co.uk>.
(cherry picked from commit d36adb544d984b91c70f6194da01344e4b2b6fc9)
---
src/xfns.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/xfns.c b/src/xfns.c
index b94666d554..d0d5d399dc 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4572,7 +4572,7 @@ DEFUN ("x-display-save-under", Fx_display_save_under,
return Qnil;
}
-#ifndef USE_GTK
+#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
--
2.30.0
I've come up with this:
Pacify unused function warning in xfns.c with GTK2
* src/xfns.c (x_get_net_workarea, x_get_monitor_for_frame)
(x_make_monitor_attribute_list, x_get_monitor_attributes_fallback):
[HAVE_XINERAMA] (x_get_monitor_attributes_xinerama)
[HAVE_XRANDR] (x_get_monitor_attributes_xrandr)
(x_get_monitor_attributes): Fix #ifdefs around definitions to avoid
unused function warnings regardless of GTK use (bug#46509).
[HAVE_XRANDR] (x_get_monitor_attributes_xrandr): Undefine
RANDR13_LIBRARY after it's been used.
But I'm not sure this pacifies Martin, so please suggest the best way of
writing this.
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, 2021/02/15
- 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 <=
- 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