GNU bug report logs - #75451
scratch/igc: Enable CHECK_STRUCTS

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Thu, 9 Jan 2025 03:58:02 UTC

Severity: wishlist

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Pip Cet <pipcet <at> protonmail.com>, Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>, Gerd Moellmann <gerd <at> gnu.org>, 75451 <at> debbugs.gnu.org
Subject: bug#75451: scratch/igc: Enable CHECK_STRUCTS
Date: Mon, 20 Jan 2025 12:23:12 -0800
Pip Cet <pipcet <at> protonmail.com> writes:

> svg_css_length_to_pixels doesn't handle the RSVG_UNIT_CH case.  I don't
> know at which version rsvg started to offer this unit; it's not

It seems to have been added in 2.58:

https://gnome.pages.gitlab.gnome.org/librsvg/Rsvg-2.0/enum.Unit.html

I will create a new bug report to track this.

> indicated in the header file.  The default case:
>
>     default:
>       /* We should never reach this.  */
>       value = 0;
>
> contains an incorrect comment (the header file warns that the enum is
> incomplete and will be expanded), and incorrect code (0 is not a good
> default value, and we should warn or return an error).

We would have detected this bug sooner with the below patch, no?

diff --git a/src/image.c b/src/image.c
index b8405d81111..7fda2684460 100644
--- a/src/image.c
+++ b/src/image.c
@@ -12008,9 +12008,6 @@ svg_css_length_to_pixels (RsvgLength length,
double dpi, int font_size)
 	 what size we make the image.  */
       value = 0;
       break;
-    default:
-      /* We should never reach this.  */
-      value = 0;
     }

   return value;




This bug report was last modified 105 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.