aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Antipov <[email protected]>2012-06-27 19:46:48 +0400
committerDmitry Antipov <[email protected]>2012-06-27 19:46:48 +0400
commit2014308a5dc2d82a136212e0eb7eeea61838bbe7 (patch)
tree28a50159789f64356a8cd47e0e371d92aa67a002
parentd5c6faf921772e523fc224333d8af142c830a7e6 (diff)
* alloc.c (allocate_string_data): Remove dead code.
* xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to avoid GCC warning about unused macro.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/alloc.c16
-rw-r--r--src/xsettings.c3
3 files changed, 10 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 75333b7160..fc70a99a17 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
2012-06-27 Dmitry Antipov <[email protected]>
+ * alloc.c (allocate_string_data): Remove dead code.
+ * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
+ avoid GCC warning about unused macro.
+
+2012-06-27 Dmitry Antipov <[email protected]>
+
* alloc.c (allocate_string): Omit intervals initialization.
* alloc.c (make_uninit_multibyte_string): Initialize intervals
as in make_pure_string and make_pure_c_string.
diff --git a/src/alloc.c b/src/alloc.c
index a16e3a6d83..17212f8d37 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1991,9 +1991,9 @@ void
allocate_string_data (struct Lisp_String *s,
EMACS_INT nchars, EMACS_INT nbytes)
{
- struct sdata *data, *old_data;
+ struct sdata *data;
struct sblock *b;
- ptrdiff_t needed, old_nbytes;
+ ptrdiff_t needed;
if (STRING_BYTES_MAX < nbytes)
string_overflow ();
@@ -2001,8 +2001,6 @@ allocate_string_data (struct Lisp_String *s,
/* Determine the number of bytes needed to store NBYTES bytes
of string data. */
needed = SDATA_SIZE (nbytes);
- old_data = s->data ? SDATA_OF_STRING (s) : NULL;
- old_nbytes = GC_STRING_BYTES (s);
MALLOC_BLOCK_INPUT;
@@ -2072,16 +2070,6 @@ allocate_string_data (struct Lisp_String *s,
memcpy ((char *) data + needed, string_overrun_cookie,
GC_STRING_OVERRUN_COOKIE_SIZE);
#endif
-
- /* If S had already data assigned, mark that as free by setting its
- string back-pointer to null, and recording the size of the data
- in it. */
- if (old_data)
- {
- SDATA_NBYTES (old_data) = old_nbytes;
- old_data->string = NULL;
- }
-
consing_since_gc += needed;
}
diff --git a/src/xsettings.c b/src/xsettings.c
index 69ef22f55d..a4e3849a65 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -159,8 +159,9 @@ store_tool_bar_style_changed (const char *newstyle,
XCAR (dpyinfo->name_list_element));
}
-
+#ifdef HAVE_XFT
#define XSETTINGS_FONT_NAME "Gtk/FontName"
+#endif
#define XSETTINGS_TOOL_BAR_STYLE "Gtk/ToolbarStyle"
enum {