From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mitchel Humpherys Newsgroups: gmane.emacs.devel Subject: [PATCH] * image.c: Fix compiler warning due to missing const Date: Wed, 9 Sep 2015 20:38:23 -0700 Message-ID: <1441856303-4171-1-git-send-email-mitch.special@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1441856357 9263 80.91.229.3 (10 Sep 2015 03:39:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Sep 2015 03:39:17 +0000 (UTC) Cc: Mitchel Humpherys To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 10 05:39:13 2015 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 1ZZshR-0003QX-N7 for ged-emacs-devel@m.gmane.org; Thu, 10 Sep 2015 05:39:01 +0200 Original-Received: from localhost ([::1]:46681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZshR-00047K-80 for ged-emacs-devel@m.gmane.org; Wed, 09 Sep 2015 23:39:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZshN-000472-RF for emacs-devel@gnu.org; Wed, 09 Sep 2015 23:38:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZshK-0006SI-Li for emacs-devel@gnu.org; Wed, 09 Sep 2015 23:38:57 -0400 Original-Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]:36731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZshK-0006Ru-Ez for emacs-devel@gnu.org; Wed, 09 Sep 2015 23:38:54 -0400 Original-Received: by padhk3 with SMTP id hk3so29228097pad.3 for ; Wed, 09 Sep 2015 20:38:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=XhlJzBPboTUgCd7Sr60P/N+QRYRgIcrkPEYJQ59nDN4=; b=vYeno0BH+WCtBxgvoyOXoYYIl0qE9m2RPyw6amEodWa+re903sg59KKMNRyhtYhscA o1KIq8GWc56XW6tUAFRqZU1fyAaOJPfROw8aYTRWDMoqObGchoxrBYm9I0RHiXEzG4sw XWQeL4VugKnTY85cibrwSqAqKEW3yHaKKO6ikU9yvu1d4mi1pgAkjBFT6kWdOyEQYZMD /frUhhUvJs+b3LW3fPqLXZ0igNKP2Y2uO6gqTYNBo51QcpvrJlU4PR9MQte1EnOGLy6a npRe/6NiMAcDsQmqFHCcgK4ZN9Oir4qyDHvH/oLbt1TbXVPKkKdRk/emPeLS2u4OFtBg xgMQ== X-Received: by 10.69.26.38 with SMTP id iv6mr78342570pbd.151.1441856333382; Wed, 09 Sep 2015 20:38:53 -0700 (PDT) Original-Received: from localhost.localdomain (ip72-199-214-50.sd.sd.cox.net. [72.199.214.50]) by smtp.gmail.com with ESMTPSA id gs2sm8869216pbc.15.2015.09.09.20.38.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Sep 2015 20:38:52 -0700 (PDT) X-Mailer: git-send-email 2.5.1 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::235 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:189788 Archived-At: The `GifErrorString' function from gif_lib has returned a `const char *' since gif_lib commit [95f5da16b9a134e5706d54e8725413625c3b745d: "Compiler waening cleanup."]. We currently store the return value in a `char *', which results in the following compiler warning: image.c: In function ‘gif_load’: image.c:7984:26: warning: initialization discards ‘const’ qualifier from \ pointer target type [-Wdiscarded-qualifiers] char *error_text = GifErrorString (gif_err); ^ Fix this. --- src/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/image.c b/src/image.c index 85cf801f6a..f9d0df7626 100644 --- a/src/image.c +++ b/src/image.c @@ -7981,7 +7981,7 @@ gif_load (struct frame *f, struct image *img) if (gif_close (gif, &gif_err) == GIF_ERROR) { #if 5 <= GIFLIB_MAJOR - char *error_text = GifErrorString (gif_err); + const char *error_text = GifErrorString (gif_err); if (error_text) image_error ("Error closing `%s': %s", -- 2.5.1