unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Robert Pluim <rpluim@gmail.com>
Cc: 46509@debbugs.gnu.org
Subject: bug#46509: 28.0.50; Unused static function in xfns.c with GTK2
Date: Mon, 15 Feb 2021 11:42:57 +0000	[thread overview]
Message-ID: <874kidy2ta.fsf@tcd.ie> (raw)
In-Reply-To: <874kidwrux.fsf@gmail.com> (Robert Pluim's message of "Mon, 15 Feb 2021 11:24:54 +0100")

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-compilation-with-GTK-versions-older-than-3.patch --]
[-- Type: text/x-diff, Size: 935 bytes --]

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


[-- Attachment #3: Type: text/plain, Size: 655 bytes --]


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

  reply	other threads:[~2021-02-15 11:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-14 13:34 bug#46509: 28.0.50; Unused static function in xfns.c with GTK2 Basil L. Contovounesios
2021-02-14 16:04 ` Eli Zaretskii
2021-02-14 17:17   ` martin rudalics
2021-02-14 17:44     ` Basil L. Contovounesios
2021-02-15  8:15       ` martin rudalics
2021-02-15  9:15         ` Basil L. Contovounesios
2021-02-15 10:05           ` martin rudalics
2021-02-15 10:24             ` Robert Pluim
2021-02-15 11:42               ` Basil L. Contovounesios [this message]
2021-02-16  9:29                 ` martin rudalics
2021-02-16 16:51                   ` Basil L. Contovounesios

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kidy2ta.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=46509@debbugs.gnu.org \
    --cc=rpluim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).