Squash vc98 warn 3

This commit is contained in:
cpq 2022-08-09 19:17:40 +01:00
parent e5585cb0e7
commit c8c0b8fb91
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;