From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#46509: 28.0.50; Unused static function in xfns.c with GTK2 Date: Mon, 15 Feb 2021 09:15:05 +0000 Message-ID: <87im6td752.fsf@tcd.ie> References: <87y2fqu616.fsf@tcd.ie> <83im6ubppx.fsf@gnu.org> <87a6s6tugy.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14169"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 46509@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 15 10:16:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lBZzI-0003aE-Cg for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Feb 2021 10:16:12 +0100 Original-Received: from localhost ([::1]:40438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBZzH-0001Ad-8m for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Feb 2021 04:16:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBZz8-00014X-Bg for bug-gnu-emacs@gnu.org; Mon, 15 Feb 2021 04:16:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53941) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lBZz8-0001bI-3M for bug-gnu-emacs@gnu.org; Mon, 15 Feb 2021 04:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lBZz7-0008HR-V2 for bug-gnu-emacs@gnu.org; Mon, 15 Feb 2021 04:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Feb 2021 09:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46509 X-GNU-PR-Package: emacs Original-Received: via spool by 46509-submit@debbugs.gnu.org id=B46509.161338051431731 (code B ref 46509); Mon, 15 Feb 2021 09:16:01 +0000 Original-Received: (at 46509) by debbugs.gnu.org; 15 Feb 2021 09:15:14 +0000 Original-Received: from localhost ([127.0.0.1]:37254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBZyM-0008Fj-1q for submit@debbugs.gnu.org; Mon, 15 Feb 2021 04:15:14 -0500 Original-Received: from mail-wr1-f48.google.com ([209.85.221.48]:38167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBZyK-0008FS-LJ for 46509@debbugs.gnu.org; Mon, 15 Feb 2021 04:15:13 -0500 Original-Received: by mail-wr1-f48.google.com with SMTP id b3so7993310wrj.5 for <46509@debbugs.gnu.org>; Mon, 15 Feb 2021 01:15:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=HWs0iRMdZ9Pxoy5gTwi4LKh2xkZYU8E+fQGlwYAIvVs=; b=VGcMowkBzbsq8PhSeg+Siv2yUNI/HxoAhX7IjEmRa5StI3y8q4YNO6MiVANPOYegko 6/l42paZ9aSyqSp06WquZGnXhWdO+HUz/a3QsVkclqoLyyFmZCmSIGd+PfhGD99lOTyq TIAqTYLbBCOvodbDr8AfOl5+pjKUjKRhubmlvEc3QH7l0mFn3hku61GwA8/IXxpLCapT u8VSPMfiGZwcGip81FOHHnkihOCg/9Y+Jru4tcHFEF425c94iKH76QejEjTJmj5DU9NF Mag/kwrf49hrYJDf3LhTUlsMFpBzeblnYFkCZNWzqF41N922YGbvPCyog6TSVZ7GYrJZ 7vLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=HWs0iRMdZ9Pxoy5gTwi4LKh2xkZYU8E+fQGlwYAIvVs=; b=dNjyJYzTzPRJihfSWSuU/4Ls01Fq7NjkTGO06LwUniUiVPBeRZTy8fP/nnSOP9gzry HpVAHiLVjGhgefu4TZuQlMEyH49nnGfikGXq1fl845R2gBahTVL4E+XGAa68FeUn7zlW BdQiLklIAGuVA+Ko0xEXo6lRKVdoXKj/3YltYD9LeHEbZ+RM9BGLLZauivBQH1vMwdNc xGY+j/A+J4oYD2rESbnGFQOKrMdaRZ5Yp+nHOb47wjiXvexDhTAO9cO2TwMBUgADZ1re 84xLu2Vf69MXg8+yFdJUykN7e+DgMTNS2cZKgSorvvTMf6J6LGa8MxZsGV53ycT7AnLK rtJw== X-Gm-Message-State: AOAM532GPopKk0W6CiZnFwk7okU04aUBIcNhG60DwgzXBB3gD8tmPnIh 8LRO1NrFgecDC+ZqcL5V8eTPng== X-Google-Smtp-Source: ABdhPJwb9tqSkq+Vk2JtIlntVcqIE21d2xKNjr+llQH2q14E0FyPXfj7H8mfrnfLHUywt2dF2Fcy+Q== X-Received: by 2002:a5d:6b42:: with SMTP id x2mr17371772wrw.117.1613380506934; Mon, 15 Feb 2021 01:15:06 -0800 (PST) Original-Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id w4sm23223321wmc.13.2021.02.15.01.15.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 01:15:06 -0800 (PST) In-Reply-To: (martin rudalics's message of "Mon, 15 Feb 2021 09:15:51 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:200045 Archived-At: --=-=-= Content-Type: text/plain martin rudalics 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: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-unused-function-warning-in-xfns.c-with-GTK2.patch >From 577ac1e3884efb73d3519a68e074911b5befea39 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" 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 --=-=-= Content-Type: text/plain Thanks, -- Basil --=-=-=--