unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 3de31e7: Fix compilation of image.c on MS-Windows
       [not found] ` <20201109153654.3EADA20A27@vcs0.savannah.gnu.org>
@ 2020-11-09 16:04   ` Lars Ingebrigtsen
  2020-11-09 16:20     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-09 16:04 UTC (permalink / raw)
  To: emacs-devel; +Cc: Eli Zaretskii

eliz@gnu.org (Eli Zaretskii) writes:

>     Fix compilation of image.c on MS-Windows
>
>     This is a followup to last change in image.c.
>     * src/image.c (rsvg_handle_get_intrinsic_dimensions): Define to
>     call fn_rsvg_handle_get_intrinsic_dimensions.
>     (svg_css_length_to_pixels): Compile only for librsvg >= 2.46.0, as
>     RsvgLength type was not defined before.

This leads to the following warnings on Debian bullseye, apparently:

image.c: In function ‘svg_css_length_to_pixels’:
image.c:9769:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
 9769 |       value = dpi * value / 2.54;
      |       ~~~~~~^~~~~~~~~~~~~~~~~~~~
image.c:9770:5: note: here
 9770 |     case RSVG_UNIT_MM:
      |     ^~~~
image.c:9776:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
 9776 |       value = dpi * value / 72;
      |       ~~~~~~^~~~~~~~~~~~~~~~~~
image.c:9777:5: note: here
 9777 |     case RSVG_UNIT_PC:
      |     ^~~~
image.c:9779:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
 9779 |       value = dpi * value / 6;
      |       ~~~~~~^~~~~~~~~~~~~~~~~
image.c:9780:5: note: here
 9780 |     case RSVG_UNIT_IN:
      |     ^~~~


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master 3de31e7: Fix compilation of image.c on MS-Windows
  2020-11-09 16:04   ` master 3de31e7: Fix compilation of image.c on MS-Windows Lars Ingebrigtsen
@ 2020-11-09 16:20     ` Eli Zaretskii
  2020-11-09 16:28       ` Alan Third
  2020-11-09 23:44       ` Andy Moreton
  0 siblings, 2 replies; 5+ messages in thread
From: Eli Zaretskii @ 2020-11-09 16:20 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Alan Third; +Cc: emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Eli Zaretskii <eliz@gnu.org>
> Date: Mon, 09 Nov 2020 17:04:29 +0100
> 
> eliz@gnu.org (Eli Zaretskii) writes:
> 
> >     Fix compilation of image.c on MS-Windows
> >
> >     This is a followup to last change in image.c.
> >     * src/image.c (rsvg_handle_get_intrinsic_dimensions): Define to
> >     call fn_rsvg_handle_get_intrinsic_dimensions.
> >     (svg_css_length_to_pixels): Compile only for librsvg >= 2.46.0, as
> >     RsvgLength type was not defined before.
> 
> This leads to the following warnings on Debian bullseye, apparently:
> 
> image.c: In function ‘svg_css_length_to_pixels’:
> image.c:9769:13: warning: this statement may fall through [-Wimplicit-fallthrough=]

Surely, not my change led to this: I only made that code be
conditionally compiled.

