all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 109626 GTK3 issue
@ 2012-08-15  8:57 Dmitry Antipov
  2012-08-15  9:39 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Antipov @ 2012-08-15  8:57 UTC (permalink / raw)
  To: Emacs development discussions

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-15  9:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-15  8:57 109626 GTK3 issue Dmitry Antipov
2012-08-15  9:39 ` Chong Yidong

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.