From 8bf51c380acc04f25fba8f8aa3d1cc08b45f3e69 Mon Sep 17 00:00:00 2001 From: Andy Moreton Date: Wed, 16 Jan 2019 17:44:10 +0000 Subject: [PATCH] Avoid compilation warnings in MS-Windows build * src/pdumper.c (dump_cold_bignum): * src/emacs.c(load_pdump) [WINDOWSNT]: Avoid compiler warnings due to 64-bit vs 32-bit data type mismatches. --- src/emacs.c | 2 +- src/pdumper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index c1133f2460a..834f55b6f32 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -749,7 +749,7 @@ load_pdump (int argc, char **argv) /* Remove the .exe extension if present. */ argv0_len = strlen (argv[0]); if (argv0_len >= 4 && c_strcasecmp (argv[0] + argv0_len - 4, ".exe") == 0) - sprintf (dump_file, "%.*s%s", argv0_len - 4, argv[0], suffix); + sprintf (dump_file, "%.*s%s", (int)(argv0_len - 4), argv[0], suffix); else #endif sprintf (dump_file, "%s%s", argv[0], suffix); diff --git a/src/pdumper.c b/src/pdumper.c index 3787408e6da..db66e1ba26b 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -3442,7 +3442,7 @@ dump_cold_bignum (struct dump_context *ctx, Lisp_Object object) dump_off_to_lisp ((mpz_sgn (bignum->value) < 0 ? -nlimbs : nlimbs))); Fputhash (object, descriptor, ctx->bignum_data); - for (size_t i = 0; i < nlimbs; ++i) + for (mp_size_t i = 0; i < nlimbs; ++i) { mp_limb_t limb = mpz_getlimbn (bignum->value, i); dump_write (ctx, &limb, sizeof (limb)); -- 2.39.5