emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

109626 GTK3 issue


From: Dmitry Antipov
Subject: 109626 GTK3 issue
Date: Wed, 15 Aug 2012 12:57:02 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]