From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
authorPascal Quantin <pascal.quantin@gmail.com>
Sun, 3 Mar 2013 18:45:23 +0000 (18:45 -0000)
committerPascal Quantin <pascal.quantin@gmail.com>
Sun, 3 Mar 2013 18:45:23 +0000 (18:45 -0000)
Remove C++ incompatibilities from profinet plugin

svn path=/trunk/; revision=48039

plugins/profinet/packet-dcerpc-pn-io.c
plugins/profinet/packet-dcom-cba-acco.c
plugins/profinet/packet-dcom-cba-acco.h
plugins/profinet/packet-dcom-cba.c
plugins/profinet/packet-pn-dcp.c
plugins/profinet/packet-pn-rt.c

index 1d1ea691de86a0c7dd67bd54a47d76276162cf9d..993975ae6e8315f7cdcbbac3e115bf305b41d10e 100644 (file)
@@ -2652,7 +2652,7 @@ pnio_ar_find_by_aruuid(packet_info *pinfo _U_, e_uuid_t *aruuid)
 
     /* find pdev */
     for(ars = pnio_ars; ars != NULL; ars = g_list_next(ars)) {
-        ar = ars->data;
+        ar = (pnio_ar_t *)ars->data;
 
         if (memcmp(&ar->aruuid, aruuid, sizeof(e_uuid_t)) == 0) {
             return ar;
@@ -2669,7 +2669,7 @@ pnio_ar_new(e_uuid_t *aruuid)
     pnio_ar_t *ar;
 
 
-    ar = se_alloc0(sizeof(pnio_ar_t));
+    ar = (pnio_ar_t *)se_alloc0(sizeof(pnio_ar_t));
 
     memcpy(&ar->aruuid, aruuid, sizeof(e_uuid_t));
 
@@ -3233,14 +3233,14 @@ dissect_IandM0_block(tvbuff_t *tvb, int offset,
     offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
                     hf_pn_io_vendor_id_low, &u8VendorIDLow);
     /* c8[20] OrderID */
-    pOrderID = ep_alloc(20+1);
+    pOrderID = (char *)ep_alloc(20+1);
     tvb_memcpy(tvb, (guint8 *) pOrderID, offset, 20);
     pOrderID[20] = '\0';
     proto_tree_add_string (tree, hf_pn_io_order_id, tvb, offset, 20, pOrderID);
     offset += 20;
 
     /* c8[16] IM_Serial_Number */
-    pIMSerialNumber = ep_alloc(16+1);
+    pIMSerialNumber = (char *)ep_alloc(16+1);
     tvb_memcpy(tvb, (guint8 *) pIMSerialNumber, offset, 16);
     pIMSerialNumber[16] = '\0';
     proto_tree_add_string (tree, hf_pn_io_im_serial_number, tvb, offset, 16, pIMSerialNumber);
@@ -3298,14 +3298,14 @@ dissect_IandM1_block(tvbuff_t *tvb, int offset,
     }
 
     /* IM_Tag_Function [32] */
-    pTagFunction = ep_alloc(32+1);
+    pTagFunction = (char *)ep_alloc(32+1);
     tvb_memcpy(tvb, (guint8 *) pTagFunction, offset, 32);
     pTagFunction[32] = '\0';
     proto_tree_add_string (tree, hf_pn_io_im_tag_function, tvb, offset, 32, pTagFunction);
     offset += 32;
 
     /* IM_Tag_Location [22] */
-    pTagLocation = ep_alloc(22+1);
+    pTagLocation = (char *)ep_alloc(22+1);
     tvb_memcpy(tvb, (guint8 *) pTagLocation, offset, 22);
     pTagLocation[22] = '\0';
     proto_tree_add_string (tree, hf_pn_io_im_tag_location, tvb, offset, 22, pTagLocation);
@@ -3330,7 +3330,7 @@ dissect_IandM2_block(tvbuff_t *tvb, int offset,
     }
 
     /* IM_Date [16] */
-    pDate = ep_alloc(16+1);
+    pDate = (char *)ep_alloc(16+1);
     tvb_memcpy(tvb, (guint8 *) pDate, offset, 16);
     pDate[16] = '\0';
     proto_tree_add_string (tree, hf_pn_io_im_date, tvb, offset, 16, pDate);
@@ -3355,7 +3355,7 @@ dissect_IandM3_block(tvbuff_t *tvb, int offset,
     }
 
     /* IM_Descriptor [54] */
-    pDescriptor = ep_alloc(54+1);
+    pDescriptor = (char *)ep_alloc(54+1);
     tvb_memcpy(tvb, (guint8 *) pDescriptor, offset, 54);
     pDescriptor[54] = '\0';
     proto_tree_add_string (tree, hf_pn_io_im_descriptor, tvb, offset, 54, pDescriptor);
@@ -4313,7 +4313,7 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
     offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
                         hf_pn_io_length_own_port_id, &u8LengthOwnPortID);
     /* OwnPortID */
-    pOwnPortID = ep_alloc(u8LengthOwnPortID+1);
+    pOwnPortID = (char *)ep_alloc(u8LengthOwnPortID+1);
     tvb_memcpy(tvb, (guint8 *) pOwnPortID, offset, u8LengthOwnPortID);
     pOwnPortID[u8LengthOwnPortID] = '\0';
     proto_tree_add_string (tree, hf_pn_io_own_port_id, tvb, offset, u8LengthOwnPortID, pOwnPortID);
@@ -4331,7 +4331,7 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
         offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
                             hf_pn_io_length_peer_port_id, &u8LengthPeerPortID);
         /* PeerPortID */
