all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#34106: 27.0.50; master build failed with MSYS2/MinGW-w64
@ 2019-01-16 17:28 Chris Zheng
  2019-01-16 17:44 ` Andy Moreton
       [not found] ` <handler.34106.D34106.15476619845997.notifdone@debbugs.gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Zheng @ 2019-01-16 17:28 UTC (permalink / raw)
  To: 34106


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





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

end of thread, other threads:[~2019-01-17  5:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-16 17:28 bug#34106: 27.0.50; master build failed with MSYS2/MinGW-w64 Chris Zheng
2019-01-16 17:44 ` Andy Moreton
2019-01-16 18:06   ` Eli Zaretskii
     [not found] ` <handler.34106.D34106.15476619845997.notifdone@debbugs.gnu.org>
2019-01-17  5:54   ` Chris Zheng

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.