Commit 5a9c4332 authored by Paul Eggert's avatar Paul Eggert

Fix minor problems found by static checking.

* chartab.c (char_table_set_range, map_sub_char_table)
(uniprop_table_uncompress): Remove unused locals.
(uniprop_table): Now static.
* composite.c (_work_char): Remove unused static var.
* gtkutil.c (qttip_cb): Remove stray no-effect statement.
parent 2d43b8c9
2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
Fix minor problems found by static checking.
* chartab.c (char_table_set_range, map_sub_char_table)
(uniprop_table_uncompress): Remove unused locals.
(uniprop_table): Now static.
* composite.c (_work_char): Remove unused static var.
* gtkutil.c (qttip_cb): Remove stray no-effect statement.
Use pthread_sigmask, not sigprocmask (Bug#9010).
sigprocmask is portable only for single-threaded applications, and
Emacs can be multi-threaded when it uses GTK.
......
......@@ -485,7 +485,6 @@ Lisp_Object
char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val)
{
struct Lisp_Char_Table *tbl = XCHAR_TABLE (table);
Lisp_Object *contents = tbl->contents;
if (from == to)
char_table_set (table, from, val);
......@@ -759,8 +758,6 @@ map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object),
Lisp_Object function, Lisp_Object table, Lisp_Object arg, Lisp_Object val,
Lisp_Object range, Lisp_Object top)
{
/* Pointer to the elements of TABLE. */
Lisp_Object *contents;
/* Depth of TABLE. */
int depth;
/* Minimum and maxinum characters covered by TABLE. */
......@@ -777,14 +774,12 @@ map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object),
struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
depth = XINT (tbl->depth);
contents = tbl->contents;
min_char = XINT (tbl->min_char);
max_char = min_char + chartab_chars[depth - 1] - 1;
}
else
{
depth = 0;
contents = XCHAR_TABLE (table)->contents;
min_char = 0;
max_char = MAX_CHAR;
}
......@@ -1143,7 +1138,6 @@ uniprop_table_uncompress (Lisp_Object table, int idx)
Lisp_Object sub = make_sub_char_table (3, min_char, Qnil);
struct Lisp_Sub_Char_Table *subtbl = XSUB_CHAR_TABLE (sub);
const unsigned char *p, *pend;
int i;
XSUB_CHAR_TABLE (table)->contents[idx] = sub;
p = SDATA (val), pend = p + SBYTES (val);
......@@ -1316,7 +1310,7 @@ uniprop_get_encoder (Lisp_Object table)
function may load a Lisp file and thus may cause
garbage-collection. */
Lisp_Object
static Lisp_Object
uniprop_table (Lisp_Object prop)
{
Lisp_Object val, table, result;
......
......@@ -967,7 +967,6 @@ autocmp_chars (Lisp_Object rule, EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT
}
static Lisp_Object _work_val;
static int _work_char;
/* 1 iff the character C is composable. Characters of general
category Z? or C? are not composable except for ZWNJ and ZWJ. */
......
......@@ -647,7 +647,6 @@ qttip_cb (GtkWidget *widget,
/* Change stupid Gtk+ default line wrapping. */
p = gtk_widget_get_parent (x->ttip_lbl);
list = gtk_container_get_children (GTK_CONTAINER (p));
iter;
for (iter = list; iter; iter = g_list_next (iter))
{
GtkWidget *w = GTK_WIDGET (iter->data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment