aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-06-04 13:52:46 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-06-04 13:52:46 +0000
commitb69547925ff7bdd87b52c73496ad7d356c6f115a (patch)
tree49f55080f639dc3217e81b3ef7a529109fbb374a /epan/dissectors
parent2a30b1eff977d00dd5d204d24a7f4f2745f14b0b (diff)
Get rid of a couple of warnings.
svn path=/trunk/; revision=43066
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-3g-a11.c2
-rw-r--r--epan/dissectors/packet-aarp.c2
-rw-r--r--epan/dissectors/packet-actrace.c4
-rw-r--r--epan/dissectors/packet-adwin.c4
-rw-r--r--epan/dissectors/packet-afp.c6
-rw-r--r--epan/dissectors/packet-afs.c4
-rw-r--r--epan/dissectors/packet-aim-chat.c8
-rw-r--r--epan/dissectors/packet-aim.c6
-rw-r--r--epan/dissectors/packet-ajp13.c4
-rw-r--r--epan/dissectors/packet-alcap.c24
10 files changed, 32 insertions, 32 deletions
diff --git a/epan/dissectors/packet-3g-a11.c b/epan/dissectors/packet-3g-a11.c
index df80b3a23a..e57ef27806 100644
--- a/epan/dissectors/packet-3g-a11.c
+++ b/epan/dissectors/packet-3g-a11.c
@@ -536,7 +536,7 @@ decode_sse(proto_tree *ext_tree, tvbuff_t *tvb, int offset, guint ext_len)
return;
}
- msid_digits = ep_alloc(A11_MSG_MSID_LEN_MAX+2);
+ msid_digits = (char *)ep_alloc(A11_MSG_MSID_LEN_MAX+2);
msid_start_offset = offset;
if (msid_len > A11_MSG_MSID_ELEM_LEN_MAX)
diff --git a/epan/dissectors/packet-aarp.c b/epan/dissectors/packet-aarp.c
index 761e8a7a9a..f4e56ec368 100644
--- a/epan/dissectors/packet-aarp.c
+++ b/epan/dissectors/packet-aarp.c
@@ -107,7 +107,7 @@ tvb_atalkid_to_str(tvbuff_t *tvb, gint offset)
gint node;
gchar *cur;
- cur=ep_alloc(16);
+ cur=(gchar *)ep_alloc(16);
node=tvb_get_guint8(tvb, offset)<<8|tvb_get_guint8(tvb, offset+1);
g_snprintf(cur, 16, "%d.%d",node,tvb_get_guint8(tvb, offset+2));
return cur;
diff --git a/epan/dissectors/packet-actrace.c b/epan/dissectors/packet-actrace.c
index b012589012..fd99868f17 100644
--- a/epan/dissectors/packet-actrace.c
+++ b/epan/dissectors/packet-actrace.c
@@ -637,7 +637,7 @@ static void dissect_actrace_cas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *a
if (frame_label != NULL) {
/* Initialise packet info for passing to tap */
- actrace_pi = ep_alloc(sizeof(actrace_info_t));
+ actrace_pi = ep_new(actrace_info_t);
actrace_pi->type = ACTRACE_CAS;
actrace_pi->direction = direction;
@@ -675,7 +675,7 @@ static void dissect_actrace_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
/* if it is a q931 packet (we don't want LAPD packets for Voip Graph) add tap info */
if (len > 4) {
/* Initialise packet info for passing to tap */
- actrace_pi = ep_alloc(sizeof(actrace_info_t));
+ actrace_pi = ep_new(actrace_info_t);
actrace_pi->type = ACTRACE_ISDN;
actrace_pi->direction = (value==PSTN_TO_BLADE?1:0);
diff --git a/epan/dissectors/packet-adwin.c b/epan/dissectors/packet-adwin.c
index facb1e4b6e..4bf088c98e 100644
--- a/epan/dissectors/packet-adwin.c
+++ b/epan/dissectors/packet-adwin.c
@@ -569,11 +569,11 @@ adwin_request_response_handling(tvbuff_t *tvb, packet_info *pinfo,
}
}
} else {
- adwin_trans = se_tree_lookup32(adwin_info->pdus, seq_num);
+ adwin_trans = (adwin_transaction_t *)se_tree_lookup32(adwin_info->pdus, seq_num);
}
if (!adwin_trans) {
/* create a "fake" adwin_trans structure */
- adwin_trans = ep_alloc(sizeof(adwin_transaction_t));
+ adwin_trans = ep_new(adwin_transaction_t);
adwin_trans->req_frame = 0;
adwin_trans->rep_frame = 0;
adwin_trans->req_time = pinfo->fd->abs_ts;
diff --git a/epan/dissectors/packet-afp.c b/epan/dissectors/packet-afp.c
index 8f685b5d63..b236589e54 100644
--- a/epan/dissectors/packet-afp.c
+++ b/epan/dissectors/packet-afp.c
@@ -4779,7 +4779,7 @@ dissect_reply_afp_spotlight(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static void
dissect_afp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- struct aspinfo *aspinfo = pinfo->private_data;
+ struct aspinfo *aspinfo = (struct aspinfo*)pinfo->private_data;
proto_tree *afp_tree = NULL;
proto_item *ti;
conversation_t *conversation;
@@ -4804,10 +4804,10 @@ dissect_afp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (!request_val && !aspinfo->reply) {
afp_command = tvb_get_guint8(tvb, offset);
- new_request_key = se_alloc(sizeof(afp_request_key));
+ new_request_key = se_new(afp_request_key);
*new_request_key = request_key;
- request_val = se_alloc(sizeof(afp_request_val));
+ request_val = se_new(afp_request_val);
request_val->command = afp_command;
if (afp_command == AFP_SPOTLIGHTRPC)
diff --git a/epan/dissectors/packet-afs.c b/epan/dissectors/packet-afs.c
index 396cfd41b6..c7fc16bd46 100644
--- a/epan/dissectors/packet-afs.c
+++ b/epan/dissectors/packet-afs.c
@@ -1584,10 +1584,10 @@ dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
opcode = 0;
if(!pinfo->fd->flags.visited){
if ( !request_val && !reply) {
- new_request_key = se_alloc(sizeof(struct afs_request_key));
+ new_request_key = se_new(struct afs_request_key);
*new_request_key = request_key;
- request_val = se_alloc(sizeof(struct afs_request_val));
+ request_val = se_new(struct afs_request_val);
request_val -> opcode = tvb_get_ntohl(tvb, offset);
request_val -> req_num = pinfo->fd->num;
request_val -> rep_num = 0;
diff --git a/epan/dissectors/packet-aim-chat.c b/epan/dissectors/packet-aim-chat.c
index 0bba5cd626..8c2cd27fef 100644
--- a/epan/dissectors/packet-aim-chat.c
+++ b/epan/dissectors/packet-aim-chat.c
@@ -86,8 +86,8 @@ static int dissect_aim_chat_outgoing_msg(tvbuff_t *tvb, packet_info *pinfo, prot
guchar *msg;
int buddyname_length;
- buddyname=ep_alloc(MAX_BUDDYNAME_LENGTH+1);
- msg=ep_alloc(1000);
+ buddyname=(guchar *)ep_alloc(MAX_BUDDYNAME_LENGTH+1);
+ msg=(guchar *)ep_alloc(1000);
buddyname_length = aim_get_buddyname( buddyname, tvb, 30, 31 );
/* channel message from client */
@@ -107,8 +107,8 @@ static int dissect_aim_chat_incoming_msg(tvbuff_t *tvb, packet_info *pinfo, prot
/* channel message to client */
int buddyname_length;
- buddyname=ep_alloc(MAX_BUDDYNAME_LENGTH+1);
- msg=ep_alloc(1000);
+ buddyname=(guchar *)ep_alloc(MAX_BUDDYNAME_LENGTH+1);
+ msg=(guchar *)ep_alloc(1000);
buddyname_length = aim_get_buddyname( buddyname, tvb, 30, 31 );
aim_get_message( msg, tvb, 36 + buddyname_length, tvb_length(tvb)
diff --git a/epan/dissectors/packet-aim.c b/epan/dissectors/packet-aim.c
index 151f902ab8..877ed9282a 100644
--- a/epan/dissectors/packet-aim.c
+++ b/epan/dissectors/packet-aim.c
@@ -469,7 +469,7 @@ const aim_subtype
{
GList *gl = families;
while(gl) {
- aim_family *fam = gl->data;
+ aim_family *fam = (aim_family *)gl->data;
if(fam->family == famnum) {
int i;
for(i = 0; fam->subtypes[i].name; i++) {
@@ -488,7 +488,7 @@ const aim_family
{
GList *gl = families;
while(gl) {
- aim_family *fam = gl->data;
+ aim_family *fam = (aim_family *)gl->data;
if(fam->family == famnum) return fam;
gl = gl->next;
}
@@ -739,7 +739,7 @@ dissect_aim_snac(tvbuff_t *tvb, packet_info *pinfo, int offset,
}
subtvb = tvb_new_subset_remaining(tvb, offset);
- aiminfo.tcpinfo = pinfo->private_data;
+ aiminfo.tcpinfo = (tcpinfo *)pinfo->private_data;
aiminfo.family = family_id;
aiminfo.subtype = subtype_id;
pd_save = pinfo->private_data;
diff --git a/epan/dissectors/packet-ajp13.c b/epan/dissectors/packet-ajp13.c
index 4b582e3696..643dc9c392 100644
--- a/epan/dissectors/packet-ajp13.c
+++ b/epan/dissectors/packet-ajp13.c
@@ -783,7 +783,7 @@ dissect_ajp13_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cd = (ajp13_conv_data*)conversation_get_proto_data(conv, proto_ajp13);
if (!cd) {
- cd = se_alloc(sizeof(ajp13_conv_data));
+ cd = se_new(ajp13_conv_data);
cd->content_length = 0;
cd->was_get_body_chunk = FALSE;
conversation_add_proto_data(conv, proto_ajp13, cd);
@@ -800,7 +800,7 @@ dissect_ajp13_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* time we've see the packet, and it must be the first "in order"
* pass through the data.
*/
- fd = se_alloc(sizeof(ajp13_frame_data));
+ fd = se_new(ajp13_frame_data);
p_add_proto_data(pinfo->fd, proto_ajp13, fd);
fd->is_request_body = FALSE;
if (cd->content_length) {
diff --git a/epan/dissectors/packet-alcap.c b/epan/dissectors/packet-alcap.c
index fb190ad618..71425e7598 100644
--- a/epan/dissectors/packet-alcap.c
+++ b/epan/dissectors/packet-alcap.c
@@ -536,7 +536,7 @@ static const gchar* dissect_fields_desea(packet_info* pinfo _U_, tvbuff_t *tvb,
return NULL;
}
- e164 = ep_alloc(sizeof(e164_info_t));
+ e164 = ep_new(e164_info_t);
e164->e164_number_type = CALLED_PARTY_NUMBER;
e164->nature_of_address = tvb_get_guint8(tvb,offset) & 0x7f;
@@ -563,7 +563,7 @@ static const gchar* dissect_fields_oesea(packet_info* pinfo _U_, tvbuff_t *tvb,
return NULL;
}
- e164 = ep_alloc(sizeof(e164_info_t));
+ e164 = ep_new(e164_info_t);
e164->e164_number_type = CALLING_PARTY_NUMBER;
e164->nature_of_address = tvb_get_guint8(tvb,offset) & 0x7f;
@@ -1353,7 +1353,7 @@ static void alcap_leg_tree(proto_tree* tree, tvbuff_t* tvb, const alcap_leg_info
extern void alcap_tree_from_bearer_key(proto_tree* tree, tvbuff_t* tvb, const gchar* key) {
- alcap_leg_info_t* leg = se_tree_lookup_string(legs_by_bearer,key,0);
+ alcap_leg_info_t* leg = (alcap_leg_info_t*)se_tree_lookup_string(legs_by_bearer,key,0);
if (leg) {
alcap_leg_tree(tree,tvb,leg);
@@ -1364,7 +1364,7 @@ extern void alcap_tree_from_bearer_key(proto_tree* tree, tvbuff_t* tvb, const g
static void dissect_alcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree *alcap_tree = NULL;
- alcap_message_info_t* msg_info = ep_alloc0(sizeof(alcap_message_info_t));
+ alcap_message_info_t* msg_info = ep_new0(alcap_message_info_t);
int len = tvb_length(tvb);
int offset;
proto_item* pi;
@@ -1432,8 +1432,8 @@ static void dissect_alcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
alcap_leg_info_t* leg = NULL;
switch (msg_info->msg_type) {
case 5: /* ERQ */
- if( ! ( leg = se_tree_lookup32(legs_by_osaid,msg_info->osaid) )) {
- leg = se_alloc(sizeof(alcap_leg_info_t));
+ if( ! ( leg = (alcap_leg_info_t*)se_tree_lookup32(legs_by_osaid,msg_info->osaid) )) {
+ leg = se_new(alcap_leg_info_t);
leg->dsaid = 0;
leg->osaid = msg_info->osaid;
@@ -1472,7 +1472,7 @@ static void dissect_alcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
}
break;
case 4: /* ECF */
- if(( leg = se_tree_lookup32(legs_by_osaid,msg_info->dsaid) )) {
+ if(( leg = (alcap_leg_info_t *)se_tree_lookup32(legs_by_osaid,msg_info->dsaid) )) {
leg->dsaid = msg_info->osaid;
se_tree_insert32(legs_by_dsaid,leg->dsaid,leg);
}
@@ -1481,8 +1481,8 @@ static void dissect_alcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
case 12: /* MOA */
case 13: /* MOR */
case 14: /* MOD */
- if( ( leg = se_tree_lookup32(legs_by_osaid,msg_info->dsaid) )
- || ( leg = se_tree_lookup32(legs_by_dsaid,msg_info->dsaid) ) ) {
+ if( ( leg = (alcap_leg_info_t *)se_tree_lookup32(legs_by_osaid,msg_info->dsaid) )
+ || ( leg = (alcap_leg_info_t *)se_tree_lookup32(legs_by_dsaid,msg_info->dsaid) ) ) {
if(msg_info->release_cause)
leg->release_cause = msg_info->release_cause;
@@ -1490,11 +1490,11 @@ static void dissect_alcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
}
break;
case 7: /* REL */
- leg = se_tree_lookup32(legs_by_osaid,msg_info->dsaid);
+ leg = (alcap_leg_info_t *)se_tree_lookup32(legs_by_osaid,msg_info->dsaid);
if(leg) {
leg->release_cause = msg_info->release_cause;
- } else if (( leg = se_tree_lookup32(legs_by_dsaid,msg_info->dsaid) )) {
+ } else if (( leg = (alcap_leg_info_t *)se_tree_lookup32(legs_by_dsaid,msg_info->dsaid) )) {
leg->release_cause = msg_info->release_cause;
}
break;
@@ -1503,7 +1503,7 @@ static void dissect_alcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
}
if (leg != NULL && ( (! leg->msgs) || leg->msgs->last->framenum < pinfo->fd->num ) ) {
- alcap_msg_data_t* msg = se_alloc(sizeof(alcap_msg_data_t));
+ alcap_msg_data_t* msg = se_new(alcap_msg_data_t);
msg->msg_type = msg_info->msg_type;
msg->framenum = pinfo->fd->num;
msg->next = NULL;