Procházet zdrojové kódy

bproto_generator: don't declare unused variables

ambrop7 před 13 roky
rodič
revize
6f44d6ee7b

+ 16 - 1
bproto_generator/bproto_functions.php

@@ -467,7 +467,6 @@ EOD;
                 if (!(left >= sizeof(struct BProto_uint{$bits}_s))) {
                     return 0;
                 }
-                struct BProto_uint{$bits}_s *val = (struct BProto_uint{$bits}_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint{$bits}_s);
                 left -= sizeof(struct BProto_uint{$bits}_s);
 
@@ -659,7 +658,15 @@ EOD;
                 echo <<<EOD
             case BPROTO_TYPE_UINT{$bits}: {
                 ASSERT(left >= sizeof(struct BProto_uint{$bits}_s))
+
+EOD;
+                if ($entry["type"]["type"] == "uint" && $entry["type"]["size"] == $bits) {
+                    echo <<<EOD
                 struct BProto_uint{$bits}_s *val = (struct BProto_uint{$bits}_s *)(o->buf + o->{$entry["name"]}_start + o->{$entry["name"]}_pos);
+
+EOD;
+                }
+                echo <<<EOD
                 o->{$entry["name"]}_pos += sizeof(struct BProto_uint{$bits}_s);
                 left -= sizeof(struct BProto_uint{$bits}_s);
 
@@ -692,7 +699,15 @@ EOD;
 
                 uint32_t payload_len = ltoh32(val->len);
                 ASSERT(left >= payload_len)
+
+EOD;
+            if ($entry["type"]["type"] == "data" || $entry["type"]["type"] == "constdata") {
+                    echo <<<EOD
                 uint8_t *payload = o->buf + o->{$entry["name"]}_start + o->{$entry["name"]}_pos;
+
+EOD;
+            }
+            echo <<<EOD
                 o->{$entry["name"]}_pos += payload_len;
                 left -= payload_len;
 

+ 0 - 20
generated/bproto_addr.h

@@ -207,7 +207,6 @@ int addrParser_Init (addrParser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint8_s))) {
                     return 0;
                 }
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
 
@@ -227,7 +226,6 @@ int addrParser_Init (addrParser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint16_s))) {
                     return 0;
                 }
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
 
@@ -240,7 +238,6 @@ int addrParser_Init (addrParser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint32_s))) {
                     return 0;
                 }
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
 
@@ -253,7 +250,6 @@ int addrParser_Init (addrParser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint64_s))) {
                     return 0;
                 }
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
 
@@ -386,19 +382,16 @@ int addrParser_Gettype (addrParser *o, uint8_t *v)
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->type_start + o->type_pos);
                 o->type_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->type_start + o->type_pos);
                 o->type_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->type_start + o->type_pos);
                 o->type_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -412,7 +405,6 @@ int addrParser_Gettype (addrParser *o, uint8_t *v)
 
                 uint32_t payload_len = ltoh32(val->len);
                 ASSERT(left >= payload_len)
-                uint8_t *payload = o->buf + o->type_start + o->type_pos;
                 o->type_pos += payload_len;
                 left -= payload_len;
             } break;
@@ -452,25 +444,21 @@ int addrParser_Getip_port (addrParser *o, uint8_t **data)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->ip_port_start + o->ip_port_pos);
                 o->ip_port_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->ip_port_start + o->ip_port_pos);
                 o->ip_port_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->ip_port_start + o->ip_port_pos);
                 o->ip_port_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->ip_port_start + o->ip_port_pos);
                 o->ip_port_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -529,25 +517,21 @@ int addrParser_Getipv4_addr (addrParser *o, uint8_t **data)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->ipv4_addr_start + o->ipv4_addr_pos);
                 o->ipv4_addr_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->ipv4_addr_start + o->ipv4_addr_pos);
                 o->ipv4_addr_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->ipv4_addr_start + o->ipv4_addr_pos);
                 o->ipv4_addr_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->ipv4_addr_start + o->ipv4_addr_pos);
                 o->ipv4_addr_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -606,25 +590,21 @@ int addrParser_Getipv6_addr (addrParser *o, uint8_t **data)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->ipv6_addr_start + o->ipv6_addr_pos);
                 o->ipv6_addr_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->ipv6_addr_start + o->ipv6_addr_pos);
                 o->ipv6_addr_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->ipv6_addr_start + o->ipv6_addr_pos);
                 o->ipv6_addr_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->ipv6_addr_start + o->ipv6_addr_pos);
                 o->ipv6_addr_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;

