From: Stefan Kangas Date: Mon, 6 Dec 2021 11:06:35 +0000 (+0100) Subject: image.c: Remove some dead code X-Git-Tag: emacs-29.0.90~3611^2~16 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2e8d1ad0f206b3e1a8bd10f9def6679be5b4c086;p=emacs.git image.c: Remove some dead code * src/image.c (gui_put_x_image): Remove dead code, commented out since 2004. --- 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",