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: Fri, 22 Jan 2016 16:06:52 -0800 Organization: UCLA Computer Science Department Message-ID: <56A2C41C.7030401@cs.ucla.edu> References: <1453460084-19646-1-git-send-email-kuleshovmail@gmail.com> 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 1453507637 25919 80.91.229.3 (23 Jan 2016 00:07:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Jan 2016 00:07:17 +0000 (UTC) To: Alexander Kuleshov , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 23 01:07:11 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 1aMljO-0004KA-5A for ged-emacs-devel@m.gmane.org; Sat, 23 Jan 2016 01:07:06 +0100 Original-Received: from localhost ([::1]:55969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMljN-0001EF-9I for ged-emacs-devel@m.gmane.org; Fri, 22 Jan 2016 19:07:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMljJ-0001Ds-Qc for emacs-devel@gnu.org; Fri, 22 Jan 2016 19:07:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMljF-0000L3-Pq for emacs-devel@gnu.org; Fri, 22 Jan 2016 19:07:01 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:39191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMljF-0000Kw-Jz for emacs-devel@gnu.org; Fri, 22 Jan 2016 19:06:57 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7594A1607C4; Fri, 22 Jan 2016 16:06:56 -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 17PH0ClWV3pc; Fri, 22 Jan 2016 16:06:55 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C54A9160E62; Fri, 22 Jan 2016 16:06:55 -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 uKzC5Ej4FHWR; Fri, 22 Jan 2016 16:06:55 -0800 (PST) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id ACF351607C4; Fri, 22 Jan 2016 16:06:55 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 In-Reply-To: <1453460084-19646-1-git-send-email-kuleshovmail@gmail.com> 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:198606 Archived-At: On 01/22/2016 02:54 AM, Alexander Kuleshov wrote: > @@ -4615,16 +4622,15 @@ colors_in_color_table (int *n) > static unsigned long > lookup_rgb_color (struct frame *f, int r, int g, int b) > { > - unsigned long pixel; > - > #ifdef HAVE_NTGUI > - pixel = PALETTERGB (r >> 8, g >> 8, b >> 8); > + return PALETTERGB (r >> 8, g >> 8, b >> 8); > #endif /* HAVE_NTGUI */ > > #ifdef HAVE_NS > - pixel = RGB_TO_ULONG (r >> 8, g >> 8, b >> 8); > + return RGB_TO_ULONG (r >> 8, g >> 8, b >> 8); > #endif /* HAVE_NS */ > - return pixel; > + > + return 0; > } Does this change cause lookup_rgb_color to always return 0 on platforms other than MS-Windows and NextStep? Is this the right thing to do? This part of the change isn't mentioned in the draft ChangeLog entry, so I'm a bit lost as to the motivation.