fix for C89

This commit is contained in:
Sergio R. Caprile committed 2026-11-30 10:47:05 -03:00
1 parent 63d8bb7324
commit 0ad47a461b
3 files changed
+6 -6

No files matched your search

+3 -3
View File
@@ -30177,7 +30177,7 @@ static void mg_ws_cb(struct mg_connection *c, int ev, void *ev_data) {
struct mg_ws_message m; struct mg_ws_message m;
size_t len; size_t len;
uint8_t final, op; uint8_t final, op;
if (msk == c->is_client) { if (msk == (bool) c->is_client) {
mg_error(c, c->is_client ? "masked WS server frame" mg_error(c, c->is_client ? "masked WS server frame"
: "unmasked WS client frame"); : "unmasked WS client frame");
return; return;
@@ -34636,7 +34636,7 @@ static int mgi_radio_data_receive(struct mg_radio_node *node,
"past deadline", "past deadline",
node->lan == NULL ? "Node" : "Bridge", index, last, node->lan == NULL ? "Node" : "Bridge", index, last,
(unsigned) node->rx_expected >> 4, node->rx_expected & 15U, (unsigned) node->rx_expected >> 4, node->rx_expected & 15U,
(unsigned) chunk, (long long) (now - node->deadline))); (unsigned) chunk, (int64_t) (now - node->deadline)));
node->rx_expected = 0xff; node->rx_expected = 0xff;
return -1; return -1;
} }
@@ -34739,7 +34739,7 @@ static void mgi_radio_bridge_rx(uint64_t now, struct mg_radio_node *b,
"turn of %04x, %lld us past deadline", "turn of %04x, %lld us past deadline",
frame[MGI_FRAME_HDR_LEN - 1] >> 4U, frame[MGI_FRAME_HDR_LEN - 1] & 15U, frame[MGI_FRAME_HDR_LEN - 1] >> 4U, frame[MGI_FRAME_HDR_LEN - 1] & 15U,
src, b->phase, b->current == NULL ? 0 : b->current->radio_address, src, b->phase, b->current == NULL ? 0 : b->current->radio_address,
(long long) (now - b->deadline))); (int64_t) (now - b->deadline)));
return; return;
} }
if (len != MGI_JOIN_UP_LEN || command != MGI_JOIN_UP || if (len != MGI_JOIN_UP_LEN || command != MGI_JOIN_UP ||
+2 -2
View File
@@ -327,7 +327,7 @@ static int mgi_radio_data_receive(struct mg_radio_node *node,
"past deadline", "past deadline",
node->lan == NULL ? "Node" : "Bridge", index, last, node->lan == NULL ? "Node" : "Bridge", index, last,
(unsigned) node->rx_expected >> 4, node->rx_expected & 15U, (unsigned) node->rx_expected >> 4, node->rx_expected & 15U,
(unsigned) chunk, (long long) (now - node->deadline))); (unsigned) chunk, (int64_t) (now - node->deadline)));
node->rx_expected = 0xff; node->rx_expected = 0xff;
return -1; return -1;
} }
@@ -430,7 +430,7 @@ static void mgi_radio_bridge_rx(uint64_t now, struct mg_radio_node *b,
"turn of %04x, %lld us past deadline", "turn of %04x, %lld us past deadline",
frame[MGI_FRAME_HDR_LEN - 1] >> 4U, frame[MGI_FRAME_HDR_LEN - 1] & 15U, frame[MGI_FRAME_HDR_LEN - 1] >> 4U, frame[MGI_FRAME_HDR_LEN - 1] & 15U,
src, b->phase, b->current == NULL ? 0 : b->current->radio_address, src, b->phase, b->current == NULL ? 0 : b->current->radio_address,
(long long) (now - b->deadline))); (int64_t) (now - b->deadline)));
return; return;
} }
if (len != MGI_JOIN_UP_LEN || command != MGI_JOIN_UP || if (len != MGI_JOIN_UP_LEN || command != MGI_JOIN_UP ||
+1 -1
View File
@@ -181,7 +181,7 @@ static void mg_ws_cb(struct mg_connection *c, int ev, void *ev_data) {
struct mg_ws_message m; struct mg_ws_message m;
size_t len; size_t len;
uint8_t final, op; uint8_t final, op;
if (msk == c->is_client) { if (msk == (bool) c->is_client) {
mg_error(c, c->is_client ? "masked WS server frame" mg_error(c, c->is_client ? "masked WS server frame"
: "unmasked WS client frame"); : "unmasked WS client frame");
return; return;