diff options
| author | YAMAMOTO Mitsuharu | 2006-04-12 08:05:52 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2006-04-12 08:05:52 +0000 |
| commit | 9db94f829695546baf4f7050d7d021b784254279 (patch) | |
| tree | 1f4fdf5dc5342412563dd1879de2284597e73d9a /src | |
| parent | 3df07ecd20349efc3dd612adcecce4716040bdac (diff) | |
| download | emacs-9db94f829695546baf4f7050d7d021b784254279.tar.gz emacs-9db94f829695546baf4f7050d7d021b784254279.zip | |
[MAC_OS] (xpm_load_image): Add parentheses around
assignment used as truth value. Add explicit braces to avoid
ambiguous `else'.
[MAC_OS] (gif_load): Remove unused variable `gcpro1'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/image.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/image.c b/src/image.c index 6f2e93a591a..91aa1198769 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -4379,7 +4379,7 @@ xpm_load_image (f, img, contents, end) | |||
| 4379 | if (color == NULL) | 4379 | if (color == NULL) |
| 4380 | goto failure; | 4380 | goto failure; |
| 4381 | 4381 | ||
| 4382 | while (str = strtok (NULL, " \t")) | 4382 | while ((str = strtok (NULL, " \t")) != NULL) |
| 4383 | { | 4383 | { |
| 4384 | next_key = xpm_str_to_color_key (str); | 4384 | next_key = xpm_str_to_color_key (str); |
| 4385 | if (next_key >= 0) | 4385 | if (next_key >= 0) |
| @@ -4407,17 +4407,21 @@ xpm_load_image (f, img, contents, end) | |||
| 4407 | Lisp_Object specified_color = Fassoc (symbol_color, color_symbols); | 4407 | Lisp_Object specified_color = Fassoc (symbol_color, color_symbols); |
| 4408 | 4408 | ||
| 4409 | if (CONSP (specified_color) && STRINGP (XCDR (specified_color))) | 4409 | if (CONSP (specified_color) && STRINGP (XCDR (specified_color))) |
| 4410 | if (xstricmp (SDATA (XCDR (specified_color)), "None") == 0) | 4410 | { |
| 4411 | color_val = Qt; | 4411 | if (xstricmp (SDATA (XCDR (specified_color)), "None") == 0) |
| 4412 | else if (x_defined_color (f, SDATA (XCDR (specified_color)), | 4412 | color_val = Qt; |
| 4413 | &cdef, 0)) | 4413 | else if (x_defined_color (f, SDATA (XCDR (specified_color)), |
| 4414 | color_val = make_number (cdef.pixel); | 4414 | &cdef, 0)) |
| 4415 | color_val = make_number (cdef.pixel); | ||
| 4416 | } | ||
| 4415 | } | 4417 | } |
| 4416 | if (NILP (color_val) && max_key > 0) | 4418 | if (NILP (color_val) && max_key > 0) |
| 4417 | if (xstricmp (max_color, "None") == 0) | 4419 | { |
| 4418 | color_val = Qt; | 4420 | if (xstricmp (max_color, "None") == 0) |
| 4419 | else if (x_defined_color (f, max_color, &cdef, 0)) | 4421 | color_val = Qt; |
| 4420 | color_val = make_number (cdef.pixel); | 4422 | else if (x_defined_color (f, max_color, &cdef, 0)) |
| 4423 | color_val = make_number (cdef.pixel); | ||
| 4424 | } | ||
| 4421 | if (!NILP (color_val)) | 4425 | if (!NILP (color_val)) |
| 4422 | (*put_color_table) (color_table, beg, chars_per_pixel, color_val); | 4426 | (*put_color_table) (color_table, beg, chars_per_pixel, color_val); |
| 4423 | 4427 | ||
| @@ -7846,7 +7850,6 @@ gif_load (f, img) | |||
| 7846 | int width, height; | 7850 | int width, height; |
| 7847 | XImagePtr ximg; | 7851 | XImagePtr ximg; |
| 7848 | TimeValue time; | 7852 | TimeValue time; |
| 7849 | struct gcpro gcpro1; | ||
| 7850 | int ino; | 7853 | int ino; |
| 7851 | CGrafPtr old_port; | 7854 | CGrafPtr old_port; |
| 7852 | GDHandle old_gdh; | 7855 | GDHandle old_gdh; |