From c8c0b8fb919bf024527b01b5921748183c7ea39f Mon Sep 17 00:00:00 2001 From: cpq Date: Tue, 9 Aug 2022 19:17:40 +0100 Subject: [PATCH] Squash vc98 warn 3 --- mongoose.c | 2 +- src/sntp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mongoose.c b/mongoose.c index 10beca39..4a0c9f68 100644 --- a/mongoose.c +++ b/mongoose.c @@ -3967,7 +3967,7 @@ void mg_sntp_request(struct mg_connection *c) { if (c->is_resolving) { MG_ERROR(("%lu wait until resolved", c->id)); } else { - uint64_t now = mg_millis(); + int64_t now = (int64_t) mg_millis(); // Use int64_t, for vc98 uint8_t buf[48] = {0}; uint32_t *t = (uint32_t *) &buf[40]; double frac = ((double) (now % 1000)) / 1000.0 * SNTP_MAX_FRAC; diff --git a/src/sntp.c b/src/sntp.c index a352622c..32195d35 100644 --- a/src/sntp.c +++ b/src/sntp.c @@ -59,7 +59,7 @@ void mg_sntp_request(struct mg_connection *c) { if (c->is_resolving) { MG_ERROR(("%lu wait until resolved", c->id)); } else { - uint64_t now = mg_millis(); + int64_t now = (int64_t) mg_millis(); // Use int64_t, for vc98 uint8_t buf[48] = {0}; uint32_t *t = (uint32_t *) &buf[40]; double frac = ((double) (now % 1000)) / 1000.0 * SNTP_MAX_FRAC;