aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2012-06-27 19:46:48 +0400
committerDmitry Antipov2012-06-27 19:46:48 +0400
commit2014308a5dc2d82a136212e0eb7eeea61838bbe7 (patch)
tree28a50159789f64356a8cd47e0e371d92aa67a002 /src
parentd5c6faf921772e523fc224333d8af142c830a7e6 (diff)
downloademacs-2014308a5dc2d82a136212e0eb7eeea61838bbe7.tar.gz
emacs-2014308a5dc2d82a136212e0eb7eeea61838bbe7.zip
* alloc.c (allocate_string_data): Remove dead code.
* xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to avoid GCC warning about unused macro.
Diffstat (limited to 'src')
-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 75333b7160f..fc70a99a170 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
12012-06-27 Dmitry Antipov <dmantipov@yandex.ru> 12012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
2 2
3 * alloc.c (allocate_string_data): Remove dead code.
4 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
5 avoid GCC warning about unused macro.
6
72012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
8
3 * alloc.c (allocate_string): Omit intervals initialization. 9 * alloc.c (allocate_string): Omit intervals initialization.
4 * alloc.c (make_uninit_multibyte_string): Initialize intervals 10 * alloc.c (make_uninit_multibyte_string): Initialize intervals
5 as in make_pure_string and make_pure_c_string. 11 as in make_pure_string and make_pure_c_string.
diff --git a/src/alloc.c b/src/alloc.c
index a16e3a6d83f..17212f8d37d 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1991,9 +1991,9 @@ void
1991allocate_string_data (struct Lisp_String *s, 1991allocate_string_data (struct Lisp_String *s,
1992 EMACS_INT nchars, EMACS_INT nbytes) 1992 EMACS_INT nchars, EMACS_INT nbytes)
1993{ 1993{
1994 struct sdata *data, *old_data; 1994 struct sdata *data;
1995 struct sblock *b; 1995 struct sblock *b;
1996 ptrdiff_t needed, old_nbytes; 1996 ptrdiff_t needed;
1997 1997
1998 if (STRING_BYTES_MAX < nbytes) 1998 if (STRING_BYTES_MAX < nbytes)
1999 string_overflow (); 1999 string_overflow ();
@@ -2001,8 +2001,6 @@ allocate_string_data (struct Lisp_String *s,
2001 /* Determine the number of bytes needed to store NBYTES bytes 2001 /* Determine the number of bytes needed to store NBYTES bytes
2002 of string data. */ 2002 of string data. */
2003 needed = SDATA_SIZE (nbytes); 2003 needed = SDATA_SIZE (nbytes);
2004 old_data = s->data ? SDATA_OF_STRING (s) : NULL;
2005 old_nbytes = GC_STRING_BYTES (s);
2006 2004
2007 MALLOC_BLOCK_INPUT; 2005 MALLOC_BLOCK_INPUT;
2008 2006
@@ -2072,16 +2070,6 @@ allocate_string_data (struct Lisp_String *s,
2072 memcpy ((char *) data + needed, string_overrun_cookie, 2070 memcpy ((char *) data + needed, string_overrun_cookie,
2073 GC_STRING_OVERRUN_COOKIE_SIZE); 2071 GC_STRING_OVERRUN_COOKIE_SIZE);
2074#endif 2072#endif
2075
2076 /* If S had already data assigned, mark that as free by setting its
2077 string back-pointer to null, and recording the size of the data
2078 in it. */
2079 if (old_data)
2080 {
2081 SDATA_NBYTES (old_data) = old_nbytes;
2082 old_data->string = NULL;
2083 }
2084
2085 consing_since_gc += needed; 2073 consing_since_gc += needed;
2086} 2074}
2087 2075
diff --git a/src/xsettings.c b/src/xsettings.c
index 69ef22f55d7..a4e3849a652 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -159,8 +159,9 @@ store_tool_bar_style_changed (const char *newstyle,
159 XCAR (dpyinfo->name_list_element)); 159 XCAR (dpyinfo->name_list_element));
160} 160}
161 161
162 162#ifdef HAVE_XFT
163#define XSETTINGS_FONT_NAME "Gtk/FontName" 163#define XSETTINGS_FONT_NAME "Gtk/FontName"
164#endif
164#define XSETTINGS_TOOL_BAR_STYLE "Gtk/ToolbarStyle" 165#define XSETTINGS_TOOL_BAR_STYLE "Gtk/ToolbarStyle"
165 166
166enum { 167enum {