+ 0 - 32
generated/bproto_bproto_test.h

@@ -295,7 +295,6 @@ int msg1Parser_Init (msg1Parser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint8_s))) {
                     return 0;
                 }
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
 
@@ -315,7 +314,6 @@ int msg1Parser_Init (msg1Parser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint16_s))) {
                     return 0;
                 }
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
 
@@ -342,7 +340,6 @@ int msg1Parser_Init (msg1Parser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint32_s))) {
                     return 0;
                 }
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
 
@@ -362,7 +359,6 @@ int msg1Parser_Init (msg1Parser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint64_s))) {
                     return 0;
                 }
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
 
@@ -487,7 +483,6 @@ int msg1Parser_Geta (msg1Parser *o, uint16_t *v)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->a_start + o->a_pos);
                 o->a_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
@@ -504,13 +499,11 @@ int msg1Parser_Geta (msg1Parser *o, uint16_t *v)
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->a_start + o->a_pos);
                 o->a_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->a_start + o->a_pos);
                 o->a_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -524,7 +517,6 @@ int msg1Parser_Geta (msg1Parser *o, uint16_t *v)
 
                 uint32_t payload_len = ltoh32(val->len);
                 ASSERT(left >= payload_len)
-                uint8_t *payload = o->buf + o->a_start + o->a_pos;
                 o->a_pos += payload_len;
                 left -= payload_len;
             } break;
@@ -564,13 +556,11 @@ int msg1Parser_Getb (msg1Parser *o, uint32_t *v)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->b_start + o->b_pos);
                 o->b_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->b_start + o->b_pos);
                 o->b_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
@@ -587,7 +577,6 @@ int msg1Parser_Getb (msg1Parser *o, uint32_t *v)
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->b_start + o->b_pos);
                 o->b_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -601,7 +590,6 @@ int msg1Parser_Getb (msg1Parser *o, uint32_t *v)
 
                 uint32_t payload_len = ltoh32(val->len);
                 ASSERT(left >= payload_len)
-                uint8_t *payload = o->buf + o->b_start + o->b_pos;
                 o->b_pos += payload_len;
                 left -= payload_len;
             } break;
@@ -641,19 +629,16 @@ int msg1Parser_Getc (msg1Parser *o, uint64_t *v)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->c_start + o->c_pos);
                 o->c_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->c_start + o->c_pos);
                 o->c_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->c_start + o->c_pos);
                 o->c_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
@@ -678,7 +663,6 @@ int msg1Parser_Getc (msg1Parser *o, uint64_t *v)
 
                 uint32_t payload_len = ltoh32(val->len);
                 ASSERT(left >= payload_len)
-                uint8_t *payload = o->buf + o->c_start + o->c_pos;
                 o->c_pos += payload_len;
                 left -= payload_len;
             } break;
@@ -718,7 +702,6 @@ int msg1Parser_Getd (msg1Parser *o, uint16_t *v)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->d_start + o->d_pos);
                 o->d_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
@@ -735,13 +718,11 @@ int msg1Parser_Getd (msg1Parser *o, uint16_t *v)
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->d_start + o->d_pos);
                 o->d_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->d_start + o->d_pos);
                 o->d_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -755,7 +736,6 @@ int msg1Parser_Getd (msg1Parser *o, uint16_t *v)
 
                 uint32_t payload_len = ltoh32(val->len);
                 ASSERT(left >= payload_len)
-                uint8_t *payload = o->buf + o->d_start + o->d_pos;
                 o->d_pos += payload_len;
                 left -= payload_len;
             } break;
@@ -806,19 +786,16 @@ int msg1Parser_Gete (msg1Parser *o, uint8_t *v)
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->e_start + o->e_pos);
                 o->e_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->e_start + o->e_pos);
                 o->e_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->e_start + o->e_pos);
                 o->e_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -832,7 +809,6 @@ int msg1Parser_Gete (msg1Parser *o, uint8_t *v)
 
                 uint32_t payload_len = ltoh32(val->len);
                 ASSERT(left >= payload_len)
