From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Fix compilation erorr when --enable-gcc-warnings passed Date: Sat, 23 Jan 2016 01:08:08 -0800 Organization: UCLA Computer Science Department Message-ID: <56A342F8.1080303@cs.ucla.edu> References: <1453460084-19646-1-git-send-email-kuleshovmail@gmail.com> <56A2C41C.7030401@cs.ucla.edu> <20160123062857.GA1205@localhost> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1453540117 8126 80.91.229.3 (23 Jan 2016 09:08:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Jan 2016 09:08:37 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alexander Kuleshov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 23 10:08:28 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aMuBI-0005sX-D8 for ged-emacs-devel@m.gmane.org; Sat, 23 Jan 2016 10:08:28 +0100 Original-Received: from localhost ([::1]:56615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMuBH-000476-KQ for ged-emacs-devel@m.gmane.org; Sat, 23 Jan 2016 04:08:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMuB5-000452-H3 for emacs-devel@gnu.org; Sat, 23 Jan 2016 04:08:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMuB2-0002mb-BP for emacs-devel@gnu.org; Sat, 23 Jan 2016 04:08:15 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:54024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMuB2-0002mU-5U for emacs-devel@gnu.org; Sat, 23 Jan 2016 04:08:12 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id F3137160E73; Sat, 23 Jan 2016 01:08:09 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id yCG_7uUSKszP; Sat, 23 Jan 2016 01:08:08 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BA571160E74; Sat, 23 Jan 2016 01:08:08 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id rGJLHfJRm3kT; Sat, 23 Jan 2016 01:08:08 -0800 (PST) Original-Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 96076160E73; Sat, 23 Jan 2016 01:08:08 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: <20160123062857.GA1205@localhost> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198623 Archived-At: Alexander Kuleshov wrote: > And seems that this version of the lookup_rgb_color() is only for these platforms, because I see that the src/image.c contains yet another implementation of the lookup_rgb_color() for platforms where COLOR_TABLE_SUPPORT is enabled. Although there are two lookup_rgb_color implementations, the buggy one is invoked if USE_CAIRO, and this generates garbage on the screen. I have filed a bug report; see: http://bugs.gnu.org/22442 I installed a patch into emacs-25 to replace the compile-time warning with a run-time crash, if you configure --with-cairo --enable-checking and visit a .png file. This patch should also fix the other warnings you noticed, albeit in different ways sometimes. Thanks for doing this checking! It found a real bug.