From: Dmitry Antipov <dmantipov@yandex.ru>
To: Emacs development discussions <emacs-devel@gnu.org>
Subject: 109626 GTK3 issue
Date: Wed, 15 Aug 2012 12:57:02 +0400 [thread overview]
Message-ID: <502B645E.3070104@yandex.ru> (raw)
An attempt to compile 109626 with GCC 4.7.1 and --enable-gcc-warnings causes
the following error:
/home/dima/work/stuff/emacs/trunk/src/gtkutil.c: In function 'xg_get_font':
/home/dima/work/stuff/emacs/trunk/src/gtkutil.c:2111:27: error: cast from function
call of type 'gint' to non-matching type 'double' [-Werror=bad-function-cast]
I'm not familiar with GTK stuff, but shouldn't it be:
=== modified file 'src/gtkutil.c'
--- src/gtkutil.c 2012-08-15 07:58:34 +0000
+++ src/gtkutil.c 2012-08-15 08:52:04 +0000
@@ -2103,13 +2103,13 @@
const char *name = pango_font_description_get_family (desc);
PangoWeight weight = pango_font_description_get_weight (desc);
PangoStyle style = pango_font_description_get_style (desc);
+ gint size = pango_font_description_get_size (desc);
args[0] = QCname;
args[1] = build_string (name);
args[2] = QCsize;
- args[3] = make_float (((double) pango_font_description_get_size (desc))
- / PANGO_SCALE);
+ args[3] = make_float (pango_units_to_double (size) / PANGO_SCALE);
args[4] = QCweight;
args[5] = XG_WEIGHT_TO_SYMBOL (weight);
Dmitry
next reply other threads:[~2012-08-15 8:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-15 8:57 Dmitry Antipov [this message]
2012-08-15 9:39 ` 109626 GTK3 issue Chong Yidong
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=502B645E.3070104@yandex.ru \
--to=dmantipov@yandex.ru \
--cc=emacs-devel@gnu.org \
/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).