Selaa lähdekoodia

remove some unused variables and labels

ambrop7 13 vuotta sitten
vanhempi
sitoutus
3f603f0918

+ 0 - 1
client/FrameDecider.c

@@ -745,7 +745,6 @@ void FrameDeciderPeer_Analyze (FrameDeciderPeer *o, const uint8_t *frame, int fr
                                 PeerLog(o, BLOG_INFO, "analyze: IGMP: short source");
                                 goto out;
                             }
-                            struct igmp_source *source = (struct igmp_source *)pos;
                             pos += sizeof(struct igmp_source);
                             len -= sizeof(struct igmp_source);
                         }

+ 1 - 1
ncd/modules/list.c

@@ -147,7 +147,7 @@ static struct elem * insert_value (NCDModuleInst *i, struct instance *o, NCDValR
     struct elem *e = malloc(sizeof(*e));
     if (!e) {
         ModuleLog(i, BLOG_ERROR, "malloc failed");
-        return NULL;
+        goto fail0;
     }
     
     NCDValMem_Init(&e->mem);

+ 0 - 3
ncd/modules/sys_request_server.c

@@ -218,9 +218,6 @@ static void listener_handler (struct instance *o)
     ModuleLog(o->i, BLOG_INFO, "connection initialized");
     return;
     
-fail3:
-    PacketStreamSender_Free(&c->send_pss);
-    PacketProtoDecoder_Free(&c->recv_decoder);
 fail2:
     PacketPassInterface_Free(&c->recv_if);
     BConnection_RecvAsync_Free(&c->con);

+ 2 - 0
security/BEncryption.c

@@ -144,7 +144,9 @@ fail1:
             ;
     }
     
+    #ifdef BADVPN_USE_CRYPTODEV
 success:
+    #endif
     // init debug object
     DebugObject_Init(&enc->d_obj);
 }

+ 0 - 1
udpgw_client/UdpGwClient.c

@@ -133,7 +133,6 @@ static void recv_interface_handler_send (UdpGwClient *o, uint8_t *data, int data
     struct udpgw_header *header = (struct udpgw_header *)data;
     data += sizeof(*header);
     data_len -= sizeof(*header);
-    uint8_t flags = ltoh8(header->flags);
     uint16_t conid = ltoh16(header->conid);
     
     // check remaining data