While fixing various gcc -Wshadow warnings I came across something which 
seems incorrect in packet-camel-template.c in dissect-camel_arg()
(and in dissect_camel_res()).

Specifically: the local variable 'opcode' seems to be set but is never used.

There is a global variable 'opcode' so I'm suspecting that the local 
declaration shouldn't be there.

Can someone who is familiar with the code confirm this ?

Thanks

Bill

--------------------

static int
dissect_camel_arg(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree 
*tree _U_) {
   int offset;
   rose_ctx_t *rctx;
   gint32 opcode;
   /*
   const camel_op_t *op_ptr;
   const gchar *p;
   proto_item *ti, *ti_tmp;
   proto_tree *camel_tree;
*/
   offset = 0;
   rctx = get_rose_ctx(pinfo->private_data);
   DISSECTOR_ASSERT(rctx);
   if (rctx->d.pdu != 1)  /* invoke */
     return offset;
   if (rctx->d.code != 0)  /* local */
     return offset;
   opcode = rctx->d.code_local;

   return offset;
}
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Reply via email to