diff options
| author | Paul Eggert | 2012-08-22 00:20:42 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-08-22 00:20:42 -0700 |
| commit | d733ec6d3d0b6524df9f5f5d9132ff430dd5dc01 (patch) | |
| tree | 7670aa5cd4887e596c2b5ff244109d276411038f | |
| parent | 80a51fa01ff36879aa57f82f90b796a2092e8191 (diff) | |
| download | emacs-d733ec6d3d0b6524df9f5f5d9132ff430dd5dc01.tar.gz emacs-d733ec6d3d0b6524df9f5f5d9132ff430dd5dc01.zip | |
* 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.
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/fontset.c | 11 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 27e430d7d0d..c43404fa438 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-08-22 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * fontset.c (FONTSET_ADD): Return void, not Lisp_Object. | ||
| 4 | Otherwise, the compiler complains about (A?B:C) where B is void | ||
| 5 | and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12. | ||
| 6 | (fontset_add): Return void, for FONTSET_ADD. | ||
| 7 | |||
| 1 | 2012-08-21 Paul Eggert <eggert@cs.ucla.edu> | 8 | 2012-08-21 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 9 | ||
| 3 | * alloc.c: Use bool for booleans. | 10 | * alloc.c: Use bool for booleans. |
diff --git a/src/fontset.c b/src/fontset.c index f5eae58a01e..01e38fe45e5 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -185,8 +185,7 @@ void (*check_window_system_func) (void); | |||
| 185 | 185 | ||
| 186 | 186 | ||
| 187 | /* Prototype declarations for static functions. */ | 187 | /* Prototype declarations for static functions. */ |
| 188 | static Lisp_Object fontset_add (Lisp_Object, Lisp_Object, Lisp_Object, | 188 | static void fontset_add (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); |
| 189 | Lisp_Object); | ||
| 190 | static Lisp_Object fontset_find_font (Lisp_Object, int, struct face *, | 189 | static Lisp_Object fontset_find_font (Lisp_Object, int, struct face *, |
| 191 | int, int); | 190 | int, int); |
| 192 | static void reorder_font_vector (Lisp_Object, struct font *); | 191 | static void reorder_font_vector (Lisp_Object, struct font *); |
| @@ -356,11 +355,12 @@ fontset_ref (Lisp_Object fontset, int c) | |||
| 356 | ? (NILP (range) \ | 355 | ? (NILP (range) \ |
| 357 | ? (set_fontset_fallback \ | 356 | ? (set_fontset_fallback \ |
| 358 | (fontset, Fmake_vector (make_number (1), (elt)))) \ | 357 | (fontset, Fmake_vector (make_number (1), (elt)))) \ |
| 359 | : Fset_char_table_range ((fontset), (range), \ | 358 | : ((void) \ |
| 360 | Fmake_vector (make_number (1), (elt)))) \ | 359 | Fset_char_table_range (fontset, range, \ |
| 360 | Fmake_vector (make_number (1), elt)))) \ | ||
| 361 | : fontset_add ((fontset), (range), (elt), (add))) | 361 | : fontset_add ((fontset), (range), (elt), (add))) |
| 362 | 362 | ||
| 363 | static Lisp_Object | 363 | static void |
| 364 | fontset_add (Lisp_Object fontset, Lisp_Object range, Lisp_Object elt, Lisp_Object add) | 364 | fontset_add (Lisp_Object fontset, Lisp_Object range, Lisp_Object elt, Lisp_Object add) |
| 365 | { | 365 | { |
| 366 | Lisp_Object args[2]; | 366 | Lisp_Object args[2]; |
| @@ -389,7 +389,6 @@ fontset_add (Lisp_Object fontset, Lisp_Object range, Lisp_Object elt, Lisp_Objec | |||
| 389 | set_fontset_fallback | 389 | set_fontset_fallback |
| 390 | (fontset, NILP (args[idx]) ? args[1 - idx] : Fvconcat (2, args)); | 390 | (fontset, NILP (args[idx]) ? args[1 - idx] : Fvconcat (2, args)); |
| 391 | } | 391 | } |
| 392 | return Qnil; | ||
| 393 | } | 392 | } |
| 394 | 393 | ||
| 395 | static int | 394 | static int |