Commit 82364cfe2 for imagemagick.org
commit 82364cfe2e77ca431352f5f948641409e48f6722
Author: Cristy <urban-warrior@imagemagick.org>
Date: Mon Jun 22 07:03:23 2026 -0400
eliminate compiler warning
diff --git a/MagickCore/fx.c b/MagickCore/fx.c
index 329527377..0fbf1d82b 100644
--- a/MagickCore/fx.c
+++ b/MagickCore/fx.c
@@ -890,6 +890,8 @@ static char *SetPtrShortExp(FxInfo *pfx, const char *pExp, size_t len)
if (pExp && len)
{
+ char *p;
+
/* Clamp to buffer size - 1 */
copy_len = len;
if (copy_len > dst_size - 1)
@@ -913,7 +915,6 @@ static char *SetPtrShortExp(FxInfo *pfx, const char *pExp, size_t len)
}
/* Replace newline / carriage return safely */
- char *p;
if ((p = strchr(dst, '\n')) != NULL ||
(p = strchr(dst, '\r')) != NULL)