aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog28
-rw-r--r--src/coding.c5
-rw-r--r--src/fileio.c13
-rw-r--r--src/fontset.c13
-rw-r--r--src/lisp.h13
-rw-r--r--src/regex.c2
-rw-r--r--src/xfns.c9
-rw-r--r--src/xterm.h5
8 files changed, 51 insertions, 37 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8f3c4056495..9267a96467c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -33,6 +33,34 @@
33 ($(lib)/libgnu.a): New rule. 33 ($(lib)/libgnu.a): New rule.
34 (temacs$(EXEEXT)): Also link $(lib)/libgnu.a. 34 (temacs$(EXEEXT)): Also link $(lib)/libgnu.a.
35 35
36 * xfns.c (x_real_positions): Fix signedness of local var 'ign'.
37 XGetGeometry wants unsigned int *, not int *, for its last 4 args,
38 so change the type of 'ign' to unsigned int from int.
39
40 * regex.c (analyse_first): Remove unreachable 'continue' statement.
41
42 * xterm.h (struct x_display_info): Remove stray semicolon.
43 The extra semicolon didn't conform to the C standard.
44 Problem reported by Sun cc.
45
46 * lisp.h: Redo flags and XSET slightly to avoid overflow diagnostics.
47 These changes make compilation easier to follow with Sun cc.
48 (ARRAY_MARK_FLAG): Make it signed, so that it can be assigned to
49 EMACS_INT values without provoking overflow diagnostics.
50 (PSEUDOVECTOR_FLAG): Likewise, for consistency.
51 (XSET) [! USE_LSB_TAG]: Use unsigned left shift to avoid overflow
52 diagnostic with signed left shift.
53
54 * fileio.c (make_temp_name): Remove unreachable code.
55
56 * fontset.c (free_realized_fontset): Mark unreachable code with if (0).
57 Previously it was marked by preceding it with "return;", but
58 Sun cc complains about this.
59
60 * coding.c (decode_coding_emacs_mule): Remove unreachable code.
61 This is a typo left over from 2009-03-06T07:51:52Z!handa@m17n.org,
62 which fixed Bug#2370. Caught by Sun cc.
63
362011-01-15 Martin Rudalics <rudalics@gmx.at> 642011-01-15 Martin Rudalics <rudalics@gmx.at>
37 65
38 * window.c (inhibit_point_swap): New variable. 66 * window.c (inhibit_point_swap): New variable.
diff --git a/src/coding.c b/src/coding.c
index 5f9b207c6b3..06f3fe58df1 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -2631,10 +2631,6 @@ decode_coding_emacs_mule (struct coding_system *coding)
2631 } 2631 }
2632 continue; 2632 continue;
2633 2633
2634 src = src_base;
2635 consumed_chars = consumed_chars_base;
2636 continue;
2637
2638 invalid_code: 2634 invalid_code:
2639 EMACS_MULE_MAYBE_FINISH_COMPOSITION (); 2635 EMACS_MULE_MAYBE_FINISH_COMPOSITION ();
2640 src = src_base; 2636 src = src_base;
@@ -10901,4 +10897,3 @@ emacs_strerror (int error_number)
10901} 10897}
10902 10898
10903#endif /* emacs */ 10899#endif /* emacs */
10904
diff --git a/src/fileio.c b/src/fileio.c
index 2a415d2d697..737eeaddaec 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -737,17 +737,13 @@ make_temp_name (Lisp_Object prefix, int base64_p)
737 as bad as (and in many cases worse than) throwing the 737 as bad as (and in many cases worse than) throwing the
738 error, or to ignore the error, which will likely result 738 error, or to ignore the error, which will likely result
739 in looping through 225307 stat's, which is not only 739 in looping through 225307 stat's, which is not only
740 dog-slow, but also useless since it will fallback to 740 dog-slow, but also useless since eventually nil would
741 the errow below, anyway. */ 741 have to be returned anyway. */
742 report_file_error ("Cannot create temporary name for prefix", 742 report_file_error ("Cannot create temporary name for prefix",
743 Fcons (prefix, Qnil)); 743 Fcons (prefix, Qnil));
744 /* not reached */ 744 /* not reached */
745 } 745 }
746 } 746 }
747
748 error ("Cannot create temporary name for prefix `%s'",
749 SDATA (prefix));
750 return Qnil;
751} 747}
752 748
753 749
@@ -5229,7 +5225,7 @@ auto_save_1 (void)
5229 5225
5230static Lisp_Object 5226static Lisp_Object
5231do_auto_save_unwind (Lisp_Object arg) /* used as unwind-protect function */ 5227do_auto_save_unwind (Lisp_Object arg) /* used as unwind-protect function */
5232 5228
5233{ 5229{
5234 FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; 5230 FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer;
5235 auto_saving = 0; 5231 auto_saving = 0;
@@ -5244,7 +5240,7 @@ do_auto_save_unwind (Lisp_Object arg) /* used as unwind-protect function */
5244 5240
5245static Lisp_Object 5241static Lisp_Object
5246do_auto_save_unwind_1 (Lisp_Object value) /* used as unwind-protect function */ 5242do_auto_save_unwind_1 (Lisp_Object value) /* used as unwind-protect function */
5247 5243
5248{ 5244{
5249 minibuffer_auto_raise = XINT (value); 5245 minibuffer_auto_raise = XINT (value);
5250 return Qnil; 5246 return Qnil;
@@ -5870,4 +5866,3 @@ This includes interactive calls to `delete-file' and
5870 defsubr (&Sunix_sync); 5866 defsubr (&Sunix_sync);
5871#endif 5867#endif
5872} 5868}
5873
diff --git a/src/fontset.c b/src/fontset.c
index c38b01d4725..8d58f4cee9a 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -849,12 +849,12 @@ free_realized_fontset (FRAME_PTR f, Lisp_Object fontset)
849{ 849{
850 Lisp_Object tail; 850 Lisp_Object tail;
851 851
852 return; 852 if (0)
853 for (tail = FONTSET_OBJLIST (fontset); CONSP (tail); tail = XCDR (tail)) 853 for (tail = FONTSET_OBJLIST (fontset); CONSP (tail); tail = XCDR (tail))
854 { 854 {
855 xassert (FONT_OBJECT_P (XCAR (tail))); 855 xassert (FONT_OBJECT_P (XCAR (tail)));
856 font_close_object (f, XCAR (tail)); 856 font_close_object (f, XCAR (tail));
857 } 857 }
858} 858}
859 859
860/* Free fontset of FACE defined on frame F. Called from 860/* Free fontset of FACE defined on frame F. Called from
@@ -2263,4 +2263,3 @@ at the vertical center of lines. */);
2263 defsubr (&Sfontset_list_all); 2263 defsubr (&Sfontset_list_all);
2264#endif 2264#endif
2265} 2265}
2266
diff --git a/src/lisp.h b/src/lisp.h
index 1f507123d83..d00dbdc5def 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -327,13 +327,14 @@ typedef EMACS_INT Lisp_Object;
327#define LISP_MAKE_RVALUE(o) (0+(o)) 327#define LISP_MAKE_RVALUE(o) (0+(o))
328#endif /* USE_LISP_UNION_TYPE */ 328#endif /* USE_LISP_UNION_TYPE */
329 329
330/* In the size word of a vector, this bit means the vector has been marked. */ 330/* In the size word of a vector, this bit means the vector has been marked.
331 (Shift -1 left, not 1, to avoid provoking overflow diagnostics.) */
331 332
332#define ARRAY_MARK_FLAG ((EMACS_UINT) 1 << (BITS_PER_EMACS_INT - 1)) 333#define ARRAY_MARK_FLAG ((EMACS_INT) -1 << (BITS_PER_EMACS_INT - 1))
333 334
334/* In the size word of a struct Lisp_Vector, this bit means it's really 335/* In the size word of a struct Lisp_Vector, this bit means it's really
335 some other vector-like object. */ 336 some other vector-like object. */
336#define PSEUDOVECTOR_FLAG ((ARRAY_MARK_FLAG >> 1)) 337#define PSEUDOVECTOR_FLAG ((EMACS_INT) 1 << (BITS_PER_EMACS_INT - 2))
337 338
338/* In a pseudovector, the size field actually contains a word with one 339/* In a pseudovector, the size field actually contains a word with one
339 PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to 340 PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to
@@ -437,8 +438,9 @@ enum pvec_type
437 ((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS) 438 ((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS)
438#endif 439#endif
439 440
440#define XSET(var, type, ptr) \ 441#define XSET(var, type, ptr) \
441 ((var) = ((EMACS_INT)(type) << VALBITS) + ((EMACS_INT) (ptr) & VALMASK)) 442 ((var) = ((EMACS_INT) ((EMACS_UINT) (type) << VALBITS) \
443 + ((EMACS_INT) (ptr) & VALMASK)))
442 444
443#define XPNTR(a) ((EMACS_UINT) ((a) & VALMASK)) 445#define XPNTR(a) ((EMACS_UINT) ((a) & VALMASK))
444 446
@@ -3671,4 +3673,3 @@ extern Lisp_Object safe_alloca_unwind (Lisp_Object);
3671 3673
3672 3674
3673#endif /* EMACS_LISP_H */ 3675#endif /* EMACS_LISP_H */
3674
diff --git a/src/regex.c b/src/regex.c
index b39920a8af4..6afbbb6d193 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -3997,7 +3997,6 @@ analyse_first (const re_char *p, const re_char *pend, char *fastmap, const int m
3997 { 3997 {
3998 case succeed: 3998 case succeed:
3999 return 1; 3999 return 1;
4000 continue;
4001 4000
4002 case duplicate: 4001 case duplicate:
4003 /* If the first character has to match a backreference, that means 4002 /* If the first character has to match a backreference, that means
@@ -6733,4 +6732,3 @@ regfree (regex_t *preg)
6733WEAK_ALIAS (__regfree, regfree) 6732WEAK_ALIAS (__regfree, regfree)
6734 6733
6735#endif /* not emacs */ 6734#endif /* not emacs */
6736
diff --git a/src/xfns.c b/src/xfns.c
index 7fcb4c637a1..70b72faebea 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -626,7 +626,7 @@ x_real_positions (FRAME_PTR f, int *xptr, int *yptr)
626 if (rc == Success && actual_type == target_type && !x_had_errors_p (dpy) 626 if (rc == Success && actual_type == target_type && !x_had_errors_p (dpy)
627 && actual_size == 4 && actual_format == 32) 627 && actual_size == 4 && actual_format == 32)
628 { 628 {
629 int ign; 629 unsigned int ign;
630 Window rootw; 630 Window rootw;
631 long *fe = (long *)tmp_data; 631 long *fe = (long *)tmp_data;
632 632
@@ -756,7 +756,7 @@ x_set_tool_bar_position (struct frame *f,
756 if (EQ (new_value, old_value)) return; 756 if (EQ (new_value, old_value)) return;
757 757
758#ifdef USE_GTK 758#ifdef USE_GTK
759 if (xg_change_toolbar_position (f, new_value)) 759 if (xg_change_toolbar_position (f, new_value))
760 f->tool_bar_position = new_value; 760 f->tool_bar_position = new_value;
761#endif 761#endif
762} 762}
@@ -3510,7 +3510,7 @@ This function is an internal primitive--use `make-frame' instead. */)
3510 } 3510 }
3511 3511
3512 BLOCK_INPUT; 3512 BLOCK_INPUT;
3513 3513
3514 /* Set machine name and pid for the purpose of window managers. */ 3514 /* Set machine name and pid for the purpose of window managers. */
3515 set_machine_and_pid_properties(f); 3515 set_machine_and_pid_properties(f);
3516 3516
@@ -5065,7 +5065,7 @@ Text larger than the specified size is clipped. */)
5065#ifdef USE_GTK 5065#ifdef USE_GTK
5066 if (x_gtk_use_system_tooltips) 5066 if (x_gtk_use_system_tooltips)
5067 { 5067 {
5068 int ok; 5068 int ok;
5069 5069
5070 /* Hide a previous tip, if any. */ 5070 /* Hide a previous tip, if any. */
5071 Fx_hide_tip (); 5071 Fx_hide_tip ();
@@ -6101,4 +6101,3 @@ When using Gtk+ tooltips, the tooltip face is not used. */);
6101} 6101}
6102 6102
6103#endif /* HAVE_X_WINDOWS */ 6103#endif /* HAVE_X_WINDOWS */
6104
diff --git a/src/xterm.h b/src/xterm.h
index 4f075be7fc0..4399d300834 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -270,8 +270,8 @@ struct x_display_info
270 Atom Xatom_Scrollbar; 270 Atom Xatom_Scrollbar;
271 271
272 /* Atom used in XEmbed client messages. */ 272 /* Atom used in XEmbed client messages. */
273 Atom Xatom_XEMBED, Xatom_XEMBED_INFO;; 273 Atom Xatom_XEMBED, Xatom_XEMBED_INFO;
274 274
275 /* The frame (if any) which has the X window that has keyboard focus. 275 /* The frame (if any) which has the X window that has keyboard focus.
276 Zero if none. This is examined by Ffocus_frame in xfns.c. Note 276 Zero if none. This is examined by Ffocus_frame in xfns.c. Note
277 that a mere EnterNotify event can set this; if you need to know the 277 that a mere EnterNotify event can set this; if you need to know the
@@ -1112,4 +1112,3 @@ extern Lisp_Object Qx_gtk_map_stock;
1112 (nr).y = (ry), \ 1112 (nr).y = (ry), \
1113 (nr).width = (rwidth), \ 1113 (nr).width = (rwidth), \
1114 (nr).height = (rheight)) 1114 (nr).height = (rheight))
1115