emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master dd2a846: Add workaround to compilation warning in gcc 10.x in ima


From: Lars Ingebrigtsen
Subject: master dd2a846: Add workaround to compilation warning in gcc 10.x in image.c
Date: Sun, 5 Dec 2021 17:29:59 -0500 (EST)

branch: master
commit dd2a8468904c2da57b4f1efe812c31742b4ff6aa
Author: dickmao <dick.r.chiang@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Add workaround to compilation warning in gcc 10.x in image.c
    
    * src/image.c (webp_load): Work around a (wrong) compiler warning
    in gcc 10.x (bug#52276).
---
 src/image.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/image.c b/src/image.c
index b85c405..709abc2 100644
--- a/src/image.c
+++ b/src/image.c
@@ -8970,7 +8970,7 @@ webp_load (struct frame *f, struct image *img)
 {
   ptrdiff_t size = 0;
   uint8_t *contents;
-  Lisp_Object file;
+  Lisp_Object file = Qnil;
 
   /* Open the WebP file.  */
   Lisp_Object specified_file = image_spec_value (img->spec, QCfile, NULL);
@@ -9007,7 +9007,7 @@ webp_load (struct frame *f, struct image *img)
   /* Validate the WebP image header.  */
   if (!WebPGetInfo (contents, size, NULL, NULL))
     {
-      if (NILP (specified_data))
+      if (! NILP (file))
        image_error ("Not a WebP file: `%s'", file);
       else
        image_error ("Invalid header in WebP image data");
@@ -9030,7 +9030,7 @@ webp_load (struct frame *f, struct image *img)
     case VP8_STATUS_USER_ABORT:
     default:
       /* Error out in all other cases.  */
-      if (NILP (specified_data))
+      if (! NILP (file))
        image_error ("Error when interpreting WebP image data: `%s'", file);
       else
        image_error ("Error when interpreting WebP image data");



reply via email to

[Prev in Thread] Current Thread [Next in Thread]