From 2e8d1ad0f206b3e1a8bd10f9def6679be5b4c086 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 6 Dec 2021 12:06:35 +0100 Subject: [PATCH] image.c: Remove some dead code * src/image.c (gui_put_x_image): Remove dead code, commented out since 2004. --- src/image.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/image.c b/src/image.c index 278446e37fc..65bf22b9814 100644 --- a/src/image.c +++ b/src/image.c @@ -3064,14 +3064,6 @@ gui_put_x_image (struct frame *f, Emacs_Pix_Container pimg, XFreeGC (FRAME_X_DISPLAY (f), gc); #endif /* HAVE_X_WINDOWS */ -#ifdef HAVE_NTGUI -#if 0 /* I don't think this is necessary looking at where it is used. */ - HDC hdc = get_frame_dc (f); - SetDIBits (hdc, pixmap, 0, height, pimg->data, &(pimg->info), DIB_RGB_COLORS); - release_frame_dc (f, hdc); -#endif -#endif /* HAVE_NTGUI */ - #ifdef HAVE_NS eassert (pimg == pixmap); ns_retain_object (pimg); @@ -10983,16 +10975,6 @@ x_kill_gs_process (Pixmap pixmap, struct frame *f) free_color_table (); #endif XDestroyImage (ximg); - -#if 0 /* This doesn't seem to be the case. If we free the colors - here, we get a BadAccess later in image_clear_image when - freeing the colors. */ - /* We have allocated colors once, but Ghostscript has also - allocated colors on behalf of us. So, to get the - reference counts right, free them once. */ - if (img->ncolors) - x_free_colors (f, img->colors, img->ncolors); -#endif } else image_error ("Cannot get X image of `%s'; colors will not be freed", -- 2.39.2