aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-19 21:22:31 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-19 21:22:31 +0000
commit7c56677cf9e703e6dde30529b24e27dd2a4960a9 (patch)
tree5d78d22112806bca22edbc8e069f77503269b381 /epan
parentb8481499646f07512ceddac567887072822dffdb (diff)
From beroset:
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48429
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-ansi_tcap.c2
-rw-r--r--epan/dissectors/packet-camel.c4
-rw-r--r--epan/dissectors/packet-h225.c4
-rw-r--r--epan/dissectors/packet-h248.c17
-rw-r--r--epan/dissectors/packet-h323.c4
-rw-r--r--epan/dissectors/packet-ocsp.c4
-rw-r--r--epan/dissectors/packet-pkix1explicit.c4
-rw-r--r--epan/dissectors/packet-pres.c10
-rw-r--r--epan/dissectors/packet-q932.c6
-rw-r--r--epan/dissectors/packet-qsig.c6
-rw-r--r--epan/dissectors/packet-ranap.c6
-rw-r--r--epan/dissectors/packet-rrc.c2
-rw-r--r--epan/dissectors/packet-s1ap.c2
13 files changed, 35 insertions, 36 deletions
diff --git a/epan/dissectors/packet-ansi_tcap.c b/epan/dissectors/packet-ansi_tcap.c
index 1ef4f0821f..5ac209beab 100644
--- a/epan/dissectors/packet-ansi_tcap.c
+++ b/epan/dissectors/packet-ansi_tcap.c
@@ -327,7 +327,7 @@ find_saved_invokedata(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U
}
/* The hash string needs to contain src and dest to distiguish differnt flows */
- buf = ep_alloc(MAX_TID_STR_LEN);
+ buf = (char *)ep_alloc(MAX_TID_STR_LEN);
buf[0] = '\0';
/* Reverse order to invoke */
g_snprintf(buf, MAX_TID_STR_LEN, "%s%s%s",
diff --git a/epan/dissectors/packet-camel.c b/epan/dissectors/packet-camel.c
index b642dc6221..1921fd3873 100644
--- a/epan/dissectors/packet-camel.c
+++ b/epan/dissectors/packet-camel.c
@@ -7232,10 +7232,10 @@ dissect_camel_camelPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn
opcode = 0;
application_context_version = 0;
if (actx->pinfo->private_data != NULL){
- p_private_tcap=actx->pinfo->private_data;
+ p_private_tcap=(struct tcap_private_t *)actx->pinfo->private_data;
if (p_private_tcap->acv==TRUE ){
- version_ptr = strrchr(p_private_tcap->oid,'.');
+ version_ptr = strrchr((char *)p_private_tcap->oid,'.');
if (version_ptr)
application_context_version = atoi(version_ptr+1);
}
diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c
index a97ac56584..360d436f61 100644
--- a/epan/dissectors/packet-h225.c
+++ b/epan/dissectors/packet-h225.c
@@ -2767,7 +2767,7 @@ dissect_h225_SEQUENCE_OF_CallReferenceValue(tvbuff_t *tvb _U_, int offset _U_, a
int
dissect_h225_GloballyUniqueID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
- 16, 16, FALSE, actx->value_ptr);
+ 16, 16, FALSE, (tvbuff_t **)actx->value_ptr);
return offset;
}
@@ -2882,7 +2882,7 @@ dissect_h225_T_guid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pro
offset = dissect_h225_GloballyUniqueID(tvb, offset, actx, tree, hf_index);
if (guid_tvb)
- tvb_get_ntohguid(guid_tvb, 0, call_id_guid = ep_alloc(sizeof(e_guid_t)));
+ tvb_get_ntohguid(guid_tvb, 0, call_id_guid = ep_new(e_guid_t));
actx->value_ptr = NULL;
diff --git a/epan/dissectors/packet-h248.c b/epan/dissectors/packet-h248.c
index 4f9c3ec94f..c75d57ae6f 100644
--- a/epan/dissectors/packet-h248.c
+++ b/epan/dissectors/packet-h248.c
@@ -563,7 +563,6 @@ static gint ett_h248_SigParameterV1 = -1;
/*--- End of included file: packet-h248-ett.c ---*/
#line 90 "../../asn1/h248/packet-h248-template.c"
-static dissector_handle_t h248_term_handle;
static dissector_table_t subdissector_table;
static emem_tree_t* msgs = NULL;
@@ -1352,7 +1351,7 @@ static int dissect_h248_ctx_id(gboolean implicit_tag, packet_info *pinfo, proto_
s_h248_package_t *s_find_package_id(guint16 pkgid) {
s_h248_package_t *s_pkg = NULL;
- s_pkg = g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid)));
+ s_pkg = (s_h248_package_t *)g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid)));
return s_pkg;
}
@@ -1369,7 +1368,7 @@ static gint32 comparePkgID(gconstpointer a, gconstpointer b) {
gboolean is_pkg_default(guint16 pkgid) {
s_h248_package_t *s_pkg = NULL;
- s_pkg = g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid)));
+ s_pkg = (s_h248_package_t *)g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid)));
if(! s_pkg ) return TRUE;
return s_pkg->is_default;
}
@@ -1387,7 +1386,7 @@ void h248_register_package(const h248_package_t* pkg, pkg_reg_action reg_action)
while (base_package_name_vals[i].strptr != NULL) {
pkg_found = g_new0(h248_package_t, 1); /* create a h248 package structure */
pkg_found->id = base_package_name_vals[i].value;
- vst = wmem_alloc0(wmem_epan_scope(), sizeof(value_string)*2);
+ vst = (value_string *)wmem_alloc0(wmem_epan_scope(), sizeof(value_string)*2);
vst[0].strptr = base_package_name_vals[i].strptr;
pkg_found->param_names = vst;
pkg_found->hfid = &hf_h248_pkg_name;
@@ -1400,7 +1399,7 @@ void h248_register_package(const h248_package_t* pkg, pkg_reg_action reg_action)
j++;
};
if (idx < j) {
- vst = wmem_alloc0(wmem_epan_scope(), sizeof(value_string)*(j-idx+1));
+ vst = (value_string *)wmem_alloc0(wmem_epan_scope(), sizeof(value_string)*(j-idx+1));
for (k=0;idx<j;k++) {
vst[k].strptr = base_event_name_vals[idx].strptr;
vst[k].value = (base_event_name_vals[idx].value & 0xffff);
@@ -2227,7 +2226,7 @@ dissect_h248_T_terminationId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
curr_info.term->type = 0; /* unknown */
if (curr_info.term->len) {
- curr_info.term->buffer = ep_tvb_memdup(new_tvb,0,curr_info.term->len);
+ curr_info.term->buffer = (guint8 *)ep_tvb_memdup(new_tvb,0,curr_info.term->len);
curr_info.term->str = bytes_to_str(curr_info.term->buffer,curr_info.term->len);
}
@@ -5366,7 +5365,7 @@ dissect_h248_ValueV1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
/*--- End of included file: packet-h248-fn.c ---*/
-#line 1409 "../../asn1/h248/packet-h248-template.c"
+#line 1408 "../../asn1/h248/packet-h248-template.c"
static void dissect_h248_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_tpkt_encap(tvb, pinfo, tree, h248_desegment, h248_handle);
@@ -6785,7 +6784,7 @@ void proto_register_h248(void) {
NULL, HFILL }},
/*--- End of included file: packet-h248-hfarr.c ---*/
-#line 1571 "../../asn1/h248/packet-h248-template.c"
+#line 1570 "../../asn1/h248/packet-h248-template.c"
GCP_HF_ARR_ELEMS("h248",h248_arrel)
@@ -6951,7 +6950,7 @@ void proto_register_h248(void) {
&ett_h248_SigParameterV1,
/*--- End of included file: packet-h248-ettarr.c ---*/
-#line 1589 "../../asn1/h248/packet-h248-template.c"
+#line 1588 "../../asn1/h248/packet-h248-template.c"
};
module_t *h248_module;
diff --git a/epan/dissectors/packet-h323.c b/epan/dissectors/packet-h323.c
index 3f3b063bc7..92803f63d2 100644
--- a/epan/dissectors/packet-h323.c
+++ b/epan/dissectors/packet-h323.c
@@ -51,7 +51,7 @@
gef_ctx_t* gef_ctx_alloc(gef_ctx_t *parent, const gchar *type) {
gef_ctx_t *gefx;
- gefx = ep_alloc0(sizeof(gef_ctx_t));
+ gefx = ep_new0(gef_ctx_t);
gefx->signature = GEF_CTX_SIGNATURE;
gefx->parent = parent;
gefx->type = type;
@@ -70,7 +70,7 @@ gef_ctx_t* gef_ctx_get(void *ptr) {
actx = NULL;
if (actx)
- gefx = actx->private_data;
+ gefx = (gef_ctx_t *)actx->private_data;
if (!gef_ctx_check_signature(gefx))
gefx = NULL;
diff --git a/epan/dissectors/packet-ocsp.c b/epan/dissectors/packet-ocsp.c
index d9a21d2b24..0568adb655 100644
--- a/epan/dissectors/packet-ocsp.c
+++ b/epan/dissectors/packet-ocsp.c
@@ -320,12 +320,12 @@ dissect_ocsp_T_responseType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
static int
dissect_ocsp_T_response(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 38 "../../asn1/ocsp/ocsp.cnf"
- gint8 class;
+ gint8 appclass;
gboolean pc, ind;
gint32 tag;
guint32 len;
/* skip past the T and L */
- offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
+ offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &appclass, &pc, &tag);
offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
offset=call_ber_oid_callback(responseType_id, tvb, offset, actx->pinfo, tree);
diff --git a/epan/dissectors/packet-pkix1explicit.c b/epan/dissectors/packet-pkix1explicit.c
index 709071d49a..2f61d09a48 100644
--- a/epan/dissectors/packet-pkix1explicit.c
+++ b/epan/dissectors/packet-pkix1explicit.c
@@ -284,12 +284,12 @@ dissect_pkix1explicit_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
static int
dissect_pkix1explicit_T_extnValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 56 "../../asn1/pkix1explicit/pkix1explicit.cnf"
- gint8 class;
+ gint8 appclass;
gboolean pc, ind;
gint32 tag;
guint32 len;
/* skip past the T and L */
- offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
+ offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &appclass, &pc, &tag);
offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
diff --git a/epan/dissectors/packet-pres.c b/epan/dissectors/packet-pres.c
index 62d8266907..f96ab5adcb 100644
--- a/epan/dissectors/packet-pres.c
+++ b/epan/dissectors/packet-pres.c
@@ -271,7 +271,7 @@ register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, const char *oid)
return;
}
- pco=se_alloc(sizeof(pres_ctx_oid_t));
+ pco=se_new(pres_ctx_oid_t);
pco->ctx_id=idx;
pco->oid=se_strdup(oid);
conversation=find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst,
@@ -335,8 +335,8 @@ find_oid_by_pres_ctx_id(packet_info *pinfo, guint32 idx)
static void *
pres_copy_cb(void *dest, const void *orig, size_t len _U_)
{
- pres_user_t *u = dest;
- const pres_user_t *o = orig;
+ pres_user_t *u = (pres_user_t *)dest;
+ const pres_user_t *o = (const pres_user_t *)orig;
u->ctx_id = o->ctx_id;
u->oid = g_strdup(o->oid);
@@ -347,7 +347,7 @@ pres_copy_cb(void *dest, const void *orig, size_t len _U_)
static void
pres_free_cb(void *r)
{
- pres_user_t *u = r;
+ pres_user_t *u = (pres_user_t *)r;
g_free(u->oid);
}
@@ -1901,7 +1901,7 @@ void proto_register_pres(void) {
sizeof(pres_user_t),
"pres_context_list",
TRUE,
- (void*) &pres_users,
+ (void**) &pres_users,
&num_pres_users,
UAT_AFFECTS_DISSECTION, /* affects dissection of packets, but not set of named fields */
"ChPresContextList",
diff --git a/epan/dissectors/packet-q932.c b/epan/dissectors/packet-q932.c
index 33ae692ab8..00954f4a02 100644
--- a/epan/dissectors/packet-q932.c
+++ b/epan/dissectors/packet-q932.c
@@ -649,7 +649,7 @@ static void dissect_InterpretationComponent_PDU(tvbuff_t *tvb _U_, packet_info *
/*--- dissect_q932_facility_ie -------------------------------------------------------*/
/*static*/ void
dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) {
- gint8 class;
+ gint8 appclass;
gboolean pc;
gint32 tag;
guint32 len;
@@ -662,11 +662,11 @@ dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
offset++;
while (offset < ie_end) {
hoffset = offset;
- offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
+ offset = get_ber_identifier(tvb, offset, &appclass, &pc, &tag);
offset = get_ber_length(tvb, offset, &len, NULL);
eoffset = offset + len;
next_tvb = tvb_new_subset(tvb, hoffset, eoffset - hoffset, eoffset - hoffset);
- switch (class) {
+ switch (appclass) {
case BER_CLASS_CON:
switch (tag) {
case 10 : /* Network Facility Extension */
diff --git a/epan/dissectors/packet-qsig.c b/epan/dissectors/packet-qsig.c
index 7588b81455..54808c4773 100644
--- a/epan/dissectors/packet-qsig.c
+++ b/epan/dissectors/packet-qsig.c
@@ -12395,7 +12395,7 @@ dissect_qsig_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
opcode = rctx->d.code_local;
op_ptr = get_op(opcode);
} else if (rctx->d.code == 1) { /* global */
- op_ptr = g_hash_table_lookup(qsig_oid2op_hashtable, rctx->d.code_global);
+ op_ptr = (qsig_op_t *)g_hash_table_lookup(qsig_oid2op_hashtable, rctx->d.code_global);
if (op_ptr) opcode = op_ptr->opcode;
} else {
return offset;
@@ -12611,7 +12611,7 @@ static void qsig_init_tables(void) {
for (i=0; i<array_length(qsig_op_tab); i++) {
opcode = qsig_op_tab[i].opcode;
oid = g_strdup_printf("1.3.12.9.%d", opcode);
- key = g_malloc(sizeof(gint));
+ key = (gint *)g_malloc(sizeof(gint));
*key = opcode;
g_hash_table_insert(qsig_opcode2oid_hashtable, key, oid);
g_hash_table_insert(qsig_oid2op_hashtable, g_strdup(oid), (gpointer)&qsig_op_tab[i]);
@@ -16381,7 +16381,7 @@ void proto_reg_handoff_qsig(void) {
dissector_add_uint("q932.ros.local.arg", qsig_op_tab[i].opcode, qsig_arg_handle);
dissector_add_uint("q932.ros.local.res", qsig_op_tab[i].opcode, qsig_res_handle);
key = qsig_op_tab[i].opcode;
- oid = g_hash_table_lookup(qsig_opcode2oid_hashtable, &key);
+ oid = (const gchar *)g_hash_table_lookup(qsig_opcode2oid_hashtable, &key);
if (oid) {
dissector_add_string("q932.ros.global.arg", oid, qsig_arg_handle);
dissector_add_string("q932.ros.global.res", oid, qsig_res_handle);
diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c
index e3ca69d326..d94d51c83f 100644
--- a/epan/dissectors/packet-ranap.c
+++ b/epan/dissectors/packet-ranap.c
@@ -2074,7 +2074,7 @@ dissect_ranap_ProtocolIE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_c
static const asn1_par_def_t ProtocolIE_ContainerList_pars[] = {
{ "lowerBound", ASN1_PAR_INTEGER },
{ "upperBound", ASN1_PAR_INTEGER },
- { NULL, 0 }
+ { NULL, (asn1_par_type)0 }
};
asn1_stack_frame_check(actx, "ProtocolIE-ContainerList", ProtocolIE_ContainerList_pars);
@@ -2096,7 +2096,7 @@ dissect_ranap_ProtocolIE_ContainerPairList(tvbuff_t *tvb _U_, int offset _U_, as
static const asn1_par_def_t ProtocolIE_ContainerPairList_pars[] = {
{ "lowerBound", ASN1_PAR_INTEGER },
{ "upperBound", ASN1_PAR_INTEGER },
- { NULL, 0 }
+ { NULL, (asn1_par_type)0 }
};
asn1_stack_frame_check(actx, "ProtocolIE-ContainerPairList", ProtocolIE_ContainerPairList_pars);
@@ -4776,7 +4776,7 @@ dissect_ranap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot
&& ! actx->pinfo->sccp_info->data.co.assoc->calling_party ) {
guint len = tvb_length(imsi_tvb);
- guint8* bytes = ep_tvb_memdup(imsi_tvb,0,len);
+ guint8* bytes = (guint8 *)ep_tvb_memdup(imsi_tvb,0,len);
actx->pinfo->sccp_info->data.co.assoc->calling_party =
se_strdup_printf("IMSI: %s", bytes_to_str(bytes, len) );
diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c
index 4f3e75c198..64e0585e10 100644
--- a/epan/dissectors/packet-rrc.c
+++ b/epan/dissectors/packet-rrc.c
@@ -141632,7 +141632,7 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
struct rrc_info *rrcinf;
top_tree = tree;
- rrcinf = p_get_proto_data(pinfo->fd, proto_rrc);
+ rrcinf = (struct rrc_info *)p_get_proto_data(pinfo->fd, proto_rrc);
/* make entry in the Protocol column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRC");
diff --git a/epan/dissectors/packet-s1ap.c b/epan/dissectors/packet-s1ap.c
index 5235bf7c5f..6a1fa3dd13 100644
--- a/epan/dissectors/packet-s1ap.c
+++ b/epan/dissectors/packet-s1ap.c
@@ -1509,7 +1509,7 @@ dissect_s1ap_ProtocolIE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ct
static const asn1_par_def_t ProtocolIE_ContainerList_pars[] = {
{ "lowerBound", ASN1_PAR_INTEGER },
{ "upperBound", ASN1_PAR_INTEGER },
- { NULL, 0 }
+ { NULL, (asn1_par_type)0 }
};
asn1_stack_frame_check(actx, "ProtocolIE-ContainerList", ProtocolIE_ContainerList_pars);