-        pPeerPortID = ep_alloc(u8LengthPeerPortID+1);
+        pPeerPortID = (char *)ep_alloc(u8LengthPeerPortID+1);
         tvb_memcpy(tvb, (guint8 *) pPeerPortID, offset, u8LengthPeerPortID);
         pPeerPortID[u8LengthPeerPortID] = '\0';
         proto_tree_add_string (tree, hf_pn_io_peer_port_id, tvb, offset, u8LengthPeerPortID, pPeerPortID);
@@ -4341,7 +4341,7 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
         offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
                             hf_pn_io_length_peer_chassis_id, &u8LengthPeerChassisID);
         /* PeerChassisID */
-        pPeerChassisID = ep_alloc(u8LengthPeerChassisID+1);
+        pPeerChassisID = (char *)ep_alloc(u8LengthPeerChassisID+1);
         tvb_memcpy(tvb, (guint8 *) pPeerChassisID, offset, u8LengthPeerChassisID);
         pPeerChassisID[u8LengthPeerChassisID] = '\0';
         proto_tree_add_string (tree, hf_pn_io_peer_chassis_id, tvb, offset, u8LengthPeerChassisID, pPeerChassisID);
@@ -4427,7 +4427,7 @@ dissect_PDInterfaceMrpDataAdjust_block(tvbuff_t *tvb, int offset,
     offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
                     hf_pn_io_mrp_length_domain_name, &u8LengthDomainName);
     /* MRP_DomainName */
-    pDomainName = ep_alloc(u8LengthDomainName+1);
+    pDomainName = (char *)ep_alloc(u8LengthDomainName+1);
     tvb_memcpy(tvb, (guint8 *) pDomainName, offset, u8LengthDomainName);
     pDomainName[u8LengthDomainName] = '\0';
     proto_tree_add_string (tree, hf_pn_io_mrp_domain_name, tvb, offset, u8LengthDomainName, pDomainName);
@@ -4502,7 +4502,7 @@ dissect_PDInterfaceMrpDataReal_block(tvbuff_t *tvb, int offset,
     offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
                     hf_pn_io_mrp_length_domain_name, &u8LengthDomainName);
     /* MRP_DomainName */
-    pDomainName = ep_alloc(u8LengthDomainName+1);
+    pDomainName = (char *)ep_alloc(u8LengthDomainName+1);
     tvb_memcpy(tvb, (guint8 *) pDomainName, offset, u8LengthDomainName);
     pDomainName[u8LengthDomainName] = '\0';
     proto_tree_add_string (tree, hf_pn_io_mrp_domain_name, tvb, offset, u8LengthDomainName, pDomainName);
@@ -5084,7 +5084,7 @@ dissect_CheckPeers_block(tvbuff_t *tvb, int offset,
         offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
                             hf_pn_io_length_peer_port_id, &u8LengthPeerPortID);
         /* PeerPortID */
-        pPeerPortID = ep_alloc(u8LengthPeerPortID+1);
+        pPeerPortID = (char *)ep_alloc(u8LengthPeerPortID+1);
         tvb_memcpy(tvb, (guint8 *) pPeerPortID, offset, u8LengthPeerPortID);
         pPeerPortID[u8LengthPeerPortID] = '\0';
         proto_tree_add_string (tree, hf_pn_io_peer_port_id, tvb, offset, u8LengthPeerPortID, pPeerPortID);
@@ -5094,7 +5094,7 @@ dissect_CheckPeers_block(tvbuff_t *tvb, int offset,
         offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
                             hf_pn_io_length_peer_chassis_id, &u8LengthPeerChassisID);
         /* PeerChassisID */
-        pPeerChassisID = ep_alloc(u8LengthPeerChassisID+1);
+        pPeerChassisID = (char *)ep_alloc(u8LengthPeerChassisID+1);
         tvb_memcpy(tvb, (guint8 *) pPeerChassisID, offset, u8LengthPeerChassisID);
         pPeerChassisID[u8LengthPeerChassisID] = '\0';
         proto_tree_add_string (tree, hf_pn_io_peer_chassis_id, tvb, offset, u8LengthPeerChassisID, pPeerChassisID);
@@ -5340,7 +5340,7 @@ dissect_MrpInstanceDataAdjust_block(tvbuff_t *tvb, int offset,
     offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
                     hf_pn_io_mrp_length_domain_name, &u8LengthDomainName);
     /* MRP_DomainName */
-    pDomainName = ep_alloc(u8LengthDomainName+1);
+    pDomainName = (char *)ep_alloc(u8LengthDomainName+1);
     tvb_memcpy(tvb, (guint8 *) pDomainName, offset, u8LengthDomainName);
     pDomainName[u8LengthDomainName] = '\0';
     proto_tree_add_string (tree, hf_pn_io_mrp_domain_name, tvb, offset, u8LengthDomainName, pDomainName);
@@ -5390,7 +5390,7 @@ dissect_MrpInstanceDataReal_block(tvbuff_t *tvb, int offset,
     offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
                     hf_pn_io_mrp_length_domain_name, &u8LengthDomainName);
     /* MRP_DomainName */
-    pDomainName = ep_alloc(u8LengthDomainName+1);
+    pDomainName = (char *)ep_alloc(u8LengthDomainName+1);
     tvb_memcpy(tvb, (guint8 *) pDomainName, offset, u8LengthDomainName);
     pDomainName[u8LengthDomainName] = '\0';
     proto_tree_add_string (tree, hf_pn_io_mrp_domain_name, tvb, offset, u8LengthDomainName, pDomainName);