-                uint8_t *payload = o->buf + o->e_start + o->e_pos;
                 o->e_pos += payload_len;
                 left -= payload_len;
             } break;
@@ -872,25 +848,21 @@ int msg1Parser_Getf (msg1Parser *o, uint8_t **data, int *data_len)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->f_start + o->f_pos);
                 o->f_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->f_start + o->f_pos);
                 o->f_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->f_start + o->f_pos);
                 o->f_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->f_start + o->f_pos);
                 o->f_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -950,25 +922,21 @@ int msg1Parser_Getg (msg1Parser *o, uint8_t **data)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->g_start + o->g_pos);
                 o->g_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->g_start + o->g_pos);
                 o->g_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->g_start + o->g_pos);
                 o->g_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->g_start + o->g_pos);
                 o->g_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;

+ 0 - 64
generated/bproto_msgproto.h

@@ -135,7 +135,6 @@ int msgParser_Init (msgParser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint8_s))) {
                     return 0;
                 }
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
 
@@ -148,7 +147,6 @@ int msgParser_Init (msgParser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint16_s))) {
                     return 0;
                 }
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
 
@@ -168,7 +166,6 @@ int msgParser_Init (msgParser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint32_s))) {
                     return 0;
                 }
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
 
@@ -181,7 +178,6 @@ int msgParser_Init (msgParser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint64_s))) {
                     return 0;
                 }
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
 
@@ -264,7 +260,6 @@ int msgParser_Gettype (msgParser *o, uint16_t *v)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->type_start + o->type_pos);
                 o->type_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
@@ -281,13 +276,11 @@ int msgParser_Gettype (msgParser *o, uint16_t *v)
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->type_start + o->type_pos);
                 o->type_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->type_start + o->type_pos);
                 o->type_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -301,7 +294,6 @@ int msgParser_Gettype (msgParser *o, uint16_t *v)
 
                 uint32_t payload_len = ltoh32(val->len);
                 ASSERT(left >= payload_len)
-                uint8_t *payload = o->buf + o->type_start + o->type_pos;
                 o->type_pos += payload_len;
                 left -= payload_len;
             } break;
@@ -341,25 +333,21 @@ int msgParser_Getpayload (msgParser *o, uint8_t **data, int *data_len)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->payload_start + o->payload_pos);
                 o->payload_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->payload_start + o->payload_pos);
                 o->payload_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->payload_start + o->payload_pos);
                 o->payload_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->payload_start + o->payload_pos);
                 o->payload_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -562,7 +550,6 @@ int msg_youconnectParser_Init (msg_youconnectParser *o, uint8_t *buf, int buf_le
                 if (!(left >= sizeof(struct BProto_uint8_s))) {
                     return 0;
                 }
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
 
@@ -575,7 +562,6 @@ int msg_youconnectParser_Init (msg_youconnectParser *o, uint8_t *buf, int buf_le
                 if (!(left >= sizeof(struct BProto_uint16_s))) {
                     return 0;
                 }
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
 
@@ -588,7 +574,6 @@ int msg_youconnectParser_Init (msg_youconnectParser *o, uint8_t *buf, int buf_le
                 if (!(left >= sizeof(struct BProto_uint32_s))) {
                     return 0;
                 }
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
 
@@ -601,7 +586,6 @@ int msg_youconnectParser_Init (msg_youconnectParser *o, uint8_t *buf, int buf_le
                 if (!(left >= sizeof(struct BProto_uint64_s))) {
                     return 0;
                 }
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
 
@@ -706,25 +690,21 @@ int msg_youconnectParser_Getaddr (msg_youconnectParser *o, uint8_t **data, int *
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->addr_start + o->addr_pos);
                 o->addr_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->addr_start + o->addr_pos);
                 o->addr_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->addr_start + o->addr_pos);
                 o->addr_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->addr_start + o->addr_pos);
                 o->addr_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -784,25 +764,21 @@ int msg_youconnectParser_Getkey (msg_youconnectParser *o, uint8_t **data, int *d
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->key_start + o->key_pos);
                 o->key_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->key_start + o->key_pos);
                 o->key_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->key_start + o->key_pos);
                 o->key_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->key_start + o->key_pos);
                 o->key_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -862,19 +838,16 @@ int msg_youconnectParser_Getpassword (msg_youconnectParser *o, uint64_t *v)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->password_start + o->password_pos);
                 o->password_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->password_start + o->password_pos);
                 o->password_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->password_start + o->password_pos);
                 o->password_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
