# HG changeset patch # User Karoly Lorentey # Date 1079738344 0 # Node ID d4d5e54871ffa0bca58f2b7d83e62b7493728c1d # Parent 5f17f5c4015253a1647d85f75dcc96d8533f2b19 Trivial cleanups to get rid of GCC warnings. src/fontset.c (Fset_fontset_font): Removed unused variables. src/fringe.c (Ffringe_bitmaps_at_pos): Ditto. src/xdisp.c (Flookup_image_map, note_mode_line_or_margin_highlight): Ditto. src/xterm.c (x_detect_focus_change, x_calc_absolute_position): Ditto. src/intervals.h (compare_string_intervals): New declaration. src/intervals.h (NULL_INTERVAL_P): Shut up GCC warnings by casting the left side of the comma expression to void. src/lisp.h (CHECK): Ditto. src/keyboard.c (modify_event_symbol): Shut up GCC warning about format template type mismatch. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-120 diff -r 5f17f5c40152 -r d4d5e54871ff src/dispextern.h --- a/src/dispextern.h Fri Mar 19 22:32:48 2004 +0000 +++ b/src/dispextern.h Fri Mar 19 23:19:04 2004 +0000 @@ -2815,6 +2815,7 @@ extern void set_tty_color_mode P_ ((struct frame *, Lisp_Object)); extern void tty_setup_colors P_ ((struct tty_display_info *, int)); extern struct display *get_named_tty_display P_ ((char *)); +extern Lisp_Object Fframe_tty_type P_ ((Lisp_Object)); extern struct display *init_initial_display P_ ((void)); extern struct display *term_init P_ ((char *, char *, int)); extern void delete_tty P_ ((struct display *)); diff -r 5f17f5c40152 -r d4d5e54871ff src/fontset.c --- a/src/fontset.c Fri Mar 19 22:32:48 2004 +0000 +++ b/src/fontset.c Fri Mar 19 23:19:04 2004 +0000 @@ -1085,7 +1085,6 @@ Lisp_Object realized; int from, to; int id; - Lisp_Object family, registry; fontset = check_fontset_name (name); diff -r 5f17f5c40152 -r d4d5e54871ff src/intervals.h --- a/src/intervals.h Fri Mar 19 22:32:48 2004 +0000 +++ b/src/intervals.h Fri Mar 19 23:19:04 2004 +0000 @@ -85,7 +85,7 @@ || STRINGP ((Lisp_Object){(EMACS_INT)(i)})) #endif #define NULL_INTERVAL_P(i) \ - (CHECK (!INT_LISPLIKE (i), "non-interval"), (i) == NULL_INTERVAL) + ((void)CHECK (!INT_LISPLIKE (i), "non-interval"), (i) == NULL_INTERVAL) /* old #define NULL_INTERVAL_P(i) ((i) == NULL_INTERVAL || INT_LISPLIKE (i)) */ /* True if this interval has no right child. */ @@ -289,6 +289,7 @@ extern INLINE void copy_intervals_to_string P_ ((Lisp_Object, struct buffer *, int, int)); extern INTERVAL copy_intervals P_ ((INTERVAL, int, int)); +extern int compare_string_intervals P_ ((Lisp_Object s1, Lisp_Object s2)); extern Lisp_Object textget P_ ((Lisp_Object, Lisp_Object)); extern Lisp_Object lookup_char_property P_ ((Lisp_Object, Lisp_Object, int)); extern void move_if_not_intangible P_ ((int)); diff -r 5f17f5c40152 -r d4d5e54871ff src/keyboard.c --- a/src/keyboard.c Fri Mar 19 22:32:48 2004 +0000 +++ b/src/keyboard.c Fri Mar 19 23:19:04 2004 +0000 @@ -6248,10 +6248,10 @@ char *buf = (char *) alloca (len + 50); if (sizeof (int) == sizeof (EMACS_INT)) sprintf (buf, "%s-%d", SDATA (name_alist_or_stem), - XINT (symbol_int) + 1); + (int)XINT (symbol_int) + 1); else if (sizeof (long) == sizeof (EMACS_INT)) sprintf (buf, "%s-%ld", SDATA (name_alist_or_stem), - XINT (symbol_int) + 1); + (long)XINT (symbol_int) + 1); value = intern (buf); } else if (name_table != 0 && name_table[symbol_num]) diff -r 5f17f5c40152 -r d4d5e54871ff src/lisp.h --- a/src/lisp.h Fri Mar 19 22:32:48 2004 +0000 +++ b/src/lisp.h Fri Mar 19 23:19:04 2004 +0000 @@ -63,14 +63,14 @@ #ifdef ENABLE_CHECKING -#define CHECK(check,msg) (((check) || suppress_checking \ - ? (void) 0 \ - : die ((msg), __FILE__, __LINE__)), \ +#define CHECK(check,msg) ((void)((check) || suppress_checking \ + ? (void) 0 \ + : die ((msg), __FILE__, __LINE__)), \ 0) #else /* Produce same side effects and result, but don't complain. */ -#define CHECK(check,msg) ((check),0) +#define CHECK(check,msg) ((void)(check),0) #endif diff -r 5f17f5c40152 -r d4d5e54871ff src/xdisp.c --- a/src/xdisp.c Fri Mar 19 22:32:48 2004 +0000 +++ b/src/xdisp.c Fri Mar 19 23:19:04 2004 +0000 @@ -20213,7 +20213,6 @@ Lisp_Object map; Lisp_Object x, y; { - int ix, iy; if (NILP (map)) return Qnil; @@ -20279,7 +20278,7 @@ Lisp_Object pointer = Qnil; int charpos, dx, dy, width, height; Lisp_Object string, object = Qnil; - Lisp_Object pos, help, image; + Lisp_Object pos, help; if (area == ON_MODE_LINE || area == ON_HEADER_LINE) string = mode_line_string (w, area, &x, &y, &charpos, diff -r 5f17f5c40152 -r d4d5e54871ff src/xterm.c --- a/src/xterm.c Fri Mar 19 22:32:48 2004 +0000 +++ b/src/xterm.c Fri Mar 19 23:19:04 2004 +0000 @@ -3224,7 +3224,6 @@ struct input_event *bufp; { struct frame *frame; - int nr_events = 0; frame = x_any_window_to_frame (dpyinfo, event->xany.window); if (! frame) @@ -8148,7 +8147,6 @@ x_calc_absolute_position (f) struct frame *f; { - Window child; int win_x = 0, win_y = 0; int flags = f->size_hint_flags;