Trivial cleanups to get rid of GCC warnings.
authorKaroly Lorentey <lorentey@elte.hu>
Fri, 19 Mar 2004 23:19:04 +0000 (23:19 +0000)
committerKaroly Lorentey <lorentey@elte.hu>
Fri, 19 Mar 2004 23:19:04 +0000 (23:19 +0000)
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

src/dispextern.h
src/fontset.c
src/intervals.h
src/keyboard.c
src/lisp.h
src/xdisp.c
src/xterm.c

index 63c8811..96e89a4 100644 (file)
@@ -2815,6 +2815,7 @@ extern void calculate_costs P_ ((struct frame *));
 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 *));
index 61e05b6..ad9dd3c 100644 (file)
@@ -1085,7 +1085,6 @@ name of a font, REGISTRY is a registry name of a font.  */)
   Lisp_Object realized;
   int from, to;
   int id;
-  Lisp_Object family, registry;
 
   fontset = check_fontset_name (name);
 
index 060731b..15e5953 100644 (file)
@@ -85,7 +85,7 @@ struct interval
                         || 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 INTERVAL balance_intervals P_ ((INTERVAL));
 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));
index a6a30d3..dc9bcd7 100644 (file)
@@ -6248,10 +6248,10 @@ modify_event_symbol (symbol_num, modifiers, symbol_kind, name_alist_or_stem,
          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])
index 3b4a110..cd87307 100644 (file)
@@ -63,14 +63,14 @@ extern void die P_((const char *, const char *, int));
 
 #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
 
index 749739a..796c7d0 100644 (file)
@@ -20213,7 +20213,6 @@ Returns the alist element for the first matching AREA in MAP.  */)
      Lisp_Object map;
      Lisp_Object x, y;
 {
-  int ix, iy;
   if (NILP (map))
     return Qnil;
 
@@ -20279,7 +20278,7 @@ note_mode_line_or_margin_highlight (w, x, y, area)
   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,
index feefdf2..86feb9c 100644 (file)
@@ -3224,7 +3224,6 @@ x_detect_focus_change (dpyinfo, event, bufp)
      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 @@ void
 x_calc_absolute_position (f)
      struct frame *f;
 {
-  Window child;
   int win_x = 0, win_y = 0;
   int flags = f->size_hint_flags;