From da5707e8ec8df0a8a9bb1a1f12c6b701314845cc Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 14 Aug 2013 08:27:32 +0400 Subject: [PATCH] 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. --- src/ChangeLog | 6 ++++++ src/image.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) 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; } -- 2.39.2