@@ -899,7 +872,6 @@ int msg_youconnectParser_Getpassword (msg_youconnectParser *o, uint64_t *v)
 
                 uint32_t payload_len = ltoh32(val->len);
                 ASSERT(left >= payload_len)
-                uint8_t *payload = o->buf + o->password_start + o->password_pos;
                 o->password_pos += payload_len;
                 left -= payload_len;
             } break;
@@ -1051,7 +1023,6 @@ int msg_youconnect_addrParser_Init (msg_youconnect_addrParser *o, uint8_t *buf,
                 if (!(left >= sizeof(struct BProto_uint8_s))) {
                     return 0;
                 }
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
 
@@ -1064,7 +1035,6 @@ int msg_youconnect_addrParser_Init (msg_youconnect_addrParser *o, uint8_t *buf,
                 if (!(left >= sizeof(struct BProto_uint16_s))) {
                     return 0;
                 }
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
 
@@ -1077,7 +1047,6 @@ int msg_youconnect_addrParser_Init (msg_youconnect_addrParser *o, uint8_t *buf,
                 if (!(left >= sizeof(struct BProto_uint32_s))) {
                     return 0;
                 }
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
 
@@ -1090,7 +1059,6 @@ int msg_youconnect_addrParser_Init (msg_youconnect_addrParser *o, uint8_t *buf,
                 if (!(left >= sizeof(struct BProto_uint64_s))) {
                     return 0;
                 }
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
 
@@ -1183,25 +1151,21 @@ int msg_youconnect_addrParser_Getname (msg_youconnect_addrParser *o, uint8_t **d
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->name_start + o->name_pos);
                 o->name_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->name_start + o->name_pos);
                 o->name_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->name_start + o->name_pos);
                 o->name_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->name_start + o->name_pos);
                 o->name_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -1261,25 +1225,21 @@ int msg_youconnect_addrParser_Getaddr (msg_youconnect_addrParser *o, uint8_t **d
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->addr_start + o->addr_pos);
                 o->addr_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->addr_start + o->addr_pos);
                 o->addr_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->addr_start + o->addr_pos);
                 o->addr_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->addr_start + o->addr_pos);
                 o->addr_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -1482,7 +1442,6 @@ int msg_seedParser_Init (msg_seedParser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint8_s))) {
                     return 0;
                 }
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
 
@@ -1495,7 +1454,6 @@ int msg_seedParser_Init (msg_seedParser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint16_s))) {
                     return 0;
                 }
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
 
@@ -1515,7 +1473,6 @@ int msg_seedParser_Init (msg_seedParser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint32_s))) {
                     return 0;
                 }
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
 
@@ -1528,7 +1485,6 @@ int msg_seedParser_Init (msg_seedParser *o, uint8_t *buf, int buf_len)
                 if (!(left >= sizeof(struct BProto_uint64_s))) {
                     return 0;
                 }
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
 
@@ -1626,7 +1582,6 @@ int msg_seedParser_Getseed_id (msg_seedParser *o, uint16_t *v)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->seed_id_start + o->seed_id_pos);
                 o->seed_id_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
@@ -1643,13 +1598,11 @@ int msg_seedParser_Getseed_id (msg_seedParser *o, uint16_t *v)
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->seed_id_start + o->seed_id_pos);
                 o->seed_id_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->seed_id_start + o->seed_id_pos);
                 o->seed_id_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -1663,7 +1616,6 @@ int msg_seedParser_Getseed_id (msg_seedParser *o, uint16_t *v)
 
                 uint32_t payload_len = ltoh32(val->len);
                 ASSERT(left >= payload_len)
