From: Dmitry Antipov Date: Wed, 14 Aug 2013 04:27:32 +0000 (+0400) Subject: Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1686^2~260 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=da5707e8ec8df0a8a9bb1a1f12c6b701314845cc;p=emacs.git Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit. * image.c (imagemagick_filename_hint): Use `const char *' and prefer SSDATA to SDATA to avoid warnings. --- diff --git a/src/ChangeLog b/src/ChangeLog index af088340e3b..cf73204c55c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-08-14 Dmitry Antipov + + Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit. + * image.c (imagemagick_filename_hint): Use `const char *' and + prefer SSDATA to SDATA to avoid warnings. + 2013-08-14 Dmitry Antipov Cleanup window fringes, margins and scroll bars adjustments. diff --git a/src/image.c b/src/image.c index e767d5447d1..99bb9d8c135 100644 --- a/src/image.c +++ b/src/image.c @@ -7851,9 +7851,9 @@ static char* imagemagick_filename_hint (Lisp_Object spec) { Lisp_Object format = image_spec_value (spec, intern (":format"), NULL); - Lisp_Object symbol = intern ("image-format-suffixes"); - Lisp_Object val; - char *name, *prefix = "/tmp/foo."; + Lisp_Object val, symbol = intern ("image-format-suffixes"); + const char *prefix = "/tmp/foo."; + char *name; if (NILP (Fboundp (symbol))) return NULL; @@ -7871,8 +7871,8 @@ imagemagick_filename_hint (Lisp_Object spec) return NULL; name = xmalloc (strlen (prefix) + SBYTES (val) + 1); - strcpy(name, prefix); - strcat(name, SDATA (val)); + strcpy (name, prefix); + strcat (name, SSDATA (val)); return name; }