changeset 4828:f31c12360354

fix warnings
author Ben Wing <ben@xemacs.org>
date Sun, 27 Dec 2009 20:16:19 -0600
parents 11daf37dae4d
children 9987da5935bd
files src/floatfns.c src/specifier.c
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/floatfns.c	Sat Dec 26 21:04:44 2009 -0600
+++ b/src/floatfns.c	Sun Dec 27 20:16:19 2009 -0600
@@ -1761,8 +1761,19 @@
   Lisp_Object res0;
   unsigned long prec = bigfloat_get_prec (number);
 
+#if 0
+  /* This causes the following GCC warning:
+
+  /xemacs/latest-fix/src/floatfns.c:1764: warning: dereferencing type-punned pointer will break strict-aliasing rules
+
+     and furthermore, it's a useless assert, since `number' is stored on
+     the stack and so its address can never be the same as `scratch_bigfloat'
+     or `scratch_bigfloat2', which are stored in the data segment.
+
+  -- ben */
   assert ((bigfloat *)(&number) != (bigfloat *)&scratch_bigfloat
 	  && (bigfloat *)(&number) != (bigfloat *)(&scratch_bigfloat2));
+#endif
 
   bigfloat_set_prec (scratch_bigfloat, prec);
   bigfloat_set_prec (scratch_bigfloat2, prec);
--- a/src/specifier.c	Sat Dec 26 21:04:44 2009 -0600
+++ b/src/specifier.c	Sun Dec 27 20:16:19 2009 -0600
@@ -982,7 +982,7 @@
 }
 
 static int
-charset_matches_specifier_tag_set_p (Lisp_Object charset,
+charset_matches_specifier_tag_set_p (Lisp_Object USED_IF_MULE (charset),
 				     Lisp_Object tag_set,
 				     enum font_specifier_matchspec_stages
 				     stage)
@@ -2830,6 +2830,8 @@
     specbind (Qinhibit_quit, Qt);
 
 #ifdef MULE
+  /* #### FIXME Does this font-specific stuff need to be here and not in
+     the font-specifier-specific code? --ben */
   if (CONSP(matchspec) && (CHARSETP(Ffind_charset(XCAR(matchspec)))))
     {
       charset = Ffind_charset(XCAR(matchspec));