diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-08 23:28:40 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-08 23:28:40 -0700 |
commit | 5a9c433211c15e2538086321057ea04da8d6f9b9 (patch) | |
tree | 9ec0261e9364c394ea1657cd79e26ccd804f3d6f | |
parent | 2d43b8c9716af32033eb778d3fabb1a47dd44535 (diff) | |
download | emacs-5a9c433211c15e2538086321057ea04da8d6f9b9.tar.gz |
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.
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/chartab.c | 8 | ||||
-rw-r--r-- | src/composite.c | 1 | ||||
-rw-r--r-- | src/gtkutil.c | 1 |
4 files changed, 8 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3cf90d10289..a71a48f3a81 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 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. diff --git a/src/chartab.c b/src/chartab.c index e900a3ae71f..efe23eca83f 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -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; diff --git a/src/composite.c b/src/composite.c index cf1e053f027..d402d5ad0c4 100644 --- a/src/composite.c +++ b/src/composite.c @@ -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. */ diff --git a/src/gtkutil.c b/src/gtkutil.c index dfc5b63f375..35b366222de 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -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); |