@@ -5521,7 +5521,7 @@ dissect_PDInterfaceDataReal_block(tvbuff_t *tvb, int offset,
     offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
                         hf_pn_io_length_own_chassis_id, &u8LengthOwnChassisID);
     /* OwnChassisID */
-    pOwnChassisID = ep_alloc(u8LengthOwnChassisID+1);
+    pOwnChassisID = (char *)ep_alloc(u8LengthOwnChassisID+1);
     tvb_memcpy(tvb, (guint8 *) pOwnChassisID, offset, u8LengthOwnChassisID);
     pOwnChassisID[u8LengthOwnChassisID] = '\0';
     proto_tree_add_string (tree, hf_pn_io_own_chassis_id, tvb, offset, u8LengthOwnChassisID, pOwnChassisID);
@@ -5669,7 +5669,7 @@ dissect_PDSyncData_block(tvbuff_t *tvb, int offset,
         offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
                             hf_pn_io_ptcp_length_subdomain_name, &u8LengthSubdomainName);
         /* PTCPSubdomainName */
-        pSubdomainName = ep_alloc(u8LengthSubdomainName+1);
+        pSubdomainName = (char *)ep_alloc(u8LengthSubdomainName+1);
         tvb_memcpy(tvb, (guint8 *) pSubdomainName, offset, u8LengthSubdomainName);
         pSubdomainName[u8LengthSubdomainName] = '\0';
         proto_tree_add_string (tree, hf_pn_io_ptcp_subdomain_name, tvb, offset, u8LengthSubdomainName, pSubdomainName);
@@ -6279,7 +6279,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
                          hf_pn_io_cminitiator_objectuuid, &uuid);
             offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep,
                         hf_pn_io_station_name_length, &u16NameLength);
-        pStationName = ep_alloc(u16NameLength+1);
+        pStationName = (char *)ep_alloc(u16NameLength+1);
         tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
         pStationName[u16NameLength] = '\0';
             proto_tree_add_string (ar_tree, hf_pn_io_cminitiator_station_name, tvb, offset, u16NameLength, pStationName);
@@ -6365,7 +6365,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
             offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep,
                         hf_pn_io_station_name_length, &u16NameLength);
         /* ParameterServerStationName */
-        pStationName = ep_alloc(u16NameLength+1);
+        pStationName = (char *)ep_alloc(u16NameLength+1);
         tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
         pStationName[u16NameLength] = '\0';
             proto_tree_add_string (ar_tree, hf_pn_io_parameter_server_station_name, tvb, offset, u16NameLength, pStationName);
@@ -6410,7 +6410,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
             offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_cmresponder_udprtport, &u16UDPRTPort);
             /* CMInitiatorStationName*/
             offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_station_name_length, &u16NameLength);
-            pStationName = ep_alloc(u16NameLength+1);
+            pStationName = (char *)ep_alloc(u16NameLength+1);
             tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
             pStationName[u16NameLength] = '\0';
             proto_tree_add_string (ar_tree, hf_pn_io_cminitiator_station_name, tvb, offset, u16NameLength, pStationName);
