mirror of
https://github.com/cesanta/mongoose.git
synced 2026-12-04 21:58:22 +00:00
Squash warnings
This commit is contained in:
1 parent
3deafaea7f
commit
f46453f80f
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -1923,7 +1923,7 @@ static void mqtt_login(struct mg_connection *c, const char *url,
|
|||||||
|
|
||||||
void mg_mqtt_pub(struct mg_connection *c, struct mg_str *topic,
|
void mg_mqtt_pub(struct mg_connection *c, struct mg_str *topic,
|
||||||
struct mg_str *data, int qos, bool retain) {
|
struct mg_str *data, int qos, bool retain) {
|
||||||
uint8_t flags = (uint8_t)((qos & 3) << 1) | (retain ? 1 : 0);
|
uint8_t flags = (uint8_t)(((qos & 3) << 1) | (retain ? 1 : 0));
|
||||||
uint32_t total_len = 2 + (uint32_t) topic->len + (uint32_t) data->len;
|
uint32_t total_len = 2 + (uint32_t) topic->len + (uint32_t) data->len;
|
||||||
LOG(LL_DEBUG, ("%lu [%.*s] -> [%.*s]", c->id, (int) topic->len,
|
LOG(LL_DEBUG, ("%lu [%.*s] -> [%.*s]", c->id, (int) topic->len,
|
||||||
(char *) topic->ptr, (int) data->len, (char *) data->ptr));
|
(char *) topic->ptr, (int) data->len, (char *) data->ptr));
|
||||||
|
|||||||
+1
-1
@@ -83,7 +83,7 @@ static void mqtt_login(struct mg_connection *c, const char *url,
|
|||||||
|
|
||||||
void mg_mqtt_pub(struct mg_connection *c, struct mg_str *topic,
|
void mg_mqtt_pub(struct mg_connection *c, struct mg_str *topic,
|
||||||
struct mg_str *data, int qos, bool retain) {
|
struct mg_str *data, int qos, bool retain) {
|
||||||
uint8_t flags = (uint8_t)((qos & 3) << 1) | (retain ? 1 : 0);
|
uint8_t flags = (uint8_t)(((qos & 3) << 1) | (retain ? 1 : 0));
|
||||||
uint32_t total_len = 2 + (uint32_t) topic->len + (uint32_t) data->len;
|
uint32_t total_len = 2 + (uint32_t) topic->len + (uint32_t) data->len;
|
||||||
LOG(LL_DEBUG, ("%lu [%.*s] -> [%.*s]", c->id, (int) topic->len,
|
LOG(LL_DEBUG, ("%lu [%.*s] -> [%.*s]", c->id, (int) topic->len,
|
||||||
(char *) topic->ptr, (int) data->len, (char *) data->ptr));
|
(char *) topic->ptr, (int) data->len, (char *) data->ptr));
|
||||||
|
|||||||
Reference in new issue
Block a user