From: Paul Eggert Date: Fri, 1 Apr 2011 17:41:46 +0000 (-0700) Subject: * xfaces.c (realize_named_face): Remove vars that are set but not used. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~394^2~70 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a5a62657a2875e5f89e4aefd93df4023277426f6;p=emacs.git * xfaces.c (realize_named_face): Remove vars that are set but not used. (map_tty_color) [!defined MSDOS]: Likewise. --- diff --git a/src/ChangeLog b/src/ChangeLog index 30a45692ea6..9c1b17f8996 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-04-01 Paul Eggert + * xfaces.c (realize_named_face): Remove vars that are set but not used. + (map_tty_color) [!defined MSDOS]: Likewise. + * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning. * coding.c: Remove vars that are set but not used. diff --git a/src/xfaces.c b/src/xfaces.c index 0fc5dd6f8a3..8a64855bd8f 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -5444,7 +5444,6 @@ realize_named_face (struct frame *f, Lisp_Object symbol, int id) Lisp_Object lface = lface_from_face_name (f, symbol, 0); Lisp_Object attrs[LFACE_VECTOR_SIZE]; Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE]; - struct face *new_face; /* The default face must exist and be fully specified. */ get_lface_attributes_no_remap (f, Qdefault, attrs, 1); @@ -5464,7 +5463,7 @@ realize_named_face (struct frame *f, Lisp_Object symbol, int id) merge_face_vectors (f, symbol_attrs, attrs, 0); /* Realize the face. */ - new_face = realize_face (c, attrs, id); + realize_face (c, attrs, id); } @@ -5761,21 +5760,16 @@ map_tty_color (struct frame *f, struct face *face, enum lface_attribute_index id { Lisp_Object frame, color, def; int foreground_p = idx == LFACE_FOREGROUND_INDEX; - unsigned long default_pixel, default_other_pixel, pixel; + unsigned long default_pixel = + foreground_p ? FACE_TTY_DEFAULT_FG_COLOR : FACE_TTY_DEFAULT_BG_COLOR; + unsigned long pixel = default_pixel; +#ifdef MSDOS + unsigned long default_other_pixel = + foreground_p ? FACE_TTY_DEFAULT_BG_COLOR : FACE_TTY_DEFAULT_FG_COLOR; +#endif xassert (idx == LFACE_FOREGROUND_INDEX || idx == LFACE_BACKGROUND_INDEX); - if (foreground_p) - { - pixel = default_pixel = FACE_TTY_DEFAULT_FG_COLOR; - default_other_pixel = FACE_TTY_DEFAULT_BG_COLOR; - } - else - { - pixel = default_pixel = FACE_TTY_DEFAULT_BG_COLOR; - default_other_pixel = FACE_TTY_DEFAULT_FG_COLOR; - } - XSETFRAME (frame, f); color = face->lface[idx];