Various changes to fix hiding of variables.
diff --git a/coders/cube.c b/coders/cube.c
index 9e3e016..198a65f 100644
--- a/coders/cube.c
+++ b/coders/cube.c
@@ -202,14 +202,14 @@
if (cube_level != 0)
{
char
- *q;
+ *r;
if (n >= (ssize_t) (cube_level*cube_level*cube_level))
break;
- q=buffer;
- cube[n].r=StringToDouble(q,&q);
- cube[n].g=StringToDouble(q,&q);
- cube[n].b=StringToDouble(q,&q);
+ r=buffer;
+ cube[n].r=StringToDouble(r,&r);
+ cube[n].g=StringToDouble(r,&r);
+ cube[n].b=StringToDouble(r,&r);
n++;
}
else
diff --git a/coders/dib.c b/coders/dib.c
index 80bb0aa..4fe1c31 100644
--- a/coders/dib.c
+++ b/coders/dib.c
@@ -932,12 +932,6 @@
*/
for (y=0; y < (ssize_t) image->rows; y++)
{
- register ssize_t
- x;
-
- register Quantum
- *magick_restrict q;
-
q=GetAuthenticPixels(image,0,y,image->columns,1,exception);
if (q == (Quantum *) NULL)
break;
diff --git a/coders/hdr.c b/coders/hdr.c
index 85c3081..a40744c 100644
--- a/coders/hdr.c
+++ b/coders/hdr.c
@@ -160,11 +160,7 @@
i,
x;
- register unsigned char
- *p;
-
ssize_t
- count,
y;
unsigned char
@@ -406,6 +402,9 @@
(void) memset(pixels,0,4*image->columns*sizeof(*pixels));
for (y=0; y < (ssize_t) image->rows; y++)
{
+ ssize_t
+ count;
+
if (image->compression != RLECompression)
{
count=ReadBlob(image,4*image->columns*sizeof(*pixels),pixels);
@@ -425,6 +424,9 @@
}
else
{
+ register unsigned char
+ *p;
+
p=pixels;
for (i=0; i < 4; i++)
{
diff --git a/coders/svg.c b/coders/svg.c
index 622e592..fab0120 100644
--- a/coders/svg.c
+++ b/coders/svg.c
@@ -924,21 +924,23 @@
if (LocaleCompare(keyword,"font") == 0)
{
char
- family[MagickPathExtent],
- size[MagickPathExtent],
- style[MagickPathExtent];
+ font_family[MagickPathExtent],
+ font_size[MagickPathExtent],
+ font_style[MagickPathExtent];
- if (sscanf(value,"%2048s %2048s %2048s",style,size,family) != 3)
+ if (sscanf(value,"%2048s %2048s %2048s",font_style,font_size,
+ font_family) != 3)
break;
- if (GetUserSpaceCoordinateValue(svg_info,0,style) == 0)
+ if (GetUserSpaceCoordinateValue(svg_info,0,font_style) == 0)
(void) FormatLocaleFile(svg_info->file,"font-style \"%s\"\n",
style);
else
- if (sscanf(value,"%2048s %2048s",size,family) != 2)
+ if (sscanf(value,"%2048s %2048s",font_size,font_family) != 2)
break;
- (void) FormatLocaleFile(svg_info->file,"font-size \"%s\"\n",size);
+ (void) FormatLocaleFile(svg_info->file,"font-size \"%s\"\n",
+ font_size);
(void) FormatLocaleFile(svg_info->file,"font-family \"%s\"\n",
- family);
+ font_family);
break;
}
if (LocaleCompare(keyword,"font-family") == 0)
@@ -1671,9 +1673,6 @@
{
if (LocaleCompare(keyword,"class") == 0)
{
- const char
- *p;
-
p=value;
(void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
@@ -1867,7 +1866,7 @@
{
if (LocaleCompare(keyword,"matrix") == 0)
{
- p=(const char *) value;
+ p=value;
(void) GetNextToken(p,&p,MagickPathExtent,token);
affine.sx=StringToDouble(value,(char **) NULL);
(void) GetNextToken(p,&p,MagickPathExtent,token);
@@ -1916,7 +1915,7 @@
{
if (LocaleCompare(keyword,"scale") == 0)
{
- for (p=(const char *) value; *p != '\0'; p++)
+ for (p=value; *p != '\0'; p++)
if ((isspace((int) ((unsigned char) *p)) != 0) ||
(*p == ','))
break;
@@ -1953,7 +1952,7 @@
{
if (LocaleCompare(keyword,"translate") == 0)
{
- for (p=(const char *) value; *p != '\0'; p++)
+ for (p=value; *p != '\0'; p++)
if ((isspace((int) ((unsigned char) *p)) != 0) ||
(*p == ','))
break;
@@ -2265,7 +2264,7 @@
{
if (LocaleCompare(keyword,"matrix") == 0)
{
- p=(const char *) value;
+ p=value;
(void) GetNextToken(p,&p,MagickPathExtent,token);
affine.sx=StringToDouble(value,(char **) NULL);
(void) GetNextToken(p,&p,MagickPathExtent,token);
@@ -2302,7 +2301,7 @@
x,
y;
- p=(const char *) value;
+ p=value;
(void) GetNextToken(p,&p,MagickPathExtent,token);
angle=StringToDouble(value,(char **) NULL);
affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
@@ -2334,7 +2333,7 @@
{
if (LocaleCompare(keyword,"scale") == 0)
{
- for (p=(const char *) value; *p != '\0'; p++)
+ for (p=value; *p != '\0'; p++)
if ((isspace((int) ((unsigned char) *p)) != 0) ||
(*p == ','))
break;
@@ -2371,7 +2370,7 @@
{
if (LocaleCompare(keyword,"translate") == 0)
{
- for (p=(const char *) value; *p != '\0'; p++)
+ for (p=value; *p != '\0'; p++)
if ((isspace((int) ((unsigned char) *p)) != 0) ||
(*p == ','))
break;
@@ -2416,7 +2415,7 @@
}
if (LocaleCompare(keyword,"viewBox") == 0)
{
- p=(const char *) value;
+ p=value;
(void) GetNextToken(p,&p,MagickPathExtent,token);
svg_info->view_box.x=StringToDouble(token,&next_token);
(void) GetNextToken(p,&p,MagickPathExtent,token);
@@ -5199,9 +5198,6 @@
}
case TextPrimitive:
{
- register char
- *p;
-
if (primitive_info[j].coordinates != 1)
{
status=MagickFalse;
@@ -5212,7 +5208,7 @@
" <text x=\"%g\" y=\"%g\">",primitive_info[j].point.x,
primitive_info[j].point.y);
(void) WriteBlobString(image,message);
- for (p=token; *p != '\0'; p++)
+ for (p=(const char *) token; *p != '\0'; p++)
switch (*p)
{
case '<': (void) WriteBlobString(image,"<"); break;
diff --git a/coders/viff.c b/coders/viff.c
index d3eb18a..29f557f 100644
--- a/coders/viff.c
+++ b/coders/viff.c
@@ -1190,10 +1190,6 @@
else
if (image->colors <= 2)
{
- ssize_t
- x,
- y;
-
register unsigned char
bit,
byte;
diff --git a/coders/xpm.c b/coders/xpm.c
index 8a5aa9c..9aaa0dd 100644
--- a/coders/xpm.c
+++ b/coders/xpm.c
@@ -480,9 +480,6 @@
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- ssize_t
- count;
-
count=CopyXPMColor(key,p,MagickMin(width,MagickPathExtent-1));
if (count != (ssize_t) width)
break;
diff --git a/coders/yuv.c b/coders/yuv.c
index 145f01b..0733f8d 100644
--- a/coders/yuv.c
+++ b/coders/yuv.c
@@ -109,9 +109,6 @@
MagickBooleanType
status;
- register const Quantum
- *chroma_pixels;
-
register ssize_t
x;
@@ -449,11 +446,14 @@
chroma_image=DestroyImage(chroma_image);
if (resize_image == (Image *) NULL)
{
- scanline=(unsigned char *) RelinquishMagickMemory(scanline);
+ scanline=(unsigned char *) RelinquishMagickMemory(scanline);
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
}
for (y=0; y < (ssize_t) image->rows; y++)
{
+ register const Quantum
+ *chroma_pixels;
+
q=GetAuthenticPixels(image,0,y,image->columns,1,exception);
chroma_pixels=GetVirtualPixels(resize_image,0,y,resize_image->columns,1,
exception);