mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-27 12:26:24 +00:00
Squash more warnings
This commit is contained in:
1 parent
736b8ad7b7
commit
838b0bcd27
5 files changed
+10
-9
No files matched your search
+1
-1
@@ -31,7 +31,7 @@ static int mg_b64rev(int c) {
|
||||
}
|
||||
|
||||
int mg_base64_update(unsigned char ch, char *to, int n) {
|
||||
unsigned char rem = (n & 3) % 3;
|
||||
int rem = (n & 3) % 3;
|
||||
if (rem == 0) {
|
||||
to[n] = (char) mg_b64idx(ch >> 2);
|
||||
to[++n] = (char) ((ch & 3) << 4);
|
||||
|
||||
@@ -83,7 +83,7 @@ size_t mg_dns_parse_rr(const uint8_t *buf, size_t len, size_t ofs,
|
||||
if (s > e) return 0;
|
||||
rr->atype = (uint16_t)(((uint16_t) s[-4] << 8) | s[-3]);
|
||||
rr->aclass = (uint16_t)(((uint16_t) s[-2] << 8) | s[-1]);
|
||||
if (is_question) return rr->nlen + 4;
|
||||
if (is_question) return (size_t)(rr->nlen + 4);
|
||||
|
||||
s += 6;
|
||||
if (s > e) return 0;
|
||||
@@ -244,7 +244,7 @@ static void mg_sendnsreq(struct mg_connection *c, struct mg_str *name, int ms,
|
||||
#if MG_ENABLE_LOG
|
||||
char buf[100];
|
||||
#endif
|
||||
d->txnid = s_reqs ? s_reqs->txnid + 1 : 1;
|
||||
d->txnid = s_reqs ? (uint16_t)(s_reqs->txnid + 1) : 1;
|
||||
d->next = s_reqs;
|
||||
s_reqs = d;
|
||||
d->expire = mg_millis() + (unsigned long) ms;
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ int mg_mqtt_parse(const uint8_t *buf, size_t len, struct mg_mqtt_message *m) {
|
||||
memset(m, 0, sizeof(*m));
|
||||
m->dgram.ptr = (char *) buf;
|
||||
if (len < 2) return MQTT_INCOMPLETE;
|
||||
m->cmd = buf[0] >> 4;
|
||||
m->cmd = (uint8_t)(buf[0] >> 4);
|
||||
m->qos = (buf[0] >> 1) & 3;
|
||||
|
||||
n = len_len = 0;
|
||||
|
||||
Reference in new issue
Block a user