emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#34106: closed (27.0.50; master build failed with M


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#34106: closed (27.0.50; master build failed with MSYS2/MinGW-w64)
Date: Wed, 16 Jan 2019 18:07:02 +0000

Your message dated Wed, 16 Jan 2019 20:06:01 +0200
with message-id <address@hidden>
and subject line Re: bug#34106: 27.0.50; master build failed with 
MSYS2/MinGW-w64
has caused the debbugs.gnu.org bug report #34106,
regarding 27.0.50; master build failed with MSYS2/MinGW-w64
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
34106: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34106
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 27.0.50; master build failed with MSYS2/MinGW-w64 Date: Thu, 17 Jan 2019 01:28:26 +0800 User-agent: Mutt/1.11.2 (2019-01-07)

When build master branch under MS-Windows I’m seeing this

 CC       pdumper.o
pdumper.c: In function 'dump_cold_bignum':
pdumper.c:3447:53: error: conversion from 'size_t' {aka 'long long unsigned 
int'} to 'mp_size_t' {aka 'long int'} may change value [-Werror=conversion]
      mp_limb_t limb = mpz_getlimbn (bignum->value, i);
cc1.exe: some warnings being treated as errors

Because with MSYS2/MinGW-w64 the `long' is 32-bit instead of 64-bit.

A explicit cast can fix it.

diff --git a/src/pdumper.c b/src/pdumper.c
index 3787408e6d..9d5ace6c38 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -3444,7 +3444,7 @@ dump_cold_bignum (struct dump_context *ctx, Lisp_Object 
object)
  Fputhash (object, descriptor, ctx->bignum_data);
  for (size_t i = 0; i < nlimbs; ++i)
    {
-      mp_limb_t limb = mpz_getlimbn (bignum->value, i);
+      mp_limb_t limb = mpz_getlimbn (bignum->value, (mp_size_t) i);
      dump_write (ctx, &limb, sizeof (limb));
    }
}

Thank you,

Chris



--- End Message ---
--- Begin Message --- Subject: Re: bug#34106: 27.0.50; master build failed with MSYS2/MinGW-w64 Date: Wed, 16 Jan 2019 20:06:01 +0200
> From: Andy Moreton <address@hidden>
> Date: Wed, 16 Jan 2019 17:44:10 +0000
> 
> The MSYS2/Mingw-w64 build also has a warning:
> 
> C:/emacs/git/emacs/master/src/emacs.c: In function 'load_pdump':
> C:/emacs/git/emacs/master/src/emacs.c:752:28: warning: field precision 
> specifier '.*' expects argument of type 'int', but argument 3 has type 
> 'size_t' {aka 'long long unsigned int'} [-Wformat=]
>      sprintf (dump_file, "%.*s%s", argv0_len - 4, argv[0], suffix);
>                           ~~^~     ~~~~~~~~~~~~~
> 
> The following patch fixes the warning, and fixes the bug above without
> needing a cast:

Thanks, pushed.


--- End Message ---

reply via email to

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