]> git.eshelyaron.com Git - emacs.git/commitdiff
* alloc.c (allocate_string_data): Remove dead code.
authorDmitry Antipov <dmantipov@yandex.ru>
Wed, 27 Jun 2012 15:46:48 +0000 (19:46 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Wed, 27 Jun 2012 15:46:48 +0000 (19:46 +0400)
* xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
avoid GCC warning about unused macro.

src/ChangeLog
src/alloc.c
src/xsettings.c

index 75333b7160f8c7c445f69af0ed411f22d34d832d..fc70a99a17041eeedbbcca3045e03c13d3b16011 100644 (file)
@@ -1,3 +1,9 @@
+2012-06-27  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * 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  <dmantipov@yandex.ru>
 
        * alloc.c (allocate_string): Omit intervals initialization.
index a16e3a6d83f6866027f465d3015a9c7085071a69..17212f8d37d45a1295d5d14c191a43c0ffed1988 100644 (file)
@@ -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;
 }
 
index 69ef22f55d76ddf5ada0b1688d196c69b455766f..a4e3849a6524dc7258dfdbd7de76151e286635bc 100644 (file)
@@ -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 {