Skip to content

Commit 1f56776

Browse files
committed
compiler nits
1 parent b3a0e7b commit 1f56776

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mongoose.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5194,7 +5194,7 @@ static void rx_ip6(struct mg_tcpip_if *ifp, struct pkt *pkt) {
51945194
case 51: // Authentication RFC-4302
51955195
MG_INFO(("IPv6 extension header %d", (int) next));
51965196
next = nhdr[0];
5197-
len += 8 * (nhdr[1] + 1);
5197+
len += (uint16_t)(8 * (nhdr[1] + 1));
51985198
nhdr += 8 * (nhdr[1] + 1);
51995199
break;
52005200
case 44: // Fragment 4.5
@@ -5215,7 +5215,7 @@ static void rx_ip6(struct mg_tcpip_if *ifp, struct pkt *pkt) {
52155215
}
52165216
}
52175217
// There can be link padding, take payload length from IPv6 header - options
5218-
pkt->pay.buf = nhdr;
5218+
pkt->pay.buf = (char *) nhdr;
52195219
pkt->pay.len = mg_ntohs(pkt->ip6->plen) - len;
52205220
if (next == 58) {
52215221
pkt->icmp6 = (struct icmp6 *) (pkt->pay.buf);

src/net_builtin.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,7 @@ static void rx_ip6(struct mg_tcpip_if *ifp, struct pkt *pkt) {
10371037
case 51: // Authentication RFC-4302
10381038
MG_INFO(("IPv6 extension header %d", (int) next));
10391039
next = nhdr[0];
1040-
len += 8 * (nhdr[1] + 1);
1040+
len += (uint16_t)(8 * (nhdr[1] + 1));
10411041
nhdr += 8 * (nhdr[1] + 1);
10421042
break;
10431043
case 44: // Fragment 4.5
@@ -1058,7 +1058,7 @@ static void rx_ip6(struct mg_tcpip_if *ifp, struct pkt *pkt) {
10581058
}
10591059
}
10601060
// There can be link padding, take payload length from IPv6 header - options
1061-
pkt->pay.buf = nhdr;
1061+
pkt->pay.buf = (char *) nhdr;
10621062
pkt->pay.len = mg_ntohs(pkt->ip6->plen) - len;
10631063
if (next == 58) {
10641064
pkt->icmp6 = (struct icmp6 *) (pkt->pay.buf);

0 commit comments

Comments
 (0)