summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-04 06:48:36 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-04 06:48:36 +0000
commit37a86e4de60f05d95691b329d9acf4023d9bd23a (patch)
tree22e51bc721db69874739ae624f0e1f29467cccf3
parentc9dee3bdda1868d16c7c8679545def31103241f7 (diff)
downloadwireshark-37a86e4de60f05d95691b329d9acf4023d9bd23a.tar.gz
Use explicit casts.
svn path=/trunk/; revision=48045
-rw-r--r--asn1/rua/packet-rua-template.c2
-rw-r--r--asn1/smrse/smrse.cnf4
-rw-r--r--asn1/spnego/packet-spnego-template.c28
-rw-r--r--asn1/spnego/spnego.cnf6
-rw-r--r--epan/dissectors/packet-rua.c2
-rw-r--r--epan/dissectors/packet-smrse.c4
-rw-r--r--epan/dissectors/packet-spnego.c34
-rw-r--r--epan/dissectors/packet-sysex.c4
8 files changed, 42 insertions, 42 deletions
diff --git a/asn1/rua/packet-rua-template.c b/asn1/rua/packet-rua-template.c
index aff18ad609..a72b4e67cd 100644
--- a/asn1/rua/packet-rua-template.c
+++ b/asn1/rua/packet-rua-template.c
@@ -66,7 +66,7 @@ static int ett_rua = -1;
/* Global variables */
static guint32 ProcedureCode;
static guint32 ProtocolIE_ID;
-static guint global_sctp_port = SCTP_PORT_RUA;
+static guint global_sctp_port = SCTP_PORT_RUA
/* Dissector tables */
static dissector_table_t rua_ies_dissector_table;
diff --git a/asn1/smrse/smrse.cnf b/asn1/smrse/smrse.cnf
index 59864fa39c..479371d7b4 100644
--- a/asn1/smrse/smrse.cnf
+++ b/asn1/smrse/smrse.cnf
@@ -20,7 +20,7 @@ SemiOctetString
#.FN_BODY SMS-Address/address-value/octet-format
char *strp,tmpstr[21];
guint32 i, start_offset;
- gint8 class;
+ gint8 ber_class;
gboolean pc, ind;
gint32 tag;
guint32 len;
@@ -29,7 +29,7 @@ SemiOctetString
start_offset=offset;
/* skip the tag and length */
- offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
+ offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &ber_class, &pc, &tag);
offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
if(len>10){
len=10;
diff --git a/asn1/spnego/packet-spnego-template.c b/asn1/spnego/packet-spnego-template.c
index 9da3d1e5f7..365774dd2c 100644
--- a/asn1/spnego/packet-spnego-template.c
+++ b/asn1/spnego/packet-spnego-template.c
@@ -178,7 +178,7 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 token_id;
const char *oid;
tvbuff_t *krb5_tvb;
- gint8 class;
+ gint8 ber_class;
gboolean pc, ind = 0;
gint32 tag;
guint32 len;
@@ -220,12 +220,12 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/*
* Get the first header ...
*/
- get_ber_identifier(tvb, offset, &class, &pc, &tag);
- if (class == BER_CLASS_APP && pc) {
+ get_ber_identifier(tvb, offset, &ber_class, &pc, &tag);
+ if (ber_class == BER_CLASS_APP && pc) {
/*
* [APPLICATION <tag>]
*/
- offset = dissect_ber_identifier(pinfo, subtree, tvb, offset, &class, &pc, &tag);
+ offset = dissect_ber_identifier(pinfo, subtree, tvb, offset, &ber_class, &pc, &tag);
offset = dissect_ber_length(pinfo, subtree, tvb, offset, &len, &ind);
switch (tag) {
@@ -258,7 +258,7 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
default:
proto_tree_add_text(subtree, tvb, offset, 0,
"Unknown header (class=%d, pc=%d, tag=%d)",
- class, pc, tag);
+ ber_class, pc, tag);
goto done;
}
} else {
@@ -339,14 +339,14 @@ arcfour_mic_key(void *key_data, size_t key_size, int key_type,
L40, 14,
key_data,
key_size,
- k5_data);
+ k5_data);
memset(&k5_data[7], 0xAB, 9);
} else {
md5_hmac(
T, 4,
key_data,
key_size,
- k5_data);
+ k5_data);
}
md5_hmac(
@@ -592,12 +592,12 @@ decrypt_gssapi_krb_arcfour_wrap(proto_tree *tree, packet_info *pinfo, tvbuff_t *
/* XXX we should only do this for first time, then store somewhere */
/* XXX We also need to re-read the keytab when the preference changes */
- cryptocopy=ep_alloc(length);
+ cryptocopy=(guint8 *)ep_alloc(length);
if(output_message_buffer){
g_free(output_message_buffer);
output_message_buffer=NULL;
}
- output_message_buffer=g_malloc(length);
+ output_message_buffer=(guint8 *)g_malloc(length);
for(ek=enc_key_list;ek;ek=ek->next){
/* shortcircuit and bail out if enctypes are not matching */
@@ -652,7 +652,7 @@ rrc_rotate(void *data, int len, guint16 rrc, int unrotate)
if (rrc <= sizeof(buf)) {
tmp = buf;
} else {
- tmp = g_malloc(rrc);
+ tmp = (unsigned char *)g_malloc(rrc);
if (tmp == NULL)
return -1;
}
@@ -702,7 +702,7 @@ decrypt_gssapi_krb_cfx_wrap(proto_tree *tree _U_,
datalen = tvb_length(checksum_tvb) + tvb_length(encrypted_tvb);
- rotated = g_malloc(datalen);
+ rotated = (guint8 *)g_malloc(datalen);
tvb_memcpy(checksum_tvb, rotated,
0, tvb_length(checksum_tvb));
@@ -726,7 +726,7 @@ decrypt_gssapi_krb_cfx_wrap(proto_tree *tree _U_,
if (output) {
guint8 *outdata;
- outdata = g_memdup(output, tvb_length(encrypted_tvb));
+ outdata = (guint8 *)g_memdup(output, tvb_length(encrypted_tvb));
g_free(output);
pinfo->gssapi_decrypted_tvb=tvb_new_child_real_data(encrypted_tvb,
@@ -1273,7 +1273,7 @@ dissect_spnego(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
* It has to be per-frame as there can be more than one GSS-API
* negotiation in a conversation.
*/
- next_level_value = p_get_proto_data(pinfo->fd, proto_spnego);
+ next_level_value = (gssapi_oid_value *)p_get_proto_data(pinfo->fd, proto_spnego);
if (!next_level_value && !pinfo->fd->flags.visited) {
/*
* No handle attached to this frame, but it's the first
@@ -1286,7 +1286,7 @@ dissect_spnego(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
pinfo->destport, 0);
if (conversation) {
- next_level_value = conversation_get_proto_data(conversation,
+ next_level_value = (gssapi_oid_value *)conversation_get_proto_data(conversation,
proto_spnego);
if (next_level_value)
p_add_proto_data(pinfo->fd, proto_spnego, next_level_value);
diff --git a/asn1/spnego/spnego.cnf b/asn1/spnego/spnego.cnf
index 518d1b4595..249ab3838a 100644
--- a/asn1/spnego/spnego.cnf
+++ b/asn1/spnego/spnego.cnf
@@ -124,7 +124,7 @@ NegTokenInit/mechListMIC negTokenInit_mechListMIC
#.FN_BODY NegTokenInit/mechListMIC
- gint8 class;
+ gint8 ber_class;
gboolean pc;
gint32 tag;
tvbuff_t *mechListMIC_tvb;
@@ -136,8 +136,8 @@ NegTokenInit/mechListMIC negTokenInit_mechListMIC
*
* Peek at the header, and then decide which it is we're seeing.
*/
- get_ber_identifier(tvb, offset, &class, &pc, &tag);
- if (class == BER_CLASS_UNI && pc && tag == BER_UNI_TAG_SEQUENCE) {
+ get_ber_identifier(tvb, offset, &ber_class, &pc, &tag);
+ if (ber_class == BER_CLASS_UNI && pc && tag == BER_UNI_TAG_SEQUENCE) {
/*
* It's a sequence.
*/
diff --git a/epan/dissectors/packet-rua.c b/epan/dissectors/packet-rua.c
index fa5f991c7a..2cbecdfdf5 100644
--- a/epan/dissectors/packet-rua.c
+++ b/epan/dissectors/packet-rua.c
@@ -216,7 +216,7 @@ static gint ett_rua_UnsuccessfulOutcome = -1;
/* Global variables */
static guint32 ProcedureCode;
static guint32 ProtocolIE_ID;
-static guint global_sctp_port = SCTP_PORT_RUA;
+static guint global_sctp_port = SCTP_PORT_RUA
/* Dissector tables */
static dissector_table_t rua_ies_dissector_table;
diff --git a/epan/dissectors/packet-smrse.c b/epan/dissectors/packet-smrse.c
index 443e726fcf..c0e067a7b5 100644
--- a/epan/dissectors/packet-smrse.c
+++ b/epan/dissectors/packet-smrse.c
@@ -156,7 +156,7 @@ dissect_smrse_T_octet_format(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
#line 21 "../../asn1/smrse/smrse.cnf"
char *strp,tmpstr[21];
guint32 i, start_offset;
- gint8 class;
+ gint8 ber_class;
gboolean pc, ind;
gint32 tag;
guint32 len;
@@ -165,7 +165,7 @@ dissect_smrse_T_octet_format(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
start_offset=offset;
/* skip the tag and length */
- offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
+ offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &ber_class, &pc, &tag);
offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
if(len>10){
len=10;
diff --git a/epan/dissectors/packet-spnego.c b/epan/dissectors/packet-spnego.c
index 91e085715b..daa2ce881a 100644
--- a/epan/dissectors/packet-spnego.c
+++ b/epan/dissectors/packet-spnego.c
@@ -269,7 +269,7 @@ static int
dissect_spnego_T_NegTokenInit_mechListMIC(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 126 "../../asn1/spnego/spnego.cnf"
- gint8 class;
+ gint8 ber_class;
gboolean pc;
gint32 tag;
tvbuff_t *mechListMIC_tvb;
@@ -281,8 +281,8 @@ dissect_spnego_T_NegTokenInit_mechListMIC(gboolean implicit_tag _U_, tvbuff_t *t
*
* Peek at the header, and then decide which it is we're seeing.
*/
- get_ber_identifier(tvb, offset, &class, &pc, &tag);
- if (class == BER_CLASS_UNI && pc && tag == BER_UNI_TAG_SEQUENCE) {
+ get_ber_identifier(tvb, offset, &ber_class, &pc, &tag);
+ if (ber_class == BER_CLASS_UNI && pc && tag == BER_UNI_TAG_SEQUENCE) {
/*
* It's a sequence.
*/
@@ -659,7 +659,7 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 token_id;
const char *oid;
tvbuff_t *krb5_tvb;
- gint8 class;
+ gint8 ber_class;
gboolean pc, ind = 0;
gint32 tag;
guint32 len;
@@ -701,12 +701,12 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/*
* Get the first header ...
*/
- get_ber_identifier(tvb, offset, &class, &pc, &tag);
- if (class == BER_CLASS_APP && pc) {
+ get_ber_identifier(tvb, offset, &ber_class, &pc, &tag);
+ if (ber_class == BER_CLASS_APP && pc) {
/*
* [APPLICATION <tag>]
*/
- offset = dissect_ber_identifier(pinfo, subtree, tvb, offset, &class, &pc, &tag);
+ offset = dissect_ber_identifier(pinfo, subtree, tvb, offset, &ber_class, &pc, &tag);
offset = dissect_ber_length(pinfo, subtree, tvb, offset, &len, &ind);
switch (tag) {
@@ -739,7 +739,7 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
default:
proto_tree_add_text(subtree, tvb, offset, 0,
"Unknown header (class=%d, pc=%d, tag=%d)",
- class, pc, tag);
+ ber_class, pc, tag);
goto done;
}
} else {
@@ -820,14 +820,14 @@ arcfour_mic_key(void *key_data, size_t key_size, int key_type,
L40, 14,
key_data,
key_size,
- k5_data);
+ k5_data);
memset(&k5_data[7], 0xAB, 9);
} else {
md5_hmac(
T, 4,
key_data,
key_size,
- k5_data);
+ k5_data);
}
md5_hmac(
@@ -1073,12 +1073,12 @@ decrypt_gssapi_krb_arcfour_wrap(proto_tree *tree, packet_info *pinfo, tvbuff_t *
/* XXX we should only do this for first time, then store somewhere */
/* XXX We also need to re-read the keytab when the preference changes */
- cryptocopy=ep_alloc(length);
+ cryptocopy=(guint8 *)ep_alloc(length);
if(output_message_buffer){
g_free(output_message_buffer);
output_message_buffer=NULL;
}
- output_message_buffer=g_malloc(length);
+ output_message_buffer=(guint8 *)g_malloc(length);
for(ek=enc_key_list;ek;ek=ek->next){
/* shortcircuit and bail out if enctypes are not matching */
@@ -1133,7 +1133,7 @@ rrc_rotate(void *data, int len, guint16 rrc, int unrotate)
if (rrc <= sizeof(buf)) {
tmp = buf;
} else {
- tmp = g_malloc(rrc);
+ tmp = (unsigned char *)g_malloc(rrc);
if (tmp == NULL)
return -1;
}
@@ -1183,7 +1183,7 @@ decrypt_gssapi_krb_cfx_wrap(proto_tree *tree _U_,
datalen = tvb_length(checksum_tvb) + tvb_length(encrypted_tvb);
- rotated = g_malloc(datalen);
+ rotated = (guint8 *)g_malloc(datalen);
tvb_memcpy(checksum_tvb, rotated,
0, tvb_length(checksum_tvb));
@@ -1207,7 +1207,7 @@ decrypt_gssapi_krb_cfx_wrap(proto_tree *tree _U_,
if (output) {
guint8 *outdata;
- outdata = g_memdup(output, tvb_length(encrypted_tvb));
+ outdata = (guint8 *)g_memdup(output, tvb_length(encrypted_tvb));
g_free(output);
pinfo->gssapi_decrypted_tvb=tvb_new_child_real_data(encrypted_tvb,
@@ -1754,7 +1754,7 @@ dissect_spnego(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
* It has to be per-frame as there can be more than one GSS-API
* negotiation in a conversation.
*/
- next_level_value = p_get_proto_data(pinfo->fd, proto_spnego);
+ next_level_value = (gssapi_oid_value *)p_get_proto_data(pinfo->fd, proto_spnego);
if (!next_level_value && !pinfo->fd->flags.visited) {
/*
* No handle attached to this frame, but it's the first
@@ -1767,7 +1767,7 @@ dissect_spnego(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
pinfo->destport, 0);
if (conversation) {
- next_level_value = conversation_get_proto_data(conversation,
+ next_level_value = (gssapi_oid_value *)conversation_get_proto_data(conversation,
proto_spnego);
if (next_level_value)
p_add_proto_data(pinfo->fd, proto_spnego, next_level_value);
diff --git a/epan/dissectors/packet-sysex.c b/epan/dissectors/packet-sysex.c
index 209e62c04c..13d34b4c4e 100644
--- a/epan/dissectors/packet-sysex.c
+++ b/epan/dissectors/packet-sysex.c
@@ -947,11 +947,11 @@ dissect_digitech_procedure(guint8 procedure, const gint offset,
digitech_conv_data_t *conv_data;
conversation = find_or_create_conversation(pinfo);
- conv_data = conversation_get_proto_data(conversation, proto_sysex);
+ conv_data = (digitech_conv_data_t *)conversation_get_proto_data(conversation, proto_sysex);
if (conv_data == NULL)
{
- conv_data = se_alloc(sizeof(digitech_conv_data_t));
+ conv_data = se_new(digitech_conv_data_t);
conv_data->protocol_version = 1; /* Default to version 1 */
}