fix(mqtt): fix unused-but-set-variable warning

This commit is contained in:
Alexey Lapshin
2026-07-15 11:37:30 +07:00
parent e08670365a
commit 3a15be4807
+1 -2
View File
@@ -331,9 +331,8 @@ uint16_t mqtt5_get_id(uint8_t *buffer, size_t length)
int topiclen = 0;
uint8_t len_bytes = 0;
size_t offset = 1;
size_t totlen = get_variable_len(buffer, offset, length, &len_bytes);
get_variable_len(buffer, offset, length, &len_bytes);
offset += len_bytes;
totlen += offset;
if (offset + 2 > length) {
return 0;