summaryrefslogtreecommitdiff
path: root/asn1
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-18 20:44:36 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-18 20:44:36 +0000
commit84241f46ada962c7b4b9b3cf0f1be134ee99b00c (patch)
tree3108e864be7f7c06df5331f7431cd67f2aee39be /asn1
parent81700ec3e08712eef97596828ea054c78af75a41 (diff)
downloadwireshark-84241f46ada962c7b4b9b3cf0f1be134ee99b00c.tar.gz
From beroset:
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48399
Diffstat (limited to 'asn1')
-rw-r--r--asn1/nbap/nbap.cnf22
-rw-r--r--asn1/nbap/packet-nbap-template.c2
-rw-r--r--asn1/ros/packet-ros-template.c24
3 files changed, 24 insertions, 24 deletions
diff --git a/asn1/nbap/nbap.cnf b/asn1/nbap/nbap.cnf
index ea4a7d53b8..9ef0e9f1d2 100644
--- a/asn1/nbap/nbap.cnf
+++ b/asn1/nbap/nbap.cnf
@@ -1295,7 +1295,7 @@ BindingID_port = 0;
umts_fp_conversation_info->com_context_id = com_context_id;
}else{
nbap_com_context_id_t *cur_val;
- if((cur_val=g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) != NULL){
+ if((cur_val=(nbap_com_context_id_t *)g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) != NULL){
umts_fp_conversation_info->com_context_id = cur_val->crnc_context;
}else{
expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Couldn't not set Communication Context-ID, fragments over reconfigured channels might fail");
@@ -1304,10 +1304,10 @@ BindingID_port = 0;
/* Check if we allready have this context */
- if( (old_info = g_tree_lookup(edch_flow_port_map, GINT_TO_POINTER((gint)com_context_id))) == NULL ){
+ if( (old_info = (nbap_edch_port_info_t *)g_tree_lookup(edch_flow_port_map, GINT_TO_POINTER((gint)com_context_id))) == NULL ){
nbap_edch_port_info_t * nbap_edch_port_info;
- nbap_edch_port_info = g_malloc0(sizeof(nbap_edch_port_info_t));
+ nbap_edch_port_info = (nbap_edch_port_info_t *)g_malloc0(sizeof(nbap_edch_port_info_t));
/*Saving port/flow map based on context id for future reconfigurations*/
nbap_edch_port_info->crnc_port[e_dch_macdflow_id] = BindingID_port;
@@ -1368,7 +1368,7 @@ guint32 no_ddi_entries, i;
if(!p_conv)
return offset;
- p_conv_data = conversation_get_proto_data(p_conv, proto_fp);
+ p_conv_data = (umts_fp_conversation_info_t *)conversation_get_proto_data(p_conv, proto_fp);
if(!p_conv_data)
return offset;
@@ -1469,7 +1469,7 @@ BindingID_port = 0;
umts_fp_conversation_info->com_context_id = com_context_id;
}else{
nbap_com_context_id_t * cur_val;
- if((cur_val=g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) != NULL){
+ if((cur_val=(nbap_com_context_id_t *)g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) != NULL){
umts_fp_conversation_info->com_context_id = cur_val->crnc_context;
}else{
expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Couldn't not set Communication Context-ID, fragments over reconfigured channels might fail");
@@ -1513,7 +1513,7 @@ num_items = 1;
/*umts_fp_conversation_info->com_context_id = com_context_id;*/
}else{
nbap_com_context_id_t * cur_val;
- if((cur_val=g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) != NULL){
+ if((cur_val=(nbap_com_context_id_t *)g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) != NULL){
com_context_id= cur_val->crnc_context;
}else{
expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Couldn't not find Communication Context-ID, unable to reconfigure this E-DCH flow.");
@@ -1521,7 +1521,7 @@ num_items = 1;
}
/*This should not happen*/
- if( (old_info = g_tree_lookup(edch_flow_port_map, GINT_TO_POINTER((gint)com_context_id))) == NULL ){
+ if(( old_info = (nbap_edch_port_info_t *)g_tree_lookup(edch_flow_port_map, GINT_TO_POINTER((gint)com_context_id))) == NULL ){
expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Couldn't not find port information for reconfigured E-DCH flow, unable to reconfigure");
return offset;
}
@@ -1546,7 +1546,7 @@ num_items = 1;
if(!p_conv)
return offset;
- p_conv_data = conversation_get_proto_data(p_conv, proto_fp);
+ p_conv_data = (umts_fp_conversation_info_t *)conversation_get_proto_data(p_conv, proto_fp);
if(!p_conv_data)
return offset;
@@ -1823,7 +1823,7 @@ nbap_edch_channel_info[e_dch_macdflow_id].no_ddi_entries = num_items;
umts_fp_conversation_info->hsdsch_entity = hs;
}
}else{
- umts_fp_conversation_info->hsdsch_entity = nbap_hsdsch_channel_info[i].entity;
+ umts_fp_conversation_info->hsdsch_entity = (enum fp_hsdsch_entity)nbap_hsdsch_channel_info[i].entity;
}
umts_fp_conversation_info->rlc_mode = nbap_hsdsch_channel_info[i].rlc_mode;
set_umts_fp_conv_data(conversation, umts_fp_conversation_info);
@@ -1940,7 +1940,7 @@ nbap_edch_channel_info[e_dch_macdflow_id].no_ddi_entries = num_items;
umts_fp_conversation_info->hsdsch_entity = hs;
}
}else{
- umts_fp_conversation_info->hsdsch_entity = nbap_hsdsch_channel_info[i].entity;
+ umts_fp_conversation_info->hsdsch_entity = (enum fp_hsdsch_entity)nbap_hsdsch_channel_info[i].entity;
}
umts_fp_conversation_info->rlc_mode = nbap_hsdsch_channel_info[i].rlc_mode;
@@ -2088,7 +2088,7 @@ nbap_com_context_id_t *cur_val;
/*If both are avaible we can update the map*/
if(crcn_context_present){
- if( (cur_val=g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) == NULL ){
+ if( (cur_val=(nbap_com_context_id_t *)g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) == NULL ){
cur_val = g_new(nbap_com_context_id_t,1);
cur_val->crnc_context = com_context_id;
diff --git a/asn1/nbap/packet-nbap-template.c b/asn1/nbap/packet-nbap-template.c
index 78cb6778cc..7016f3fd68 100644
--- a/asn1/nbap/packet-nbap-template.c
+++ b/asn1/nbap/packet-nbap-template.c
@@ -394,7 +394,7 @@ static void add_hsdsch_bind(packet_info *pinfo, proto_tree * tree){
/*Error*/
expert_add_info_format(pinfo, tree, PI_MALFORMED,PI_ERROR, "HSDSCH Entity not specified!");
}else{
- umts_fp_conversation_info->hsdsch_entity = nbap_hsdsch_channel_info[i].entity;
+ umts_fp_conversation_info->hsdsch_entity = (enum fp_hsdsch_entity)nbap_hsdsch_channel_info[i].entity;
}
umts_fp_conversation_info->rlc_mode = nbap_hsdsch_channel_info[i].rlc_mode;
set_umts_fp_conv_data(conversation, umts_fp_conversation_info);
diff --git a/asn1/ros/packet-ros-template.c b/asn1/ros/packet-ros-template.c
index ea608ca75f..96c1f82d76 100644
--- a/asn1/ros/packet-ros-template.c
+++ b/asn1/ros/packet-ros-template.c
@@ -232,7 +232,7 @@ call_ros_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *p
static guint
ros_info_hash_matched(gconstpointer k)
{
- const ros_call_response_t *key = k;
+ const ros_call_response_t *key = (const ros_call_response_t *)k;
return key->invokeId;
}
@@ -240,8 +240,8 @@ ros_info_hash_matched(gconstpointer k)
static gint
ros_info_equal_matched(gconstpointer k1, gconstpointer k2)
{
- const ros_call_response_t *key1 = k1;
- const ros_call_response_t *key2 = k2;
+ const ros_call_response_t *key1 = (const ros_call_response_t *)k1;
+ const ros_call_response_t *key2 = (const ros_call_response_t *)k2;
if( key1->req_frame && key2->req_frame && (key1->req_frame!=key2->req_frame) ){
return 0;
@@ -258,7 +258,7 @@ ros_info_equal_matched(gconstpointer k1, gconstpointer k2)
static guint
ros_info_hash_unmatched(gconstpointer k)
{
- const ros_call_response_t *key = k;
+ const ros_call_response_t *key = (const ros_call_response_t *)k;
return key->invokeId;
}
@@ -266,8 +266,8 @@ ros_info_hash_unmatched(gconstpointer k)
static gint
ros_info_equal_unmatched(gconstpointer k1, gconstpointer k2)
{
- const ros_call_response_t *key1 = k1;
- const ros_call_response_t *key2 = k2;
+ const ros_call_response_t *key1 = (const ros_call_response_t *)k1;
+ const ros_call_response_t *key2 = (const ros_call_response_t *)k2;
return key1->invokeId==key2->invokeId;
}
@@ -291,7 +291,7 @@ ros_match_call_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
rcr.rep_frame=pinfo->fd->num;
}
- rcrp=g_hash_table_lookup(ros_info->matched, &rcr);
+ rcrp=(ros_call_response_t *)g_hash_table_lookup(ros_info->matched, &rcr);
if(rcrp) {
/* we have found a match */
@@ -309,7 +309,7 @@ ros_match_call_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
rcr.invokeId=invokeId;
- rcrp=g_hash_table_lookup(ros_info->unmatched, &rcr);
+ rcrp=(ros_call_response_t *)g_hash_table_lookup(ros_info->unmatched, &rcr);
if(rcrp){
g_hash_table_remove(ros_info->unmatched, rcrp);
@@ -317,7 +317,7 @@ ros_match_call_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
/* if we cant reuse the old one, grab a new chunk */
if(!rcrp){
- rcrp=se_alloc(sizeof(ros_call_response_t));
+ rcrp=se_new(ros_call_response_t);
}
rcrp->invokeId=invokeId;
rcrp->req_frame=pinfo->fd->num;
@@ -332,7 +332,7 @@ ros_match_call_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
/* this is a result - it should be in our unmatched list */
rcr.invokeId=invokeId;
- rcrp=g_hash_table_lookup(ros_info->unmatched, &rcr);
+ rcrp=(ros_call_response_t *)g_hash_table_lookup(ros_info->unmatched, &rcr);
if(rcrp){
@@ -400,12 +400,12 @@ dissect_ros(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
/*
* Do we already have our info
*/
- ros_info = conversation_get_proto_data(conversation, proto_ros);
+ ros_info = (ros_conv_info_t *)conversation_get_proto_data(conversation, proto_ros);
if (ros_info == NULL) {
/* No. Attach that information to the conversation. */
- ros_info = g_malloc(sizeof(ros_conv_info_t));
+ ros_info = (ros_conv_info_t *)g_malloc(sizeof(ros_conv_info_t));
ros_info->matched=g_hash_table_new(ros_info_hash_matched, ros_info_equal_matched);
ros_info->unmatched=g_hash_table_new(ros_info_hash_unmatched, ros_info_equal_unmatched);