aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert <[email protected]>2011-03-11 00:20:11 -0800
committerPaul Eggert <[email protected]>2011-03-11 00:20:11 -0800
commit6ae141d682670b1d21abd86fd530cca016f73985 (patch)
treef0b5527191100f3c934db9ce9beb9e15e0c89302
parent2037898d7ada760ef84df072d05addf826710f65 (diff)
* image.c: (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
(jpeg_load, gif_load): Rename locals to avoid shadowing.
-rw-r--r--src/ChangeLog2
-rw-r--r--src/image.c36
2 files changed, 20 insertions, 18 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7170fcc162..c99d3626e0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -6,6 +6,8 @@
(x_edge_detection): Remove unnecessary cast that
gcc -Wbad-function-cast diagnoses.
(gif_load): Fix pointer signedness.
+ (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
+ (jpeg_load, gif_load): Rename locals to avoid shadowing.
2011-03-11 Paul Eggert <[email protected]>
diff --git a/src/image.c b/src/image.c
index 383e154b26..1f2a460953 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1557,9 +1557,9 @@ clear_image_cache (struct frame *f, Lisp_Object filter)
FOR_EACH_FRAME (tail, frame)
{
- struct frame *f = XFRAME (frame);
- if (FRAME_IMAGE_CACHE (f) == c)
- clear_current_matrices (f);
+ struct frame *fr = XFRAME (frame);
+ if (FRAME_IMAGE_CACHE (fr) == c)
+ clear_current_matrices (fr);
}
++windows_or_buffers_changed;
@@ -2651,11 +2651,11 @@ xbm_read_bitmap_data (struct frame *f, unsigned char *contents, unsigned char *e
if (LA1 == XBM_TK_NUMBER)
{
- char *p = strrchr (buffer, '_');
- p = p ? p + 1 : buffer;
- if (strcmp (p, "width") == 0)
+ char *q = strrchr (buffer, '_');
+ q = q ? q + 1 : buffer;
+ if (strcmp (q, "width") == 0)
*width = value;
- else if (strcmp (p, "height") == 0)
+ else if (strcmp (q, "height") == 0)
*height = value;
}
expect (XBM_TK_NUMBER);
@@ -4604,14 +4604,14 @@ x_detect_edges (struct frame *f, struct image *img, int *matrix, int color_adjus
for (x = 1; x < img->width - 1; ++x, ++p)
{
- int r, g, b, y1, x1;
+ int r, g, b, yy, xx;
r = g = b = i = 0;
- for (y1 = y - 1; y1 < y + 2; ++y1)
- for (x1 = x - 1; x1 < x + 2; ++x1, ++i)
+ for (yy = y - 1; yy < y + 2; ++yy)
+ for (xx = x - 1; xx < x + 2; ++xx, ++i)
if (matrix[i])
{
- XColor *t = COLOR (colors, x1, y1);
+ XColor *t = COLOR (colors, xx, yy);
r += matrix[i] * t->red;
g += matrix[i] * t->green;
b += matrix[i] * t->blue;
@@ -6364,10 +6364,10 @@ jpeg_load (struct frame *f, struct image *img)
if (rc == 1)
{
/* Called from my_error_exit. Display a JPEG error. */
- char buffer[JMSG_LENGTH_MAX];
- cinfo.err->format_message ((j_common_ptr) &cinfo, buffer);
+ char buf[JMSG_LENGTH_MAX];
+ cinfo.err->format_message ((j_common_ptr) &cinfo, buf);
image_error ("Error reading JPEG image `%s': %s", img->spec,
- build_string (buffer));
+ build_string (buf));
}
/* Close the input file and destroy the JPEG object. */
@@ -7300,9 +7300,9 @@ gif_load (struct frame *f, struct image *img)
for (x = 0; x < image_width; x++)
{
- int i = raster[(y * image_width) + x];
+ int c = raster[(y * image_width) + x];
XPutPixel (ximg, x + img->corners[LEFT_CORNER],
- row + img->corners[TOP_CORNER], pixel_colors[i]);
+ row + img->corners[TOP_CORNER], pixel_colors[c]);
}
row += interlace_increment[pass];
@@ -7313,9 +7313,9 @@ gif_load (struct frame *f, struct image *img)
for (y = 0; y < image_height; ++y)
for (x = 0; x < image_width; ++x)
{
- int i = raster[y * image_width + x];
+ int c = raster[y * image_width + x];
XPutPixel (ximg, x + img->corners[LEFT_CORNER],
- y + img->corners[TOP_CORNER], pixel_colors[i]);
+ y + img->corners[TOP_CORNER], pixel_colors[c]);
}
}