-                uint8_t *payload = o->buf + o->seed_id_start + o->seed_id_pos;
                 o->seed_id_pos += payload_len;
                 left -= payload_len;
             } break;
@@ -1703,25 +1655,21 @@ int msg_seedParser_Getkey (msg_seedParser *o, uint8_t **data, int *data_len)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->key_start + o->key_pos);
                 o->key_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->key_start + o->key_pos);
                 o->key_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->key_start + o->key_pos);
                 o->key_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->key_start + o->key_pos);
                 o->key_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -1781,25 +1729,21 @@ int msg_seedParser_Getiv (msg_seedParser *o, uint8_t **data, int *data_len)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->iv_start + o->iv_pos);
                 o->iv_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
             case BPROTO_TYPE_UINT16: {
                 ASSERT(left >= sizeof(struct BProto_uint16_s))
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + o->iv_start + o->iv_pos);
                 o->iv_pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->iv_start + o->iv_pos);
                 o->iv_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->iv_start + o->iv_pos);
                 o->iv_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -1930,7 +1874,6 @@ int msg_confirmseedParser_Init (msg_confirmseedParser *o, uint8_t *buf, int buf_
                 if (!(left >= sizeof(struct BProto_uint8_s))) {
                     return 0;
                 }
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
 
@@ -1943,7 +1886,6 @@ int msg_confirmseedParser_Init (msg_confirmseedParser *o, uint8_t *buf, int buf_
                 if (!(left >= sizeof(struct BProto_uint16_s))) {
                     return 0;
                 }
-                struct BProto_uint16_s *val = (struct BProto_uint16_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint16_s);
                 left -= sizeof(struct BProto_uint16_s);
 
@@ -1963,7 +1905,6 @@ int msg_confirmseedParser_Init (msg_confirmseedParser *o, uint8_t *buf, int buf_
                 if (!(left >= sizeof(struct BProto_uint32_s))) {
                     return 0;
                 }
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
 
@@ -1976,7 +1917,6 @@ int msg_confirmseedParser_Init (msg_confirmseedParser *o, uint8_t *buf, int buf_
                 if (!(left >= sizeof(struct BProto_uint64_s))) {
                     return 0;
                 }
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + pos);
                 pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
 
@@ -2044,7 +1984,6 @@ int msg_confirmseedParser_Getseed_id (msg_confirmseedParser *o, uint16_t *v)
         switch (type) {
             case BPROTO_TYPE_UINT8: {
                 ASSERT(left >= sizeof(struct BProto_uint8_s))
-                struct BProto_uint8_s *val = (struct BProto_uint8_s *)(o->buf + o->seed_id_start + o->seed_id_pos);
                 o->seed_id_pos += sizeof(struct BProto_uint8_s);
                 left -= sizeof(struct BProto_uint8_s);
             } break;
@@ -2061,13 +2000,11 @@ int msg_confirmseedParser_Getseed_id (msg_confirmseedParser *o, uint16_t *v)
             } break;
             case BPROTO_TYPE_UINT32: {
                 ASSERT(left >= sizeof(struct BProto_uint32_s))
-                struct BProto_uint32_s *val = (struct BProto_uint32_s *)(o->buf + o->seed_id_start + o->seed_id_pos);
                 o->seed_id_pos += sizeof(struct BProto_uint32_s);
                 left -= sizeof(struct BProto_uint32_s);
             } break;
             case BPROTO_TYPE_UINT64: {
                 ASSERT(left >= sizeof(struct BProto_uint64_s))
-                struct BProto_uint64_s *val = (struct BProto_uint64_s *)(o->buf + o->seed_id_start + o->seed_id_pos);
                 o->seed_id_pos += sizeof(struct BProto_uint64_s);
                 left -= sizeof(struct BProto_uint64_s);
             } break;
@@ -2081,7 +2018,6 @@ int msg_confirmseedParser_Getseed_id (msg_confirmseedParser *o, uint16_t *v)
 
                 uint32_t payload_len = ltoh32(val->len);
                 ASSERT(left >= payload_len)
-                uint8_t *payload = o->buf + o->seed_id_start + o->seed_id_pos;
                 o->seed_id_pos += payload_len;
                 left -= payload_len;
             } break;