remove some warnings (2nd try)
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 1 Jul 2006 15:14:19 +0000 (15:14 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 1 Jul 2006 15:14:19 +0000 (15:14 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18635 f5534014-38df-0310-8fa8-9805f1628bb7

plugins/profinet/packet-dcerpc-pn-io.c
plugins/profinet/packet-pn-dcp.c

index 51c758053b9e956e6b18a3aaa28cdde069263043..86c947731d141c4bf03be8996531011a72160090 100644 (file)
@@ -1663,7 +1663,7 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
     guint8 u8NumberOfPeers;
     guint8 u8I;
     guint8 u8LengthPeerPortID;
-    guint8 *pPeerPortID;
+    char *pPeerPortID;
     guint8 u8LengthPeerChassisID;
     char *pPeerChassisID;
     guint32 u32PropagationDelayFactor;
@@ -1690,7 +1690,7 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
                         hf_pn_io_length_own_port_id, &u8LengthOwnPortID);
     /* OwnPortID */
     pOwnPortID = ep_alloc(u8LengthOwnPortID+1);
-    tvb_memcpy(tvb, pOwnPortID, offset, u8LengthOwnPortID);
+    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);
     offset += u8LengthOwnPortID;
@@ -1717,7 +1717,7 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
                             hf_pn_io_length_peer_port_id, &u8LengthPeerPortID);
         /* PeerPortID */
         pPeerPortID = ep_alloc(u8LengthPeerPortID+1);
-        tvb_memcpy(tvb, pPeerPortID, offset, u8LengthPeerPortID);
+        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);
         offset += u8LengthPeerPortID;
@@ -1727,7 +1727,7 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
                             hf_pn_io_length_peer_chassis_id, &u8LengthPeerChassisID);
         /* PeerChassisID */
         pPeerChassisID = ep_alloc(u8LengthPeerChassisID+1);
-        tvb_memcpy(tvb, pPeerChassisID, offset, u8LengthPeerChassisID);
+        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);
         offset += u8LengthPeerChassisID;
@@ -1956,7 +1956,7 @@ dissect_CheckPeers_block(tvbuff_t *tvb, int offset,
                             hf_pn_io_length_peer_port_id, &u8LengthPeerPortID);
         /* PeerPortID */
         pPeerPortID = ep_alloc(u8LengthPeerPortID+1);
-        tvb_memcpy(tvb, pPeerPortID, offset, u8LengthPeerPortID);
+        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);
         offset += u8LengthPeerPortID;
@@ -1966,7 +1966,7 @@ dissect_CheckPeers_block(tvbuff_t *tvb, int offset,
                             hf_pn_io_length_peer_chassis_id, &u8LengthPeerChassisID);
         /* PeerChassisID */
         pPeerChassisID = ep_alloc(u8LengthPeerChassisID+1);
-        tvb_memcpy(tvb, pPeerChassisID, offset, u8LengthPeerChassisID);
+        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);
         offset += u8LengthPeerChassisID;
@@ -2245,7 +2245,7 @@ dissect_ARBlockReq(tvbuff_t *tvb, int offset,
                         hf_pn_io_station_name_length, &u16NameLength);
 
     pStationName = ep_alloc(u16NameLength+1);
-    tvb_memcpy(tvb, pStationName, offset, u16NameLength);
+    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);
     offset += u16NameLength;
@@ -2578,7 +2578,7 @@ dissect_MCRBlockReq(tvbuff_t *tvb, int offset,
                         hf_pn_io_station_name_length, &u16NameLength);
 
     pStationName = ep_alloc(u16NameLength+1);
-    tvb_memcpy(tvb, pStationName, offset, u16NameLength);
+    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);
     offset += u16NameLength;    
index 43a01f993ad9177f5dba0d2281527bab492e1382..4eeb24642ab1f252caa2afdb310d1c30e8cb9499 100644 (file)
@@ -496,7 +496,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);
-        tvb_memcpy(tvb, typeofstation, offset, block_length);
+        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);
         pn_append_info(pinfo, dcp_item, ", TypeOfStation");
@@ -508,7 +508,7 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
         break;
     case(PNDCP_SUBOPTION_DEVICE_NAMEOFSTATION):
         nameofstation = ep_alloc(block_length+1);
-        tvb_memcpy(tvb, nameofstation, offset, block_length);
+        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);
         pn_append_info(pinfo, dcp_item, ", NameOfStation");