@@ -6422,7 +6422,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
             offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_station_name_length, &u16NameLength);
             if (u16NameLength != 0) {
                 /* ParameterServerStationName */
-                pStationName = ep_alloc(u16NameLength+1);
+                pStationName = (char *)ep_alloc(u16NameLength+1);
                 tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
                 pStationName[u16NameLength] = '\0';
                 proto_tree_add_string (ar_tree, hf_pn_io_parameter_server_station_name, tvb, offset, u16NameLength, pStationName);
@@ -6816,7 +6816,7 @@ dissect_ARBlockReq_block(tvbuff_t *tvb, int offset,
     offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
                         hf_pn_io_station_name_length, &u16NameLength);
 
-    pStationName = ep_alloc(u16NameLength+1);
+    pStationName = (char *)ep_alloc(u16NameLength+1);
     tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
     pStationName[u16NameLength] = '\0';
     proto_tree_add_string (tree, hf_pn_io_cminitiator_station_name, tvb, offset, u16NameLength, pStationName);
@@ -7199,7 +7199,7 @@ dissect_ARServerBlock(tvbuff_t *tvb, int offset,
     offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
                         hf_pn_io_station_name_length, &u16NameLength);
 
-    pStationName = ep_alloc(u16NameLength+1);
+    pStationName = (char *)ep_alloc(u16NameLength+1);
     tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
     pStationName[u16NameLength] = '\0';
     proto_tree_add_string (tree, hf_pn_io_cminitiator_station_name, tvb, offset, u16NameLength, pStationName);
@@ -7297,7 +7297,7 @@ dissect_MCRBlockReq_block(tvbuff_t *tvb, int offset,
     offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
                         hf_pn_io_station_name_length, &u16NameLength);
 
-    pStationName = ep_alloc(u16NameLength+1);
+    pStationName = (char *)ep_alloc(u16NameLength+1);
     tvb_memcpy(tvb, (guint8 *) pStationName, offset, u16NameLength);
     pStationName[u16NameLength] = '\0';
     proto_tree_add_string (tree, hf_pn_io_provider_station_name, tvb, offset, u16NameLength, pStationName);
@@ -9430,7 +9430,7 @@ pn_io_ar_conv_valid(packet_info *pinfo)
 static const gchar *
 pn_io_ar_conv_filter(packet_info *pinfo)
 {
-    pnio_ar_t *ar = pinfo->profinet_conv;
+    pnio_ar_t *ar = (pnio_ar_t *)pinfo->profinet_conv;
     char      *buf;
 
     if (pinfo->profinet_type != 10) {
@@ -9450,7 +9450,7 @@ pn_io_ar_conv_filter(packet_info *pinfo)
 static const gchar *
 pn_io_ar_conv_data_filter(packet_info *pinfo)
 {
-    pnio_ar_t *ar = pinfo->profinet_conv;
+    pnio_ar_t *ar = (pnio_ar_t *)pinfo->profinet_conv;
     char      *buf;
 
     if (pinfo->profinet_type != 10) {
index 4e03764cd0e2070431b3cae2fdf4f5f683d782f7..0cb2451a5c70c86b7828abdff32f5f83a8032ba8 100644 (file)
@@ -413,7 +413,7 @@ cba_pdev_find(packet_info *pinfo, const guint8 *ip, e_uuid_t *ipid)
 
     interf = dcom_interface_find(pinfo, ip, ipid);
     if (interf != NULL) {
-        pdev = interf->parent->private_data;
+        pdev = (cba_pdev_t *)interf->parent->private_data;
         if (pdev == NULL) {
             expert_add_info_format(pinfo, NULL, PI_UNDECODED, PI_NOTE, "pdev_find: no pdev for IP:%s IPID:%s",
                 ip_to_str(ip), guids_resolve_uuid_to_str(ipid));
@@ -437,14 +437,14 @@ cba_pdev_add(packet_info *pinfo, const guint8 *ip)
 
     /* find pdev */
     for(cba_iter = cba_pdevs; cba_iter != NULL; cba_iter = g_list_next(cba_iter)) {
-        pdev = cba_iter->data;
+        pdev = (cba_pdev_t *)cba_iter->data;
         if (memcmp(pdev->ip, ip, 4) == 0) {
             return pdev;
         }
     }
 
     /* not found, create a new */
-    pdev = se_alloc(sizeof(cba_pdev_t));
+    pdev = (cba_pdev_t *)se_alloc(sizeof(cba_pdev_t));
     memcpy( (void *) (pdev->ip), ip, 4);
     pdev->first_packet = pinfo->fd->num;
     pdev->ldevs        = NULL;
@@ -503,14 +503,14 @@ cba_ldev_add(packet_info *pinfo, cba_pdev_t *pdev, const char *name)
 
     /* find ldev */
     for(cba_iter = pdev->ldevs; cba_iter != NULL; cba_iter = g_list_next(cba_iter)) {
-        ldev = cba_iter->data;
+        ldev = (cba_ldev_t *)cba_iter->data;
         if (strcmp(ldev->name, name) == 0) {
             return ldev;
         }
     }
 
     /* not found, create a new */
-    ldev = se_alloc(sizeof(cba_ldev_t));
+    ldev = (cba_ldev_t *)se_alloc(sizeof(cba_ldev_t));
     ldev->name         = se_strdup(name);
     ldev->first_packet = pinfo->fd->num;
     ldev->ldev_object  = NULL;
@@ -529,26 +529,26 @@ cba_ldev_add(packet_info *pinfo, cba_pdev_t *pdev, const char *name)
 
 
 cba_ldev_t *
-cba_ldev_find(packet_info *pinfo, const guint8 *ip, e_uuid_t *ipid) {
+cba_ldev_find(packet_info *pinfo, const void *ip, e_uuid_t *ipid) {
     /*dcerpc_info *info = (dcerpc_info *)pinfo->private_data;*/
     dcom_interface_t *interf;
     cba_ldev_t       *ldev;
 
 
-    interf = dcom_interface_find(pinfo, ip, ipid);
+    interf = dcom_interface_find(pinfo, (const guint8 *)ip, ipid);
     if (interf != NULL) {
-        ldev = interf->private_data;
+        ldev = (cba_ldev_t *)interf->private_data;
 
         if (ldev == NULL) {
-            ldev = interf->parent->private_data;
+            ldev = (cba_ldev_t *)interf->parent->private_data;
         }
         if (ldev == NULL) {
             expert_add_info_format(pinfo, NULL, PI_UNDECODED, PI_NOTE, "Unknown LDev of %s",
-                ip_to_str(ip));
+                ip_to_str((const guint8 *)ip));
         }
     } else {
         expert_add_info_format(pinfo, NULL, PI_UNDECODED, PI_NOTE, "Unknown IPID of %s",
-            ip_to_str(ip));
+            ip_to_str((const guint8 *)ip));
         ldev = NULL;
     }
 
@@ -677,7 +677,7 @@ cba_frame_connect(packet_info *pinfo, cba_ldev_t *cons_ldev, cba_ldev_t *prov_ld
 
     /* find frame */
     for(cba_iter = cons_ldev->consframes; cba_iter != NULL; cba_iter = g_list_next(cba_iter)) {
-        frame = cba_iter->data;
+        frame = (cba_frame_t *)cba_iter->data;
         if ( frame->conscrid == conscrid &&
             memcmp(frame->consmac, consmac, 6) == 0 &&
             cba_packet_in_range(pinfo, frame->packet_connect, frame->packet_disconnect, frame->packet_disconnectme)) {
@@ -685,7 +685,7 @@ cba_frame_connect(packet_info *pinfo, cba_ldev_t *cons_ldev, cba_ldev_t *prov_ld
         }
     }
 
-    frame = se_alloc(sizeof(cba_frame_t));
+    frame = (cba_frame_t *)se_alloc(sizeof(cba_frame_t));
 
     frame->consparent          = cons_ldev;
     frame->provparent          = prov_ldev;
@@ -738,7 +738,7 @@ cba_frame_disconnectme(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, cba_
 
 
     for(frames = cons_ldev->consframes; frames != NULL; frames = g_list_next(frames)) {
-        frame = frames->data;
+        frame = (cba_frame_t *)frames->data;
 
         if ( frame->provparent == prov_ldev &&
             cba_packet_in_range(pinfo, frame->packet_connect, frame->packet_disconnect, frame->packet_disconnectme)) {
@@ -771,15 +771,15 @@ cba_frame_find_by_cons(packet_info *pinfo, const guint8 *consmac, guint16 conscr
 
     /* find pdev */
     for(pdevs = cba_pdevs; pdevs != NULL; pdevs = g_list_next(pdevs)) {
-        pdev = pdevs->data;
+        pdev = (cba_pdev_t *)pdevs->data;
 
         /* find ldev */
         for(ldevs = pdev->ldevs; ldevs != NULL; ldevs = g_list_next(ldevs)) {
-            ldev = ldevs->data;
+            ldev = (cba_ldev_t *)ldevs->data;
 
             /* find frame */
             for(frames = ldev->consframes; frames != NULL; frames = g_list_next(frames)) {
-                frame = frames->data;
+                frame = (cba_frame_t *)frames->data;
 
                 if ( frame->conscrid == conscrid &&
                     memcmp(frame->consmac, consmac, 6) == 0 &&
@@ -806,7 +806,7 @@ cba_frame_find_by_provcrid(packet_info *pinfo, cba_ldev_t *prov_ldev, guint32 pr
     }
 
     for(frames = prov_ldev->provframes; frames != NULL; frames = g_list_next(frames)) {
-        frame = frames->data;
+        frame = (cba_frame_t *)frames->data;
 
         if ( frame->provcrid == provcrid &&
             cba_packet_in_range(pinfo, frame->packet_connect, frame->packet_disconnect, frame->packet_disconnectme)) {
@@ -903,7 +903,7 @@ cba_connection_connect(packet_info *pinfo, cba_ldev_t *cons_ldev, cba_ldev_t *pr
     if (cons_frame != NULL) {
         /* SRT: search in frame */
         for(cba_iter = cons_frame->conns; cba_iter != NULL; cba_iter = g_list_next(cba_iter)) {
-            conn = cba_iter->data;
+            conn = (cba_connection_t *)cba_iter->data;
             if (conn->consid == consid) {
                 return conn;
             }
@@ -911,7 +911,7 @@ cba_connection_connect(packet_info *pinfo, cba_ldev_t *cons_ldev, cba_ldev_t *pr
     } else {
         /* DCOM: search in ldev */
         for(cba_iter = cons_ldev->consconns; cba_iter != NULL; cba_iter = g_list_next(cba_iter)) {
-            conn = cba_iter->data;
+            conn = (cba_connection_t *)cba_iter->data;
             if ( conn->consid == consid &&
                 cba_packet_in_range(pinfo, conn->packet_connect, conn->packet_disconnect, conn->packet_disconnectme)) {
                 return conn;
@@ -919,7 +919,7 @@ cba_connection_connect(packet_info *pinfo, cba_ldev_t *cons_ldev, cba_ldev_t *pr
         }
     }
 
-    conn = se_alloc(sizeof(cba_connection_t));
+    conn = (cba_connection_t *)se_alloc(sizeof(cba_connection_t));
 
     conn->consparentacco      = cons_ldev;
     conn->provparentacco      = prov_ldev;
@@ -980,7 +980,7 @@ cba_connection_disconnectme(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 
 
     for(conns = cons_ldev->consconns; conns != NULL; conns = g_list_next(conns)) {
-        conn = conns->data;
+        conn = (cba_connection_t *)conns->data;
 
         if ( conn->provparentacco == prov_ldev &&
             cba_packet_in_range(pinfo, conn->packet_connect, conn->packet_disconnect, conn->packet_disconnectme)) {
@@ -1008,7 +1008,7 @@ cba_connection_find_by_provid(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree
 
 
     for(cba_iter = prov_ldev->provconns; cba_iter != NULL; cba_iter = g_list_next(cba_iter)) {
-        conn = cba_iter->data;
+        conn = (cba_connection_t *)cba_iter->data;
         if ( conn->provid == provid &&
             cba_packet_in_range(pinfo, conn->packet_connect, conn->packet_disconnect, conn->packet_disconnectme)) {
             return conn;
@@ -1279,7 +1279,7 @@ dissect_ICBAAccoServer_Connect_rqst(tvbuff_t *tvb, int offset,
 
     /* link connections infos to the call */
     if (prov_ldev != NULL && cons_ldev != NULL) {
-        call = se_alloc(sizeof(server_connect_call_t) + u32ArraySize * sizeof(cba_connection_t *));
+        call = (server_connect_call_t *)se_alloc(sizeof(server_connect_call_t) + u32ArraySize * sizeof(cba_connection_t *));
         call->conn_count = 0;
         call->frame      = NULL;
         call->conns      = (cba_connection_t **) (call+1);
@@ -1328,7 +1328,7 @@ dissect_ICBAAccoServer_Connect_rqst(tvbuff_t *tvb, int offset,
             conn = cba_connection_connect(pinfo, cons_ldev, prov_ldev, /*cons_frame*/ NULL,
                 u16QoSType, u16QoSValue, szItem, u32ConsID, 0,
                 /* XXX - VarType must be translated to new type description if it includes an array (0x2000) */
-                se_memdup(&u16VarType, 2), 1);
+                (guint16 *)se_memdup(&u16VarType, 2), 1);
 
             cba_connection_info(tvb, pinfo, sub_tree, conn);
         } else {
@@ -1439,7 +1439,7 @@ dissect_ICBAAccoServer2_Connect2_rqst(tvbuff_t *tvb, int offset,
 
     /* link connection infos to the call */
     if (prov_ldev != NULL && cons_ldev != NULL) {
-        call = se_alloc(sizeof(server_connect_call_t) + u32ArraySize * sizeof(cba_connection_t *));
+        call = (server_connect_call_t *)se_alloc(sizeof(server_connect_call_t) + u32ArraySize * sizeof(cba_connection_t *));
         call->conn_count = 0;
         call->frame      = NULL;
         call->conns      = (cba_connection_t **) (call+1);
@@ -1481,7 +1481,7 @@ dissect_ICBAAccoServer2_Connect2_rqst(tvbuff_t *tvb, int offset,
 
             /* limit the allocation to a reasonable size */
             if (u32ArraySize2 < 1000) {
-                typedesc = se_alloc0(u32ArraySize2 * 2);
+                typedesc = (guint16 *)se_alloc0(u32ArraySize2 * 2);
                 typedesclen = u32ArraySize2;
             } else {
                 typedesc = NULL;
@@ -1566,7 +1566,7 @@ dissect_ICBAAccoServer_Connect_resp(tvbuff_t *tvb, int offset,
     proto_item  *item;
     dcerpc_info *info         = (dcerpc_info *)pinfo->private_data;
     cba_connection_t *conn;
-    server_connect_call_t *call = info->call_data->private_data;
+    server_connect_call_t *call = (server_connect_call_t *)info->call_data->private_data;
 
 
     offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
@@ -1675,7 +1675,7 @@ dissect_ICBAAccoServer_Disconnect_rqst(tvbuff_t *tvb, int offset,
 
     /* link connection infos to the call */
     if (prov_ldev != NULL) {
-        call = se_alloc(sizeof(server_connect_call_t) + u32ArraySize * sizeof(cba_connection_t *));
+        call = (server_connect_call_t *)se_alloc(sizeof(server_connect_call_t) + u32ArraySize * sizeof(cba_connection_t *));
         call->conn_count = 0;
         call->frame      = NULL;
         call->conns      = (cba_connection_t **) (call+1);
@@ -1720,7 +1720,7 @@ dissect_ICBAAccoServer_Disconnect_resp(tvbuff_t *tvb, int offset,
     proto_item  *item;
     dcerpc_info *info = (dcerpc_info *)pinfo->private_data;
     cba_connection_t *conn;
-    server_connect_call_t *call = info->call_data->private_data;
+    server_connect_call_t *call = (server_connect_call_t *)info->call_data->private_data;
 
 
     offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
@@ -1836,7 +1836,7 @@ dissect_ICBAAccoServer_DisconnectMe_rqst(tvbuff_t *tvb, int offset,
     cons_ldev = cba_acco_add(pinfo, szStr);
 
     if (prov_ldev != NULL && cons_ldev != NULL) {
-        call = se_alloc(sizeof(server_disconnectme_call_t));
+        call = (server_disconnectme_call_t *)se_alloc(sizeof(server_disconnectme_call_t));
         call->cons = cons_ldev;
         call->prov = prov_ldev;
         info->call_data->private_data = call;
@@ -1868,7 +1868,7 @@ dissect_ICBAAccoServer_DisconnectMe_resp(tvbuff_t *tvb, int offset,
     offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
                     &u32HResult);
 
-    call = info->call_data->private_data;
+    call = (server_disconnectme_call_t *)info->call_data->private_data;
     if (call) {
         cba_connection_disconnectme(tvb, pinfo, tree, call->cons, call->prov);
     }
@@ -1909,7 +1909,7 @@ dissect_ICBAAccoServerSRT_DisconnectMe_rqst(tvbuff_t *tvb, int offset,
     cons_ldev = cba_acco_add(pinfo, szStr);
 
     if (prov_ldev != NULL && cons_ldev != NULL) {
-        call = se_alloc(sizeof(server_disconnectme_call_t));
+        call = (server_disconnectme_call_t *)se_alloc(sizeof(server_disconnectme_call_t));
         call->cons = cons_ldev;
         call->prov = prov_ldev;
         info->call_data->private_data = call;
@@ -1941,7 +1941,7 @@ dissect_ICBAAccoServerSRT_DisconnectMe_resp(tvbuff_t *tvb, int offset,
     offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
                     &u32HResult);
 
-    call = info->call_data->private_data;
+    call = (server_disconnectme_call_t *)info->call_data->private_data;
     if (call) {
         cba_frame_disconnectme(tvb, pinfo, tree, call->cons, call->prov);
     }
@@ -2172,7 +2172,7 @@ dissect_ICBAAccoServerSRT_ConnectCR_rqst(tvbuff_t *tvb, int offset,
 
     /* link frame infos to the call */
     if (prov_ldev != NULL && cons_ldev != NULL && u32ArraySize < 100) {
-        call = se_alloc(sizeof(server_frame_call_t) + u32ArraySize * sizeof(cba_frame_t *));
+        call = (server_frame_call_t *)se_alloc(sizeof(server_frame_call_t) + u32ArraySize * sizeof(cba_frame_t *));
         call->frame_count = 0;
         call->frames = (cba_frame_t **) (call+1);
         info->call_data->private_data = call;
@@ -2243,7 +2243,7 @@ dissect_ICBAAccoServerSRT_ConnectCR_resp(tvbuff_t *tvb, int offset,
     proto_item  *item;
     cba_frame_t *frame;
     dcerpc_info *info        = (dcerpc_info *)pinfo->private_data;
-    server_frame_call_t *call = info->call_data->private_data;
+    server_frame_call_t *call = (server_frame_call_t *)info->call_data->private_data;
 
 
     offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
@@ -2361,7 +2361,7 @@ dissect_ICBAAccoServerSRT_DisconnectCR_rqst(tvbuff_t *tvb, int offset,
 
     /* link frame infos to the call */
     if (prov_ldev != NULL) {
-        call = se_alloc(sizeof(server_frame_call_t) + u32ArraySize * sizeof(cba_frame_t *));
+        call = (server_frame_call_t *)se_alloc(sizeof(server_frame_call_t) + u32ArraySize * sizeof(cba_frame_t *));
         call->frame_count = 0;
         call->frames      = (cba_frame_t **) (call+1);
         info->call_data->private_data = call;
@@ -2404,7 +2404,7 @@ dissect_ICBAAccoServerSRT_DisconnectCR_resp(tvbuff_t *tvb, int offset,
     cba_frame_t *frame;
     proto_item  *item;
     dcerpc_info *info         = (dcerpc_info *)pinfo->private_data;
-    server_frame_call_t *call = info->call_data->private_data;
+    server_frame_call_t *call = (server_frame_call_t *)info->call_data->private_data;
 
 
     offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
@@ -2514,7 +2514,7 @@ dissect_ICBAAccoServerSRT_Connect_rqst(tvbuff_t *tvb, int offset,
 
     /* link connections infos to the call */
     if (frame != NULL) {
-        call = se_alloc(sizeof(server_connect_call_t) + u32ArraySize * sizeof(cba_connection_t *));
+        call = (server_connect_call_t *)se_alloc(sizeof(server_connect_call_t) + u32ArraySize * sizeof(cba_connection_t *));
         call->conn_count = 0;
         call->frame = frame;
         call->conns = (cba_connection_t **) (call+1);
@@ -2554,7 +2554,7 @@ dissect_ICBAAccoServerSRT_Connect_rqst(tvbuff_t *tvb, int offset,
             u32VariableOffset = dissect_dcom_dcerpc_array_size(tvb, u32VariableOffset, pinfo, sub_tree, drep,
                                 &u32ArraySize2);
 
-            typedesc = se_alloc0(u32ArraySize2 * 2);
+            typedesc = (guint16 *)se_alloc0(u32ArraySize2 * 2);
             typedesclen = u32ArraySize2;
 
             /* extended type description will build an array here */
@@ -2635,7 +2635,7 @@ dissect_ICBAAccoServerSRT_Connect_resp(tvbuff_t *tvb, int offset,
     proto_item  *item;
     dcerpc_info *info = (dcerpc_info *)pinfo->private_data;
 
-    server_connect_call_t *call = info->call_data->private_data;
+    server_connect_call_t *call = (server_connect_call_t *)info->call_data->private_data;
     cba_connection_t      *conn;
 
 
@@ -3112,7 +3112,7 @@ dissect_CBA_Connection_Data(tvbuff_t *tvb,
             /* XXX - expensive! */
             cba_frame_incoming_data(tvb, pinfo, sub_tree, frame);
             for(conns = frame->conns; conns != NULL; conns = g_list_next(conns)) {
-                conn = conns->data;
+                conn = (cba_connection_t *)conns->data;
                 if (conn->frame_offset == item_offset) {
                     cba_connection_info(tvb, pinfo, sub_tree, conn);
                     break;
@@ -3123,7 +3123,7 @@ dissect_CBA_Connection_Data(tvbuff_t *tvb,
             /* XXX - expensive! */
             if (cons_ldev != NULL) {
                 for(conns = cons_ldev->consconns; conns != NULL; conns = g_list_next(conns)) {
-                    conn = conns->data;
+                    conn = (cba_connection_t *)conns->data;
                     if (conn->consid == u32ID) {
                         cba_connection_info(tvb, pinfo, sub_tree, conn);
                         cba_connection_incoming_data(tvb, pinfo, sub_tree, conn);
@@ -3181,7 +3181,7 @@ dissect_CBA_Connection_Data_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
 
         col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-CBA");
 
-    frame = cba_frame_find_by_cons(pinfo, pinfo->dl_dst.data, u16FrameID);
+    frame = cba_frame_find_by_cons(pinfo, (const guint8 *)pinfo->dl_dst.data, u16FrameID);
 
     dissect_CBA_Connection_Data(tvb, pinfo, tree, frame ? frame->consparent : NULL, frame);
 
@@ -3318,7 +3318,7 @@ dissect_ICBAAccoServer2_GetConnectionData_rqst(tvbuff_t *tvb, int offset,
 
     /* link ldev to the call */
     if (cons_ldev != NULL) {
-        call = se_alloc(sizeof(cba_ldev_t *));
+        call = (cba_ldev_t **)se_alloc(sizeof(cba_ldev_t *));
         *call = cons_ldev;
         info->call_data->private_data = call;
     }
@@ -3341,7 +3341,7 @@ dissect_ICBAAccoServer2_GetConnectionData_resp(tvbuff_t *tvb, int offset,
     guint32       u32HResult;
     proto_item   *item;
     dcerpc_info  *info      = (dcerpc_info *)pinfo->private_data;
-    cba_ldev_t  **call      = info->call_data->private_data;
+    cba_ldev_t  **call      = (cba_ldev_t **)info->call_data->private_data;
     cba_ldev_t   *cons_ldev = (call!=NULL) ? *call : NULL;
 
 
index 2d9dc888d35399eb6df30905422c4e4e4f4b9e72..80c8eac8e498a12acfb68ed8caf32b6b8e10e87e 100644 (file)
@@ -65,7 +65,7 @@ extern void
 cba_ldev_link_acco(packet_info *pinfo, cba_ldev_t *ldev, dcom_interface_t *acco_interf);
 
 extern cba_ldev_t *
-cba_ldev_find(packet_info *pinfo, const guint8 *ip, e_uuid_t *ipid);
+cba_ldev_find(packet_info *pinfo, const void *ip, e_uuid_t *ipid);
 
 extern cba_ldev_t *
 cba_ldev_add(packet_info *pinfo, cba_pdev_t *pdev, const char *name);
index 5e4fdd3add3bb7493086fb742ef41d904197e39e..b44caed1fe5ffc0cfb35e22d9b26332f45ec8edb 100644 (file)
@@ -585,7 +585,7 @@ dissect_ICBAPhysicalDevice_get_LogicalDevice_resp(tvbuff_t *tvb, int offset,
 {
     guint32           u32HResult;
     dcerpc_info      *info      = (dcerpc_info *) pinfo->private_data;
-    gchar            *ldev_name = info->call_data->private_data;
+    gchar            *ldev_name = (gchar *)info->call_data->private_data;
     dcom_interface_t *pdev_interf;
     dcom_interface_t *ldev_interf;
     cba_pdev_t       *pdev;
@@ -600,9 +600,9 @@ dissect_ICBAPhysicalDevice_get_LogicalDevice_resp(tvbuff_t *tvb, int offset,
     if (ldev_name != NULL && ldev_interf != NULL) {
         /* XXX - this is a hack to create a pdev interface */
         /* as I currently don't understand the objref process for a root interface! */
-        pdev_interf = dcom_interface_new(pinfo, pinfo->net_dst.data, &uuid_ICBAPhysicalDevice, 0, 0, &info->call_data->object_uuid);
+        pdev_interf = dcom_interface_new(pinfo, (const guint8 *)pinfo->net_dst.data, &uuid_ICBAPhysicalDevice, 0, 0, &info->call_data->object_uuid);
         if (pdev_interf != NULL) {
-            pdev = cba_pdev_add(pinfo, pinfo->net_dst.data);
+            pdev = cba_pdev_add(pinfo, (const guint8 *)pinfo->net_dst.data);
             cba_pdev_link(pinfo, pdev, pdev_interf);
 
             ldev = cba_ldev_add(pinfo, pdev, ldev_name);
index 1b240b82dc687d524fc10b2e2bd88f970fc27e72..b05fcedcd4265d144d2f0da43dc6161712baa294 100644 (file)
@@ -465,7 +465,7 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
     switch (suboption) {
     case PNDCP_SUBOPTION_DEVICE_MANUF:
-        typeofstation = ep_alloc(block_length+1);
+        typeofstation = (char *)ep_alloc(block_length+1);
         tvb_memcpy(tvb, (guint8 *) typeofstation, offset, block_length);
         typeofstation[block_length] = '\0';
         proto_tree_add_string (tree, hf_pn_dcp_suboption_device_typeofstation, tvb, offset, block_length, typeofstation);
@@ -483,7 +483,7 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
         offset += block_length;
         break;
     case PNDCP_SUBOPTION_DEVICE_NAMEOFSTATION:
-        nameofstation = ep_alloc(block_length+1);
+        nameofstation = (char *)ep_alloc(block_length+1);
         tvb_memcpy(tvb, (guint8 *) nameofstation, offset, block_length);
         nameofstation[block_length] = '\0';
         proto_tree_add_string (tree, hf_pn_dcp_suboption_device_nameofstation, tvb, offset, block_length, nameofstation);
@@ -554,7 +554,7 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
         }
         break;
     case PNDCP_SUBOPTION_DEVICE_ALIAS_NAME:
-        aliasname = ep_alloc(block_length+1);
+        aliasname = (char *)ep_alloc(block_length+1);
         tvb_memcpy(tvb, (guint8 *) aliasname, offset, block_length);
         aliasname[block_length] = '\0';
         proto_tree_add_string (tree, hf_pn_dcp_suboption_device_aliasname, tvb, offset, block_length, aliasname);
index fc936b2a88c4efb0926a00421341a46483a97675..11cced6b27f76a74bf70c2b4c77740dd391ab998 100644 (file)
@@ -441,7 +441,7 @@ dissect_FRAG_PDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
             }
             if (!bMoreFollows) /* last fragment */
             {
-                pdu_frag = g_hash_table_lookup(reasembled_frag_table, GUINT_TO_POINTER(pinfo->fd->num));
+                pdu_frag = (fragment_data *)g_hash_table_lookup(reasembled_frag_table, GUINT_TO_POINTER(pinfo->fd->num));
                 if (pdu_frag)    /* found a matching frag dissect it */
                 {
                     guint16   type;