Commit e22cffbc authored by Paul Eggert's avatar Paul Eggert
Browse files

* image.c (xpm_load): Redo to avoid "discards qualifiers" gcc warning.

parent d5d5a617
......@@ -2,6 +2,7 @@
 
* image.c (clear_image_cache): Now static.
(DIM, HAVE_STDLIB_H_1): Remove unused macros.
(xpm_load): Redo to avoid "discards qualifiers" gcc warning.
 
2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
 
......@@ -3425,11 +3425,12 @@ xpm_load (struct frame *f, struct image *img)
{
Lisp_Object name;
Lisp_Object color;
char *empty_string = (char *) "";
if (!CONSP (XCAR (tail)))
{
xpm_syms[i].name = "";
xpm_syms[i].value = "";
xpm_syms[i].name = empty_string;
xpm_syms[i].value = empty_string;
continue;
}
name = XCAR (XCAR (tail));
......@@ -3440,14 +3441,14 @@ xpm_load (struct frame *f, struct image *img)
strcpy (xpm_syms[i].name, SSDATA (name));
}
else
xpm_syms[i].name = "";
xpm_syms[i].name = empty_string;
if (STRINGP (color))
{
xpm_syms[i].value = (char *) alloca (SCHARS (color) + 1);
strcpy (xpm_syms[i].value, SSDATA (color));
}
else
xpm_syms[i].value = "";
xpm_syms[i].value = empty_string;
}
}
......
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