Alan, can you take a look, please?  Di d you mean for the control flow
to fall-though in these places?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master 3de31e7: Fix compilation of image.c on MS-Windows
  2020-11-09 16:20     ` Eli Zaretskii
@ 2020-11-09 16:28       ` Alan Third
  2020-11-09 23:44       ` Andy Moreton
  1 sibling, 0 replies; 5+ messages in thread
From: Alan Third @ 2020-11-09 16:28 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, emacs-devel

On Mon, Nov 09, 2020 at 06:20:05PM +0200, Eli Zaretskii wrote:
> > From: Lars Ingebrigtsen <larsi@gnus.org>
> > Cc: Eli Zaretskii <eliz@gnu.org>
> > Date: Mon, 09 Nov 2020 17:04:29 +0100
> > 
> > eliz@gnu.org (Eli Zaretskii) writes:
> > 
> > >     Fix compilation of image.c on MS-Windows
> > >
> > >     This is a followup to last change in image.c.
> > >     * src/image.c (rsvg_handle_get_intrinsic_dimensions): Define to
> > >     call fn_rsvg_handle_get_intrinsic_dimensions.
> > >     (svg_css_length_to_pixels): Compile only for librsvg >= 2.46.0, as
> > >     RsvgLength type was not defined before.
> > 
> > This leads to the following warnings on Debian bullseye, apparently:
> > 
> > image.c: In function ‘svg_css_length_to_pixels’:
> > image.c:9769:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
> 
> Surely, not my change led to this: I only made that code be
> conditionally compiled.
> 
> Alan, can you take a look, please?  Di d you mean for the control flow
> to fall-though in these places?

My mistake. I've pushed a fix.

Thanks.

-- 
Alan Third



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master 3de31e7: Fix compilation of image.c on MS-Windows
  2020-11-09 16:20     ` Eli Zaretskii
  2020-11-09 16:28       ` Alan Third
@ 2020-11-09 23:44       ` Andy Moreton
  2020-11-10 15:13         ` Eli Zaretskii
  1 sibling, 1 reply; 5+ messages in thread
From: Andy Moreton @ 2020-11-09 23:44 UTC (permalink / raw)
  To: emacs-devel

On Mon 09 Nov 2020, Eli Zaretskii wrote:

>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Cc: Eli Zaretskii <eliz@gnu.org>
>> Date: Mon, 09 Nov 2020 17:04:29 +0100
>> 
>> eliz@gnu.org (Eli Zaretskii) writes:
>> 
>> >     Fix compilation of image.c on MS-Windows
>> >
>> >     This is a followup to last change in image.c.
>> >     * src/image.c (rsvg_handle_get_intrinsic_dimensions): Define to
>> >     call fn_rsvg_handle_get_intrinsic_dimensions.
>> >     (svg_css_length_to_pixels): Compile only for librsvg >= 2.46.0, as
>> >     RsvgLength type was not defined before.
>> 
>> This leads to the following warnings on Debian bullseye, apparently:
>> 
>> image.c: In function ‘svg_css_length_to_pixels’:
>> image.c:9769:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
>
> Surely, not my change led to this: I only made that code be
> conditionally compiled.

True, but your change does not compile on Windows. In image.c:

#  if LIBRSVG_CHECK_VERSION (2, 46, 0)
DEF_DLL_FN (void, rsvg_handle_get_intrinsic_dimensions,
            RsvgHandle *, gboolean *, RsvgLength *, gboolean *,
            RsvgLength *, gboolean *, RsvgRectangle *));

The 3rd argument should start with a left paren.

    AndyM




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: master 3de31e7: Fix compilation of image.c on MS-Windows
  2020-11-09 23:44       ` Andy Moreton
@ 2020-11-10 15:13         ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2020-11-10 15:13 UTC (permalink / raw)
  To: Andy Moreton; +Cc: emacs-devel

> From: Andy Moreton <andrewjmoreton@gmail.com>
> Date: Mon, 09 Nov 2020 23:44:22 +0000
> 
> #  if LIBRSVG_CHECK_VERSION (2, 46, 0)
> DEF_DLL_FN (void, rsvg_handle_get_intrinsic_dimensions,
>             RsvgHandle *, gboolean *, RsvgLength *, gboolean *,
>             RsvgLength *, gboolean *, RsvgRectangle *));
> 
> The 3rd argument should start with a left paren.

Right, fixed.  Thanks.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-10 15:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20201109153652.21064.52372@vcs0.savannah.gnu.org>
     [not found] ` <20201109153654.3EADA20A27@vcs0.savannah.gnu.org>
2020-11-09 16:04   ` master 3de31e7: Fix compilation of image.c on MS-Windows Lars Ingebrigtsen
2020-11-09 16:20     ` Eli Zaretskii
2020-11-09 16:28       ` Alan Third
2020-11-09 23:44       ` Andy Moreton
2020-11-10 15:13         ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).