]> code.delx.au - gnu-emacs/commitdiff
* fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 22 Aug 2012 07:20:42 +0000 (00:20 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 22 Aug 2012 07:20:42 +0000 (00:20 -0700)
Otherwise, the compiler complains about (A?B:C) where B is void
and C is Lisp_Object.  This fixes an incompatibility with Sun C 5.12.
(fontset_add): Return void, for FONTSET_ADD.

src/ChangeLog
src/fontset.c

index 27e430d7d0d544890bb9ccfba162121210de198b..c43404fa438c3112ef867b0db103b823a44381b6 100644 (file)
@@ -1,3 +1,10 @@
+2012-08-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
+       Otherwise, the compiler complains about (A?B:C) where B is void
+       and C is Lisp_Object.  This fixes an incompatibility with Sun C 5.12.
+       (fontset_add): Return void, for FONTSET_ADD.
+
 2012-08-21  Paul Eggert  <eggert@cs.ucla.edu>
 
        * alloc.c: Use bool for booleans.
index f5eae58a01ea657e9bca83056d66ab9c10e20818..01e38fe45e50bd8e5df17085123183ba439f16d3 100644 (file)
@@ -185,8 +185,7 @@ void (*check_window_system_func) (void);
 
 
 /* Prototype declarations for static functions.  */
-static Lisp_Object fontset_add (Lisp_Object, Lisp_Object, Lisp_Object,
-                                Lisp_Object);
+static void fontset_add (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
 static Lisp_Object fontset_find_font (Lisp_Object, int, struct face *,
                                       int, int);
 static void reorder_font_vector (Lisp_Object, struct font *);
@@ -356,11 +355,12 @@ fontset_ref (Lisp_Object fontset, int c)
    ? (NILP (range)                                                     \
       ? (set_fontset_fallback                                          \
         (fontset, Fmake_vector (make_number (1), (elt))))              \
-      : Fset_char_table_range ((fontset), (range),                     \
-                              Fmake_vector (make_number (1), (elt))))  \
+      : ((void)                                                                \
+        Fset_char_table_range (fontset, range,                         \
+                               Fmake_vector (make_number (1), elt))))  \
    : fontset_add ((fontset), (range), (elt), (add)))
 
-static Lisp_Object
+static void
 fontset_add (Lisp_Object fontset, Lisp_Object range, Lisp_Object elt, Lisp_Object add)
 {
   Lisp_Object args[2];
@@ -389,7 +389,6 @@ fontset_add (Lisp_Object fontset, Lisp_Object range, Lisp_Object elt, Lisp_Objec
       set_fontset_fallback
        (fontset, NILP (args[idx]) ? args[1 - idx] : Fvconcat (2, args));
     }
-  return Qnil;
 }
 
 static int