From beroset:
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10397 svn path=/trunk/; revision=48438
This commit is contained in:
parent
a43e5a7eb9
commit
0df5a9390d
|
@ -814,7 +814,7 @@ list_encap_types(void) {
|
|||
struct string_elem *encaps;
|
||||
GSList *list = NULL;
|
||||
|
||||
encaps = g_malloc(sizeof(struct string_elem) * WTAP_NUM_ENCAP_TYPES);
|
||||
encaps = (struct string_elem *)g_malloc(sizeof(struct string_elem) * WTAP_NUM_ENCAP_TYPES);
|
||||
fprintf(stderr, "editcap: The available encapsulation types for the \"-T\" flag are:\n");
|
||||
for (i = 0; i < WTAP_NUM_ENCAP_TYPES; i++) {
|
||||
encaps[i].sstr = wtap_encap_short_string(i);
|
||||
|
|
|
@ -65,7 +65,7 @@ void asn1_ctx_clean_epdv(asn1_ctx_t *actx) {
|
|||
void asn1_stack_frame_push(asn1_ctx_t *actx, const gchar *name) {
|
||||
asn1_stack_frame_t *frame;
|
||||
|
||||
frame = ep_alloc0(sizeof(asn1_stack_frame_t));
|
||||
frame = ep_new0(asn1_stack_frame_t);
|
||||
frame->name = name;
|
||||
frame->next = actx->stack;
|
||||
actx->stack = frame;
|
||||
|
@ -113,7 +113,7 @@ static asn1_par_t *push_new_par(asn1_ctx_t *actx) {
|
|||
|
||||
DISSECTOR_ASSERT(actx->stack);
|
||||
|
||||
par = ep_alloc0(sizeof(asn1_par_t));
|
||||
par = ep_new0(asn1_par_t);
|
||||
|
||||
pp = &(actx->stack->par);
|
||||
while (*pp)
|
||||
|
|
|
@ -30,7 +30,7 @@ atalk_addr_to_str(const struct atalk_ddp_addr *addrp)
|
|||
{
|
||||
gchar *cur;
|
||||
|
||||
cur=ep_alloc(14);
|
||||
cur=(gchar *)ep_alloc(14);
|
||||
atalk_addr_to_str_buf(addrp, cur, 14);
|
||||
return cur;
|
||||
}
|
||||
|
|
|
@ -194,9 +194,9 @@ new_camelsrt_call(struct camelsrt_call_info_key_t *p_camelsrt_call_key)
|
|||
with the tcap transaction Id as main Key
|
||||
Once created, this entry will be updated later */
|
||||
|
||||
p_new_camelsrt_call_key = se_alloc(sizeof(struct camelsrt_call_info_key_t));
|
||||
p_new_camelsrt_call_key = se_new(struct camelsrt_call_info_key_t);
|
||||
p_new_camelsrt_call_key->SessionIdKey = p_camelsrt_call_key->SessionIdKey;
|
||||
p_new_camelsrt_call = se_alloc(sizeof(struct camelsrt_call_t));
|
||||
p_new_camelsrt_call = se_new(struct camelsrt_call_t);
|
||||
raz_camelsrt_call(p_new_camelsrt_call);
|
||||
p_new_camelsrt_call->session_id = camelsrt_global_SessionId++;
|
||||
#ifdef DEBUG_CAMELSRT
|
||||
|
@ -302,7 +302,7 @@ camelsrt_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
case 64: /*EventReportSMS*/
|
||||
/* Session has been explicity closed without TC_END */
|
||||
camelsrt_close_call_matching(pinfo, p_camelsrt_info);
|
||||
tcapsrt_close(p_camelsrt_info->tcap_context, pinfo);
|
||||
tcapsrt_close((struct tcaphash_context_t *)p_camelsrt_info->tcap_context, pinfo);
|
||||
break;
|
||||
|
||||
case 80: /*EventReportGPRS*/
|
||||
|
@ -352,7 +352,7 @@ camelsrt_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
case 66: /*ReleaseSMS*/
|
||||
/* Session has been closed by Network */
|
||||
camelsrt_close_call_matching(pinfo, p_camelsrt_info);
|
||||
tcapsrt_close(p_camelsrt_info->tcap_context,pinfo);
|
||||
tcapsrt_close((struct tcaphash_context_t *)p_camelsrt_info->tcap_context,pinfo);
|
||||
break;
|
||||
|
||||
case 79: /*ReleaseGPRS*/
|
||||
|
@ -425,7 +425,7 @@ camelsrt_begin_call_matching(packet_info *pinfo,
|
|||
dbg(10,"New key %lu ",camelsrt_call_key.SessionIdKey);
|
||||
#endif
|
||||
p_camelsrt_call = new_camelsrt_call(&camelsrt_call_key);
|
||||
p_camelsrt_call->tcap_context=p_camelsrt_info->tcap_context;
|
||||
p_camelsrt_call->tcap_context=(struct tcaphash_context_t *)p_camelsrt_info->tcap_context;
|
||||
update_camelsrt_call(p_camelsrt_call, pinfo,CAMELSRT_SESSION);
|
||||
|
||||
#ifdef DEBUG_CAMELSRT
|
||||
|
|
|
@ -115,11 +115,11 @@ circuit_new(circuit_type ctype, guint32 circuit_id, guint32 first_frame)
|
|||
circuit_t *circuit, *old_circuit;
|
||||
circuit_key *new_key;
|
||||
|
||||
new_key = se_alloc(sizeof(struct circuit_key));
|
||||
new_key = se_new(struct circuit_key);
|
||||
new_key->ctype = ctype;
|
||||
new_key->circuit_id = circuit_id;
|
||||
|
||||
circuit = se_alloc(sizeof(circuit_t));
|
||||
circuit = se_new(circuit_t);
|
||||
circuit->next = NULL;
|
||||
circuit->first_frame = first_frame;
|
||||
circuit->last_frame = 0; /* not known yet */
|
||||
|
@ -133,7 +133,7 @@ circuit_new(circuit_type ctype, guint32 circuit_id, guint32 first_frame)
|
|||
/*
|
||||
* Is there already a circuit with this circuit ID?
|
||||
*/
|
||||
old_circuit = g_hash_table_lookup(circuit_hashtable, new_key);
|
||||
old_circuit = (circuit_t *)g_hash_table_lookup(circuit_hashtable, new_key);
|
||||
if (old_circuit != NULL) {
|
||||
/*
|
||||
* Yes. Find the last circuit in the list of circuits
|
||||
|
@ -179,7 +179,7 @@ find_circuit(circuit_type ctype, guint32 circuit_id, guint32 frame)
|
|||
* OK, search the list of circuits with that type and ID for
|
||||
* a circuit whose range of frames includes that frame number.
|
||||
*/
|
||||
for (circuit = g_hash_table_lookup(circuit_hashtable, &key);
|
||||
for (circuit = (circuit_t *)g_hash_table_lookup(circuit_hashtable, &key);
|
||||
circuit != NULL; circuit = circuit->next) {
|
||||
/*
|
||||
* The circuit includes that frame number if:
|
||||
|
@ -227,7 +227,7 @@ p_compare(gconstpointer a, gconstpointer b)
|
|||
void
|
||||
circuit_add_proto_data(circuit_t *conv, int proto, void *proto_data)
|
||||
{
|
||||
circuit_proto_data *p1 = se_alloc(sizeof(circuit_proto_data));
|
||||
circuit_proto_data *p1 = se_new(circuit_proto_data);
|
||||
|
||||
p1->proto = proto;
|
||||
p1->proto_data = proto_data;
|
||||
|
|
|
@ -43,7 +43,7 @@ static GHashTable *registered_codecs = NULL;
|
|||
codec_handle_t
|
||||
find_codec(const char *name)
|
||||
{
|
||||
return (registered_codecs) ? g_hash_table_lookup(registered_codecs, name) : NULL;
|
||||
return (registered_codecs) ? (codec_handle_t)g_hash_table_lookup(registered_codecs, name) : NULL;
|
||||
}
|
||||
|
||||
/* Register a codec by name. */
|
||||
|
@ -61,7 +61,7 @@ register_codec(const char *name, codec_init_fn init_fn, codec_release_fn release
|
|||
/* Make sure the registration is unique */
|
||||
g_assert(g_hash_table_lookup(registered_codecs, name) == NULL);
|
||||
|
||||
handle = g_malloc(sizeof (struct codec_handle));
|
||||
handle = (struct codec_handle *)g_malloc(sizeof (struct codec_handle));
|
||||
handle->name = name;
|
||||
handle->init_fn = init_fn;
|
||||
handle->release_fn = release_fn;
|
||||
|
|
|
@ -1458,7 +1458,7 @@ col_set_addr(packet_info *pinfo, const int col, const address *addr, const gbool
|
|||
pinfo->cinfo->col_expr.col_expr[col] = "ax25.src";
|
||||
else
|
||||
pinfo->cinfo->col_expr.col_expr[col] = "ax25.dst";
|
||||
g_strlcpy(pinfo->cinfo->col_expr.col_expr_val[col], ax25_to_str(addr->data), COL_MAX_LEN);
|
||||
g_strlcpy(pinfo->cinfo->col_expr.col_expr_val[col], ax25_to_str((guint8 *)addr->data), COL_MAX_LEN);
|
||||
break;
|
||||
|
||||
case AT_ETHER:
|
||||
|
@ -1474,7 +1474,7 @@ col_set_addr(packet_info *pinfo, const int col, const address *addr, const gbool
|
|||
pinfo->cinfo->col_expr.col_expr[col] = "ip.src";
|
||||
else
|
||||
pinfo->cinfo->col_expr.col_expr[col] = "ip.dst";
|
||||
ip_to_str_buf(addr->data, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
ip_to_str_buf((guint8 *)addr->data, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
break;
|
||||
|
||||
case AT_IPv6:
|
||||
|
|
|
@ -637,7 +637,7 @@ conversation_new(const guint32 setup_frame, const address *addr1, const address
|
|||
}
|
||||
}
|
||||
|
||||
new_key = se_alloc(sizeof(struct conversation_key));
|
||||
new_key = se_new(struct conversation_key);
|
||||
new_key->next = conversation_keys;
|
||||
conversation_keys = new_key;
|
||||
SE_COPY_ADDRESS(&new_key->addr1, addr1);
|
||||
|
@ -750,7 +750,7 @@ conversation_lookup_hashtable(GHashTable *hashtable, const guint32 frame_num, co
|
|||
key.port1 = port1;
|
||||
key.port2 = port2;
|
||||
|
||||
chain_head = g_hash_table_lookup(hashtable, &key);
|
||||
chain_head = (conversation_t *)g_hash_table_lookup(hashtable, &key);
|
||||
|
||||
if (chain_head && (chain_head->setup_frame <= frame_num)) {
|
||||
match = chain_head;
|
||||
|
@ -1135,7 +1135,7 @@ p_compare(gconstpointer a, gconstpointer b)
|
|||
void
|
||||
conversation_add_proto_data(conversation_t *conv, const int proto, void *proto_data)
|
||||
{
|
||||
conv_proto_data *p1 = se_alloc(sizeof(conv_proto_data));
|
||||
conv_proto_data *p1 = se_new(conv_proto_data);
|
||||
|
||||
p1->proto = proto;
|
||||
p1->proto_data = proto_data;
|
||||
|
|
|
@ -36,7 +36,7 @@ GList *dissector_filter_list = NULL;
|
|||
void register_dissector_filter(const char *name, is_filter_valid_func is_filter_valid, build_filter_string_func build_filter_string) {
|
||||
dissector_filter_t *entry;
|
||||
|
||||
entry = g_malloc(sizeof(dissector_filter_t));
|
||||
entry = (dissector_filter_t *)g_malloc(sizeof(dissector_filter_t));
|
||||
|
||||
entry->name = name;
|
||||
entry->is_filter_valid = is_filter_valid;
|
||||
|
|
|
@ -314,7 +314,7 @@ G_GNUC_NORETURN WS_MSVC_NORETURN void except_throwd(long group, long code, const
|
|||
*/
|
||||
G_GNUC_NORETURN WS_MSVC_NORETURN void except_throwf(long group, long code, const char *fmt, ...)
|
||||
{
|
||||
char *buf = except_alloc(XCEPT_BUFFER_SIZE);
|
||||
char *buf = (char *)except_alloc(XCEPT_BUFFER_SIZE);
|
||||
va_list vl;
|
||||
|
||||
va_start (vl, fmt);
|
||||
|
|
|
@ -176,7 +176,7 @@ expert_set_info_vformat(packet_info *pinfo, proto_item *pi, int group, int sever
|
|||
if (!tap)
|
||||
return;
|
||||
|
||||
ei = ep_alloc(sizeof(expert_info_t));
|
||||
ei = ep_new(expert_info_t);
|
||||
|
||||
ei->packet_num = PINFO_FD_NUM(pinfo);
|
||||
ei->group = group;
|
||||
|
|
|
@ -115,8 +115,8 @@ build_follow_filter( packet_info *pi ) {
|
|||
/* UDP over IPv4 */
|
||||
buf = g_strdup_printf(
|
||||
"(ip.addr eq %s and ip.addr eq %s) and (udp.port eq %d and udp.port eq %d)",
|
||||
ip_to_str( pi->net_src.data),
|
||||
ip_to_str( pi->net_dst.data),
|
||||
ip_to_str((guint8 *)pi->net_src.data),
|
||||
ip_to_str((guint8 *)pi->net_dst.data),
|
||||
pi->srcport, pi->destport );
|
||||
len = 4;
|
||||
is_ipv6 = FALSE;
|
||||
|
|
|
@ -62,7 +62,7 @@ p_compare(gconstpointer a, gconstpointer b)
|
|||
void
|
||||
p_add_proto_data(frame_data *fd, int proto, void *proto_data)
|
||||
{
|
||||
frame_proto_data *p1 = wmem_alloc(wmem_file_scope(), sizeof(frame_proto_data));
|
||||
frame_proto_data *p1 = (frame_proto_data *)wmem_alloc(wmem_file_scope(), sizeof(frame_proto_data));
|
||||
|
||||
p1->proto = proto;
|
||||
p1->proto_data = proto_data;
|
||||
|
|
|
@ -50,7 +50,7 @@ void funnel_register_menu(const char *name,
|
|||
void (*callback)(gpointer),
|
||||
gpointer callback_data,
|
||||
gboolean retap) {
|
||||
funnel_menu_t* m = g_malloc(sizeof(funnel_menu_t));
|
||||
funnel_menu_t* m = (funnel_menu_t *)g_malloc(sizeof(funnel_menu_t));
|
||||
m->name = g_strdup(name);
|
||||
m->group = group;
|
||||
m->callback = callback;
|
||||
|
|
|
@ -153,7 +153,7 @@ guids_get_guid_name(e_guid_t *guid)
|
|||
guidkey[0].length=4;
|
||||
guidkey[1].length=0;
|
||||
|
||||
if((name = pe_tree_lookup32_array(guid_to_name_tree, &guidkey[0]))){
|
||||
if((name = (char *)pe_tree_lookup32_array(guid_to_name_tree, &guidkey[0]))){
|
||||
return name;
|
||||
}
|
||||
|
||||
|
|
|
@ -83,10 +83,10 @@ h225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packe
|
|||
frame numbers are 1-origin, so we use 0
|
||||
to mean "we don't yet know in which frame
|
||||
the reply for this call appears". */
|
||||
new_h225ras_call_key = se_alloc(sizeof(h225ras_call_info_key));
|
||||
new_h225ras_call_key = se_new(h225ras_call_info_key);
|
||||
new_h225ras_call_key->reqSeqNum = h225ras_call_key->reqSeqNum;
|
||||
new_h225ras_call_key->conversation = h225ras_call_key->conversation;
|
||||
h225ras_call = se_alloc(sizeof(h225ras_call_t));
|
||||
h225ras_call = se_new(h225ras_call_t);
|
||||
h225ras_call->req_num = pinfo->fd->num;
|
||||
h225ras_call->rsp_num = 0;
|
||||
h225ras_call->requestSeqNum = h225ras_call_key->reqSeqNum;
|
||||
|
@ -109,7 +109,7 @@ h225ras_call_t * append_h225ras_call(h225ras_call_t *prev_call, packet_info *pin
|
|||
frame numbers are 1-origin, so we use 0
|
||||
to mean "we don't yet know in which frame
|
||||
the reply for this call appears". */
|
||||
h225ras_call = se_alloc(sizeof(h225ras_call_t));
|
||||
h225ras_call = se_new(h225ras_call_t);
|
||||
h225ras_call->req_num = pinfo->fd->num;
|
||||
h225ras_call->rsp_num = 0;
|
||||
h225ras_call->requestSeqNum = prev_call->requestSeqNum;
|
||||
|
|
|
@ -40,7 +40,7 @@ void next_tvb_init(next_tvb_list_t *list) {
|
|||
void next_tvb_add_handle(next_tvb_list_t *list, tvbuff_t *tvb, proto_tree *tree, dissector_handle_t handle) {
|
||||
next_tvb_item_t *item;
|
||||
|
||||
item = ep_alloc(sizeof(next_tvb_item_t));
|
||||
item = ep_new(next_tvb_item_t);
|
||||
|
||||
item->type = NTVB_HANDLE;
|
||||
item->handle = handle;
|
||||
|
@ -61,7 +61,7 @@ void next_tvb_add_handle(next_tvb_list_t *list, tvbuff_t *tvb, proto_tree *tree,
|
|||
void next_tvb_add_uint(next_tvb_list_t *list, tvbuff_t *tvb, proto_tree *tree, dissector_table_t table, guint32 uint_val) {
|
||||
next_tvb_item_t *item;
|
||||
|
||||
item = ep_alloc(sizeof(next_tvb_item_t));
|
||||
item = ep_new(next_tvb_item_t);
|
||||
|
||||
item->type = NTVB_UINT;
|
||||
item->table = table;
|
||||
|
@ -83,7 +83,7 @@ void next_tvb_add_uint(next_tvb_list_t *list, tvbuff_t *tvb, proto_tree *tree, d
|
|||
void next_tvb_add_string(next_tvb_list_t *list, tvbuff_t *tvb, proto_tree *tree, dissector_table_t table, const gchar *string) {
|
||||
next_tvb_item_t *item;
|
||||
|
||||
item = ep_alloc(sizeof(next_tvb_item_t));
|
||||
item = ep_new(next_tvb_item_t);
|
||||
|
||||
item->type = NTVB_STRING;
|
||||
item->table = table;
|
||||
|
|
|
@ -44,7 +44,7 @@ print_nsap_net( const guint8 *ad, int length )
|
|||
{
|
||||
gchar *cur;
|
||||
|
||||
cur = ep_alloc(MAX_NSAP_LEN * 3 + 50);
|
||||
cur = (gchar *)ep_alloc(MAX_NSAP_LEN * 3 + 50);
|
||||
print_nsap_net_buf( ad, length, cur, MAX_NSAP_LEN * 3 + 50);
|
||||
return( cur );
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ print_system_id( const guint8 *ad, int length )
|
|||
{
|
||||
gchar *cur;
|
||||
|
||||
cur = ep_alloc(MAX_SYSTEMID_LEN * 3 + 5);
|
||||
cur = (gchar *)ep_alloc(MAX_SYSTEMID_LEN * 3 + 5);
|
||||
print_system_id_buf(ad, length, cur, MAX_SYSTEMID_LEN * 3 + 5);
|
||||
return( cur );
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ print_area(const guint8 *ad, int length)
|
|||
{
|
||||
gchar *cur;
|
||||
|
||||
cur = ep_alloc(MAX_AREA_LEN * 3 + 20);
|
||||
cur = (gchar *)ep_alloc(MAX_AREA_LEN * 3 + 20);
|
||||
print_area_buf(ad, length, cur, MAX_AREA_LEN * 3 + 20);
|
||||
return cur;
|
||||
}
|
||||
|
|
|
@ -1509,7 +1509,7 @@ static prefs_set_pref_e column_format_set_cb(pref_t* pref, const gchar* value, g
|
|||
col_l_elt = col_l_elt->next;
|
||||
|
||||
/* Parse the format to see if it's valid. */
|
||||
if (!parse_column_format(&cfmt_check, col_l_elt->data)) {
|
||||
if (!parse_column_format(&cfmt_check, (char *)col_l_elt->data)) {
|
||||
/* It's not a valid column format. */
|
||||
prefs_clear_string_list(col_l);
|
||||
return PREFS_SET_SYNTAX_ERR;
|
||||
|
@ -1537,9 +1537,9 @@ static prefs_set_pref_e column_format_set_cb(pref_t* pref, const gchar* value, g
|
|||
col_l_elt = g_list_first(col_l);
|
||||
while(col_l_elt) {
|
||||
cfmt = g_new(fmt_data,1);
|
||||
cfmt->title = (gchar *)g_strdup(col_l_elt->data);
|
||||
cfmt->title = g_strdup((gchar *)col_l_elt->data);
|
||||
col_l_elt = col_l_elt->next;
|
||||
parse_column_format(cfmt, col_l_elt->data);
|
||||
parse_column_format(cfmt, (char *)col_l_elt->data);
|
||||
cfmt->visible = prefs_is_column_visible((gchar*)(*hidden_pref->varp.string), cfmt);
|
||||
col_l_elt = col_l_elt->next;
|
||||
*pref->varp.list = g_list_append(*pref->varp.list, cfmt);
|
||||
|
|
|
@ -49,7 +49,7 @@ range_t *range_empty(void)
|
|||
{
|
||||
range_t *range;
|
||||
|
||||
range = g_malloc(RANGE_HDR_SIZE);
|
||||
range = (range_t *)g_malloc(RANGE_HDR_SIZE);
|
||||
range->nranges = 0;
|
||||
return range;
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ range_convert_str_work(range_t **rangep, const gchar *es, guint32 max_value,
|
|||
return CVT_SYNTAX_ERROR;
|
||||
|
||||
/* Allocate a range; this has room for one subrange. */
|
||||
range = g_malloc(RANGE_HDR_SIZE + sizeof (range_admin_t));
|
||||
range = (range_t *)g_malloc(RANGE_HDR_SIZE + sizeof (range_admin_t));
|
||||
range->nranges = 0;
|
||||
nranges = 1;
|
||||
|
||||
|
@ -140,7 +140,7 @@ range_convert_str_work(range_t **rangep, const gchar *es, guint32 max_value,
|
|||
nranges = 4;
|
||||
else
|
||||
nranges += 4;
|
||||
range = g_realloc(range, RANGE_HDR_SIZE +
|
||||
range = (range_t *)g_realloc(range, RANGE_HDR_SIZE +
|
||||
nranges*sizeof (range_admin_t));
|
||||
}
|
||||
|
||||
|
@ -358,7 +358,7 @@ range_copy(range_t *src)
|
|||
return NULL;
|
||||
|
||||
range_size = RANGE_HDR_SIZE + src->nranges*sizeof (range_admin_t);
|
||||
dst = g_malloc(range_size);
|
||||
dst = (range_t *)g_malloc(range_size);
|
||||
memcpy(dst, src, range_size);
|
||||
return dst;
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ decompress_sigcomp_message(tvbuff_t *bytecode_tvb, tvbuff_t *message_tvb, packet
|
|||
{
|
||||
tvbuff_t *decomp_tvb;
|
||||
/* UDVM memory must be initialised to zero */
|
||||
guint8 *buff = ep_alloc0(UDVM_MEMORY_SIZE);
|
||||
guint8 *buff = (guint8 *)ep_alloc0(UDVM_MEMORY_SIZE);
|
||||
char string[2];
|
||||
guint8 *out_buff; /* Largest allowed size for a message is UDVM_MEMORY_SIZE = 65536 */
|
||||
guint32 i = 0;
|
||||
|
@ -316,7 +316,7 @@ decompress_sigcomp_message(tvbuff_t *bytecode_tvb, tvbuff_t *message_tvb, packet
|
|||
|
||||
}
|
||||
/* Largest allowed size for a message is UDVM_MEMORY_SIZE = 65536 */
|
||||
out_buff = g_malloc(UDVM_MEMORY_SIZE);
|
||||
out_buff = (guint8 *)g_malloc(UDVM_MEMORY_SIZE);
|
||||
/* Start executing code */
|
||||
current_address = udvm_start_ip;
|
||||
input_address = 0;
|
||||
|
@ -2666,7 +2666,7 @@ execute_next_instruction:
|
|||
byte_copy_left = buff[64] << 8;
|
||||
byte_copy_left = byte_copy_left | buff[65];
|
||||
while ( n < no_of_state_create + 1 ){
|
||||
sha1buff = g_malloc(state_length_buff[n]+8);
|
||||
sha1buff = (guint8 *)g_malloc(state_length_buff[n]+8);
|
||||
sha1buff[0] = state_length_buff[n] >> 8;
|
||||
sha1buff[1] = state_length_buff[n] & 0xff;
|
||||
sha1buff[2] = state_address_buff[n] >> 8;
|
||||
|
|
|
@ -628,7 +628,7 @@ sigcomp_init_udvm(void){
|
|||
/*
|
||||
* Store static dictionaries in hash table
|
||||
*/
|
||||
sip_sdp_buff = g_malloc(SIP_SDP_STATE_LENGTH + 8);
|
||||
sip_sdp_buff = (guint8 *)g_malloc(SIP_SDP_STATE_LENGTH + 8);
|
||||
|
||||
partial_state_str = bytes_to_str(sip_sdp_state_identifier, 6);
|
||||
|
||||
|
@ -652,7 +652,7 @@ sigcomp_init_udvm(void){
|
|||
* g_warning("g_hash_table_insert = 0x%x",sip_sdp_buff);
|
||||
*/
|
||||
|
||||
presence_buff = g_malloc(PRESENCE_STATE_LENGTH + 8);
|
||||
presence_buff = (guint8 *)g_malloc(PRESENCE_STATE_LENGTH + 8);
|
||||
|
||||
partial_state_str = bytes_to_str(presence_state_identifier, 6);
|
||||
|
||||
|
@ -713,7 +713,7 @@ int udvm_state_access(tvbuff_t *tvb, proto_tree *tree,guint8 *buff,guint16 p_id_
|
|||
* g_warning("g_hash_table_lookup = 0x%x",state_buff);
|
||||
* g_warning("State Access: partial state =%s",partial_state_str);
|
||||
*/
|
||||
state_buff = g_hash_table_lookup(state_buffer_table, partial_state_str);
|
||||
state_buff = (guint8 *)g_hash_table_lookup(state_buffer_table, partial_state_str);
|
||||
if ( state_buff == NULL ){
|
||||
result_code = 2; /* No state match */
|
||||
return result_code;
|
||||
|
@ -820,7 +820,7 @@ void udvm_state_create(guint8 *state_buff,guint8 *state_identifier,guint16 p_id_
|
|||
}
|
||||
partial_state_str = bytes_to_str(partial_state, p_id_length);
|
||||
|
||||
dummy_buff = g_hash_table_lookup(state_buffer_table, partial_state_str);
|
||||
dummy_buff = (gchar *)g_hash_table_lookup(state_buffer_table, partial_state_str);
|
||||
if ( dummy_buff == NULL ){
|
||||
g_hash_table_insert(state_buffer_table, g_strdup(partial_state_str), state_buff);
|
||||
}else{
|
||||
|
|
|
@ -37,7 +37,7 @@ sna_fid_to_str(const address *addr)
|
|||
{
|
||||
gchar *cur;
|
||||
|
||||
cur=ep_alloc(14);
|
||||
cur=(gchar *)ep_alloc(14);
|
||||
sna_fid_to_str_buf(addr, cur, 14);
|
||||
return cur;
|
||||
}
|
||||
|
@ -51,12 +51,12 @@ sna_fid_to_str_buf(const address *addr, gchar *buf, int buf_len)
|
|||
switch (addr->len) {
|
||||
|
||||
case 1:
|
||||
addrdata = addr->data;
|
||||
addrdata = (guint8 *)addr->data;
|
||||
g_snprintf(buf, buf_len, "%04X", addrdata[0]);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
addrdata = addr->data;
|
||||
addrdata = (guint8 *)addr->data;
|
||||
g_snprintf(buf, buf_len, "%04X", pntohs(&addrdata[0]));
|
||||
break;
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ register_stat_cmd_arg(const char *cmd, void (*func)(const char*, void*),void* us
|
|||
{
|
||||
stat_cmd_arg *newsca;
|
||||
|
||||
newsca=g_malloc(sizeof(stat_cmd_arg));
|
||||
newsca=(stat_cmd_arg *)g_malloc(sizeof(stat_cmd_arg));
|
||||
newsca->cmd=cmd;
|
||||
newsca->func=func;
|
||||
newsca->userdata=userdata;
|
||||
|
@ -86,9 +86,9 @@ process_stat_cmd_arg(char *optstr)
|
|||
stat_requested *tr;
|
||||
|
||||
for(entry=stat_cmd_arg_list;entry;entry=g_slist_next(entry)){
|
||||
sca=entry->data;
|
||||
sca=(stat_cmd_arg *)entry->data;
|
||||
if(!strncmp(sca->cmd,optstr,strlen(sca->cmd))){
|
||||
tr=g_malloc(sizeof (stat_requested));
|
||||
tr=(stat_requested *)g_malloc(sizeof (stat_requested));
|
||||
tr->sca = sca;
|
||||
tr->arg=g_strdup(optstr);
|
||||
stats_requested=g_slist_append(stats_requested, tr);
|
||||
|
@ -108,7 +108,7 @@ list_stat_cmd_args(void)
|
|||
stat_cmd_arg *sca;
|
||||
|
||||
for(entry=stat_cmd_arg_list;entry;entry=g_slist_next(entry)){
|
||||
sca=entry->data;
|
||||
sca=(stat_cmd_arg *)entry->data;
|
||||
fprintf(stderr," %s\n",sca->cmd);
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ start_requested_stats(void)
|
|||
stat_requested *sr;
|
||||
|
||||
while(stats_requested){
|
||||
sr=stats_requested->data;
|
||||
sr=(stat_requested *)stats_requested->data;
|
||||
(*sr->sca->func)(sr->arg,sr->sca->userdata);
|
||||
g_free(sr->arg);
|
||||
g_free(sr);
|
||||
|
|
|
@ -123,7 +123,7 @@ register_tap(const char *name)
|
|||
return tap_id;
|
||||
}
|
||||
|
||||
td=g_malloc(sizeof(tap_dissector_t));
|
||||
td=(tap_dissector_t *)g_malloc(sizeof(tap_dissector_t));
|
||||
td->next=NULL;
|
||||
td->name = g_strdup(name);
|
||||
|
||||
|
@ -399,7 +399,7 @@ register_tap_listener(const char *tapname, void *tapdata, const char *fstring,
|
|||
return error_string;
|
||||
}
|
||||
|
||||
tl=g_malloc(sizeof(tap_listener_t));
|
||||
tl=(tap_listener_t *)g_malloc(sizeof(tap_listener_t));
|
||||
tl->code=NULL;
|
||||
tl->needs_redraw=TRUE;
|
||||
tl->flags=flags;
|
||||
|
|
|
@ -136,7 +136,7 @@ value_string_ext_new(value_string *vs, guint vs_tot_num_entries, const gchar *vs
|
|||
g_assert (vs_name != NULL);
|
||||
g_assert (vs_tot_num_entries > 0);
|
||||
g_assert (vs[vs_tot_num_entries-1].strptr == NULL); /* Null-terminated value-string ? */
|
||||
vse = g_malloc(sizeof (value_string_ext));
|
||||
vse = (value_string_ext *)g_malloc(sizeof (value_string_ext));
|
||||
vse->_vs_p = vs;
|
||||
vse->_vs_num_entries = vs_tot_num_entries - 1; /* remember the actual number of entries */
|
||||
vse->_vs_first_value = 0; /* initialized in _match_strval_ext_init */
|
||||
|
|
|
@ -474,17 +474,17 @@ wmem_block_split_free_chunk(wmem_block_allocator_t *allocator,
|
|||
* then update anything that may have pointed to it to point to the
|
||||
* new address instead */
|
||||
wmem_block_chunk_t *prev, *next;
|
||||
wmem_block_free_t *old, *new;
|
||||
wmem_block_free_t *old_blk, *new_blk;
|
||||
|
||||
old = WMEM_GET_FREE(chunk);
|
||||
new = WMEM_GET_FREE(extra);
|
||||
old_blk = WMEM_GET_FREE(chunk);
|
||||
new_blk = WMEM_GET_FREE(extra);
|
||||
|
||||
prev = old->prev;
|
||||
next = old->next;
|
||||
prev = old_blk->prev;
|
||||
next = old_blk->next;
|
||||
|
||||
new->in_free_list = TRUE;
|
||||
new->prev = prev;
|
||||
new->next = next;
|
||||
new_blk->in_free_list = TRUE;
|
||||
new_blk->prev = prev;
|
||||
new_blk->next = next;
|
||||
|
||||
if (prev) WMEM_GET_FREE(prev)->next = extra;
|
||||
if (next) WMEM_GET_FREE(next)->prev = extra;
|
||||
|
|
|
@ -77,7 +77,7 @@ static void
|
|||
wmem_strict_ghash_check_canaries(gpointer key _U_, gpointer value,
|
||||
gpointer user_data _U_)
|
||||
{
|
||||
wmem_strict_block_check_canaries(value);
|
||||
wmem_strict_block_check_canaries((wmem_strict_allocator_block_t *)value);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -93,7 +93,7 @@ wmem_strict_block_free(wmem_strict_allocator_block_t *block)
|
|||
static void
|
||||
wmem_strict_ghash_block_free(gpointer data)
|
||||
{
|
||||
wmem_strict_block_free(data);
|
||||
wmem_strict_block_free((wmem_strict_allocator_block_t *)data);
|
||||
}
|
||||
|
||||
static wmem_strict_allocator_block_t *
|
||||
|
@ -104,7 +104,7 @@ wmem_strict_block_new(const size_t size)
|
|||
block = g_slice_new(wmem_strict_allocator_block_t);
|
||||
|
||||
block->data_len = size;
|
||||
block->leading_canary = g_malloc(block->data_len + (2 * WMEM_CANARY_SIZE));
|
||||
block->leading_canary = (guint8 *)g_malloc(block->data_len + (2 * WMEM_CANARY_SIZE));
|
||||
block->real_data = block->leading_canary + WMEM_CANARY_SIZE;
|
||||
block->trailing_canary = block->real_data + block->data_len;
|
||||
|
||||
|
@ -143,7 +143,7 @@ wmem_strict_free(void *private_data, void *ptr)
|
|||
|
||||
allocator = (wmem_strict_allocator_t*) private_data;
|
||||
|
||||
block = g_hash_table_lookup(allocator->block_table, ptr);
|
||||
block = (wmem_strict_allocator_block_t *)g_hash_table_lookup(allocator->block_table, ptr);
|
||||
|
||||
g_assert(block);
|
||||
|
||||
|
@ -162,7 +162,7 @@ wmem_strict_realloc(void *private_data, void *ptr, const size_t size)
|
|||
allocator = (wmem_strict_allocator_t*) private_data;
|
||||
|
||||
/* retrieve and check the old block */
|
||||
block = g_hash_table_lookup(allocator->block_table, ptr);
|
||||
block = (wmem_strict_allocator_block_t *)g_hash_table_lookup(allocator->block_table, ptr);
|
||||
g_assert(block);
|
||||
wmem_strict_block_check_canaries(block);
|
||||
|
||||
|
|
|
@ -99,14 +99,14 @@ wmem_slist_remove(wmem_slist_t *slist, void *data)
|
|||
void
|
||||
wmem_slist_prepend(wmem_slist_t *slist, void *data)
|
||||
{
|
||||
wmem_slist_frame_t *new;
|
||||
wmem_slist_frame_t *new_frame;
|
||||
|
||||
new = wmem_new(slist->allocator, wmem_slist_frame_t);
|
||||
new_frame = wmem_new(slist->allocator, wmem_slist_frame_t);
|
||||
|
||||
new->data = data;
|
||||
new->next = slist->front;
|
||||
new_frame->data = data;
|
||||
new_frame->next = slist->front;
|
||||
|
||||
slist->front = new;
|
||||
slist->front = new_frame;
|
||||
slist->count++;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,16 +58,16 @@ wmem_strbuf_sized_new(wmem_allocator_t *allocator,
|
|||
{
|
||||
wmem_strbuf_t *strbuf;
|
||||
|
||||
g_assert(alloc_len <= max_len);
|
||||
g_assert((max_len == 0) || (alloc_len <= max_len));
|
||||
|
||||
strbuf = wmem_alloc(allocator, sizeof(wmem_strbuf_t));
|
||||
strbuf = (wmem_strbuf_t *)wmem_alloc(allocator, sizeof(wmem_strbuf_t));
|
||||
|
||||
strbuf->allocator = allocator;
|
||||
strbuf->len = 0;
|
||||
strbuf->alloc_len = alloc_len ? alloc_len : DEFAULT_MINIMUM_LEN;
|
||||
strbuf->max_len = max_len;
|
||||
|
||||
strbuf->str = wmem_alloc(strbuf->allocator, strbuf->alloc_len);
|
||||
strbuf->str = (gchar *)wmem_alloc(strbuf->allocator, strbuf->alloc_len);
|
||||
strbuf->str[0] = '\0';
|
||||
|
||||
return strbuf;
|
||||
|
@ -119,7 +119,7 @@ wmem_strbuf_grow(wmem_strbuf_t *strbuf, const gsize to_add)
|
|||
return;
|
||||
}
|
||||
|
||||
strbuf->str = wmem_realloc(strbuf->allocator, strbuf->str, new_alloc_len);
|
||||
strbuf->str = (gchar *)wmem_realloc(strbuf->allocator, strbuf->str, new_alloc_len);
|
||||
|
||||
strbuf->alloc_len = new_alloc_len;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ wmem_strdup(wmem_allocator_t *allocator, const gchar *src)
|
|||
|
||||
len = strlen(src) + 1; /* +1 for the null-terminator */
|
||||
|
||||
return memcpy(wmem_alloc(allocator, len), src, len);
|
||||
return (gchar *)memcpy(wmem_alloc(allocator, len), src, len);
|
||||
}
|
||||
|
||||
gchar *
|
||||
|
@ -56,7 +56,7 @@ wmem_strndup(wmem_allocator_t *allocator, const gchar *src, const size_t len)
|
|||
gchar *dst;
|
||||
guint i;
|
||||
|
||||
dst = wmem_alloc(allocator, len+1);
|
||||
dst = (gchar *)wmem_alloc(allocator, len+1);
|
||||
|
||||
for (i=0; (i < len) && src[i]; i++) {
|
||||
dst[i] = src[i];
|
||||
|
@ -91,7 +91,7 @@ wmem_strdup_vprintf(wmem_allocator_t *allocator, const gchar *fmt, va_list ap)
|
|||
|
||||
len = g_printf_string_upper_bound(fmt, ap);
|
||||
|
||||
dst = wmem_alloc(allocator, len+1);
|
||||
dst = (gchar *)wmem_alloc(allocator, len+1);
|
||||
g_vsnprintf(dst, (gulong) len, fmt, ap2);
|
||||
va_end(ap2);
|
||||
|
||||
|
|
8
file.c
8
file.c
|
@ -2655,7 +2655,7 @@ write_pdml_packet(capture_file *cf _U_, frame_data *fdata,
|
|||
struct wtap_pkthdr *phdr, const guint8 *pd,
|
||||
void *argsp)
|
||||
{
|
||||
FILE *fh = argsp;
|
||||
FILE *fh = (FILE *)argsp;
|
||||
epan_dissect_t edt;
|
||||
|
||||
/* Create the protocol tree, but don't fill in the column information. */
|
||||
|
@ -2725,7 +2725,7 @@ write_psml_packet(capture_file *cf, frame_data *fdata,
|
|||
struct wtap_pkthdr *phdr, const guint8 *pd,
|
||||
void *argsp)
|
||||
{
|
||||
FILE *fh = argsp;
|
||||
FILE *fh = (FILE *)argsp;
|
||||
epan_dissect_t edt;
|
||||
gboolean proto_tree_needed;
|
||||
|
||||
|
@ -2800,7 +2800,7 @@ write_csv_packet(capture_file *cf, frame_data *fdata,
|
|||
struct wtap_pkthdr *phdr, const guint8 *pd,
|
||||
void *argsp)
|
||||
{
|
||||
FILE *fh = argsp;
|
||||
FILE *fh = (FILE *)argsp;
|
||||
epan_dissect_t edt;
|
||||
gboolean proto_tree_needed;
|
||||
|
||||
|
@ -2875,7 +2875,7 @@ write_carrays_packet(capture_file *cf _U_, frame_data *fdata,
|
|||
struct wtap_pkthdr *phdr,
|
||||
const guint8 *pd, void *argsp)
|
||||
{
|
||||
FILE *fh = argsp;
|
||||
FILE *fh = (FILE *)argsp;
|
||||
epan_dissect_t edt;
|
||||
|
||||
epan_dissect_init(&edt, TRUE, TRUE);
|
||||
|
|
|
@ -679,7 +679,7 @@ asn1_bits_decode ( ASN1_SCK *asn1, int enc_len, guchar **bits,
|
|||
*/
|
||||
if (enc_len != 0) {
|
||||
tvb_ensure_bytes_exist(asn1->tvb, asn1->offset, enc_len);
|
||||
*bits = g_malloc (enc_len);
|
||||
*bits = (guchar *)g_malloc (enc_len);
|
||||
} else {
|
||||
/*
|
||||
* If the length is 0, we allocate a 1-byte buffer, as
|
||||
|
@ -687,7 +687,7 @@ asn1_bits_decode ( ASN1_SCK *asn1, int enc_len, guchar **bits,
|
|||
* and our caller expects us to return a pointer to a
|
||||
* buffer.
|
||||
*/
|
||||
*bits = g_malloc (1);
|
||||
*bits = (guchar *)g_malloc (1);
|
||||
}
|
||||
|
||||
ptr = *bits;
|
||||
|
@ -737,7 +737,7 @@ asn1_string_value_decode ( ASN1_SCK *asn1, int enc_len, guchar **octets)
|
|||
*/
|
||||
if (enc_len != 0)
|
||||
tvb_ensure_bytes_exist(asn1->tvb, asn1->offset, enc_len);
|
||||
*octets = g_malloc (enc_len+1);
|
||||
*octets = (guchar *)g_malloc (enc_len+1);
|
||||
|
||||
eoc = asn1->offset + enc_len;
|
||||
ptr = *octets;
|
||||
|
@ -904,7 +904,7 @@ asn1_oid_value_decode ( ASN1_SCK *asn1, int enc_len, subid_t **oid, guint *len)
|
|||
eoc = asn1->offset + enc_len;
|
||||
|
||||
size = enc_len + 1;
|
||||
*oid = g_malloc(size * sizeof(gulong));
|
||||
*oid = (guint32 *)g_malloc(size * sizeof(gulong));
|
||||
optr = *oid;
|
||||
|
||||
ret = asn1_subid_decode (asn1, &subid);
|
||||
|
|
|
@ -550,7 +550,7 @@ static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* r
|
|||
}
|
||||
if (iap_conv->pnext == NULL)
|
||||
{
|
||||
iap_conv->pnext = se_alloc(sizeof(iap_conversation_t));
|
||||
iap_conv->pnext = se_new(iap_conversation_t);
|
||||
iap_conv = iap_conv->pnext;
|
||||
break;
|
||||
}
|
||||
|
@ -560,7 +560,7 @@ static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* r
|
|||
else
|
||||
{
|
||||
conv = conversation_new(pinfo->fd->num, &srcaddr, &destaddr, PT_NONE, pinfo->srcport, pinfo->destport, 0);
|
||||
iap_conv = se_alloc(sizeof(iap_conversation_t));
|
||||
iap_conv = se_new(iap_conversation_t);
|
||||
conversation_add_proto_data(conv, proto_iap, (void*)iap_conv);
|
||||
}
|
||||
|
||||
|
@ -1224,7 +1224,7 @@ void add_lmp_conversation(packet_info* pinfo, guint8 dlsap, gboolean ttp, dissec
|
|||
|
||||
if (lmp_conv->pnext == NULL)
|
||||
{
|
||||
lmp_conv->pnext = se_alloc(sizeof(lmp_conversation_t));
|
||||
lmp_conv->pnext = se_new(lmp_conversation_t);
|
||||
lmp_conv = lmp_conv->pnext;
|
||||
break;
|
||||
}
|
||||
|
@ -1234,7 +1234,7 @@ void add_lmp_conversation(packet_info* pinfo, guint8 dlsap, gboolean ttp, dissec
|
|||
else
|
||||
{
|
||||
conv = conversation_new(pinfo->fd->num, &destaddr, &srcaddr, PT_NONE, dlsap, 0, NO_PORT_B);
|
||||
lmp_conv = se_alloc(sizeof(lmp_conversation_t));
|
||||
lmp_conv = se_new(lmp_conversation_t);
|
||||
conversation_add_proto_data(conv, proto_irlmp, (void*)lmp_conv);
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ unescape_data(tvbuff_t *tvb, packet_info *pinfo)
|
|||
} else {
|
||||
guint length = tvb_length(tvb);
|
||||
guint offset;
|
||||
guint8 *data = g_malloc(length);
|
||||
guint8 *data = (guint8 *)g_malloc(length);
|
||||
guint8 *dst = data;
|
||||
tvbuff_t *next_tvb;
|
||||
|
||||
|
|
|
@ -75,8 +75,8 @@ static uat_t * plen_uat = NULL;
|
|||
static guint num_plen_uat = 0;
|
||||
|
||||
static void* uat_plen_record_copy_cb(void* n, const void* o, size_t siz _U_) {
|
||||
const uat_plen_record_t *r = o;
|
||||
uat_plen_record_t *rn = n;
|
||||
const uat_plen_record_t *r = (const uat_plen_record_t *)o;
|
||||
uat_plen_record_t *rn = (uat_plen_record_t *)n;
|
||||
|
||||
if (r->packet_range)
|
||||
rn->packet_range = range_copy(r->packet_range);
|
||||
|
@ -150,7 +150,7 @@ static const gchar* st_str_plen = "Packet Lengths";
|
|||
|
||||
static void plen_stats_tree_init(stats_tree* st) {
|
||||
guint i;
|
||||
char **str_range_array = ep_alloc(num_plen_uat*sizeof(char*));
|
||||
char **str_range_array = (char **)ep_alloc(num_plen_uat*sizeof(char*));
|
||||
|
||||
/* Convert the ranges to strings for the stats tree API */
|
||||
for (i = 0; i < num_plen_uat; i++) {
|
||||
|
@ -217,7 +217,7 @@ void register_pinfo_stat_trees(void) {
|
|||
sizeof(uat_plen_record_t), /* record size */
|
||||
"packet_lengths", /* filename */
|
||||
TRUE, /* from_profile */
|
||||
(void*) &uat_plen_records, /* data_ptr */
|
||||
(void**) &uat_plen_records, /* data_ptr */
|
||||
&num_plen_uat, /* numitems_ptr */
|
||||
0, /* not a dissector, so affects neither dissection nor fields */
|
||||
NULL, /* help */
|
||||
|
|
|
@ -265,7 +265,7 @@ static const value_string fast_fb_types[] =
|
|||
|
||||
/* Extended sub-headers */
|
||||
/* DL sub-header types */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDU_SN,
|
||||
DL_SLEEP_CONTROL,
|
||||
|
@ -273,7 +273,7 @@ FEEDBACK_REQ,
|
|||
SN_REQ,
|
||||
PDU_SN_SHORT_DL,
|
||||
PDU_SN_LONG_DL
|
||||
} DL_EXT_SUBHEADER;
|
||||
} DL_EXT_SUBHEADER_e;
|
||||
|
||||
static const value_string dl_ext_sub_header_type[] =
|
||||
{
|
||||
|
@ -324,14 +324,14 @@ static const value_string uiuc_values[] =
|
|||
};
|
||||
|
||||
/* UL sub-header types */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
MIMO_MODE_FEEDBACK,
|
||||
UL_TX_POWER_REPORT,
|
||||
MINI_FEEDBACK,
|
||||
PDU_SN_SHORT_UL,
|
||||
PDU_SN_LONG_UL
|
||||
} UL_EXT_SUBHEADER;
|
||||
} UL_EXT_SUBHEADER_e;
|
||||
|
||||
static const value_string ul_ext_sub_header_type[] =
|
||||
{
|
||||
|
@ -503,7 +503,7 @@ static gint hf_mac_header_generic_fast_fb_subhd_fb_type = -1;
|
|||
#define GRANT_MGMT_SUBHEADER_EXT_FLI_MASK 0x0010 /*0x0800*/
|
||||
#define GRANT_MGMT_SUBHEADER_EXT_FL_MASK 0x000F /*0xF000*/
|
||||
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SCHEDULE_SERVICE_TYPE_RSVD,
|
||||
SCHEDULE_SERVICE_TYPE_UNDEFINED,
|
||||
|
@ -512,7 +512,7 @@ enum
|
|||
SCHEDULE_SERVICE_TYPE_RTPS,
|
||||
SCHEDULE_SERVICE_TYPE_EXT_RTPS,
|
||||
SCHEDULE_SERVICE_TYPE_UGS
|
||||
} SCHEDULE_SERVICE_TYPE;
|
||||
} SCHEDULE_SERVICE_TYPE_e;
|
||||
|
||||
static gint hf_mac_header_generic_grant_mgmt_ugs_tree = -1;
|
||||
static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_si = -1;
|
||||
|
@ -1029,8 +1029,8 @@ void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto
|
|||
while (pinfo->fd->num > cid_adj_array_size)
|
||||
{
|
||||
cid_adj_array_size += 1024;
|
||||
cid_adj_array = g_realloc(cid_adj_array, (int)sizeof(guint) * cid_adj_array_size);
|
||||
frag_num_array = g_realloc(frag_num_array, (int)sizeof(guint8) * cid_adj_array_size);
|
||||
cid_adj_array = (guint *)g_realloc(cid_adj_array, (int)sizeof(guint) * cid_adj_array_size);
|
||||
frag_num_array = (guint8 *)g_realloc(frag_num_array, (int)sizeof(guint8) * cid_adj_array_size);
|
||||
/* Clear the added memory */
|
||||
memset(&cid_adj_array[cid_adj_array_size - 1024], 0, (int)sizeof(guint) * 1024);
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ static gint hf_mac_header_type_1_value_bytes = -1;
|
|||
#define WIMAX_MAC_HEADER_SIZE 6
|
||||
|
||||
/* WiMax MAC Header Type I Sub Types */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
BR_INCREMENTAL, /* 0 */
|
||||
BR_AGGREGATE, /* 1 */
|
||||
|
@ -62,7 +62,7 @@ enum
|
|||
SN_REPORT, /* 6 */
|
||||
CQICH_ALLOCATION_REQUEST, /* 7 */
|
||||
TYPE_I_SUBTYPE_MAX
|
||||
} TYPE_I_SUBTYPE;
|
||||
} TYPE_I_SUBTYPE_e;
|
||||
|
||||
static const char *type1_subtype_abbrv[TYPE_I_SUBTYPE_MAX] =
|
||||
{
|
||||
|
|
|
@ -51,7 +51,7 @@ static gint hf_mac_header_type_2_value_bytes = -1;
|
|||
#define WIMAX_MAC_HEADER_SIZE 6
|
||||
|
||||
/* WiMax MAC Header Type II Feedback Types */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
CQI_MIMO_FB, /* 0 */
|
||||
DL_AVG_CINR, /* 1 */
|
||||
|
@ -68,7 +68,7 @@ enum
|
|||
CINR_FB, /* 12 */
|
||||
CL_MIMO_FB, /* 13 */
|
||||
TYPE_II_FB_TYPE_MAX
|
||||
} TYPE_II_FB_TYPE;
|
||||
} TYPE_II_FB_TYPE_e;
|
||||
|
||||
static const char *type2_fb_type_abbrv[TYPE_II_FB_TYPE_MAX] =
|
||||
{
|
||||
|
|
4
print.c
4
print.c
|
@ -143,7 +143,7 @@ proto_tree_print(print_args_t *print_args, epan_dissect_t *edt,
|
|||
data.stream = stream;
|
||||
data.success = TRUE;
|
||||
data.src_list = edt->pi.data_src;
|
||||
data.encoding = edt->pi.fd->flags.encoding;
|
||||
data.encoding = (packet_char_enc)edt->pi.fd->flags.encoding;
|
||||
data.print_dissections = print_args->print_dissections;
|
||||
/* If we're printing the entire packet in hex, don't
|
||||
print uninterpreted data fields in hex as well. */
|
||||
|
@ -920,7 +920,7 @@ print_hex_data(print_stream_t *stream, epan_dissect_t *edt)
|
|||
return TRUE;
|
||||
cp = tvb_get_ptr(tvb, 0, length);
|
||||
if (!print_hex_data_buffer(stream, cp, length,
|
||||
edt->pi.fd->flags.encoding))
|
||||
(packet_char_enc)edt->pi.fd->flags.encoding))
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
|
|
10
rawshark.c
10
rawshark.c
|
@ -445,7 +445,7 @@ main(int argc, char *argv[])
|
|||
gchar *rfilters[64];
|
||||
e_prefs *prefs_p;
|
||||
char badopt;
|
||||
GLogLevelFlags log_flags;
|
||||
int log_flags;
|
||||
GPtrArray *disp_fields = g_ptr_array_new();
|
||||
guint fc;
|
||||
gboolean skip_pcap_header = FALSE;
|
||||
|
@ -515,10 +515,10 @@ main(int argc, char *argv[])
|
|||
G_LOG_LEVEL_DEBUG;
|
||||
|
||||
g_log_set_handler(NULL,
|
||||
log_flags,
|
||||
(GLogLevelFlags)log_flags,
|
||||
log_func_ignore, NULL /* user_data */);
|
||||
g_log_set_handler(LOG_DOMAIN_CAPTURE_CHILD,
|
||||
log_flags,
|
||||
(GLogLevelFlags)log_flags,
|
||||
log_func_ignore, NULL /* user_data */);
|
||||
|
||||
timestamp_set_type(TS_RELATIVE);
|
||||
|
@ -1427,14 +1427,14 @@ protocolinfo_init(char *field)
|
|||
printf("%u %s %s - ",
|
||||
g_cmd_line_index,
|
||||
ftenum_to_string(hfi),
|
||||
absolute_time_display_e_to_string(hfi->display));
|
||||
absolute_time_display_e_to_string((absolute_time_display_e)hfi->display));
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("%u %s %s - ",
|
||||
g_cmd_line_index,
|
||||
ftenum_to_string(hfi),
|
||||
base_display_e_to_string(hfi->display));
|
||||
base_display_e_to_string((base_display_e)hfi->display));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* Write out each sorted frame in turn */
|
||||
for (i = 0; i < frames->len; i++) {
|
||||
FrameRecord_t *frame = frames->pdata[i];
|
||||
FrameRecord_t *frame = (FrameRecord_t *)frames->pdata[i];
|
||||
|
||||
/* Avoid writing if already sorted and configured to */
|
||||
if (write_output_regardless || (wrong_order_count > 0)) {
|
||||
|
|
12
tshark.c
12
tshark.c
|
@ -903,7 +903,7 @@ main(int argc, char *argv[])
|
|||
dfilter_t *rfcode = NULL;
|
||||
e_prefs *prefs_p;
|
||||
char badopt;
|
||||
GLogLevelFlags log_flags;
|
||||
int log_flags;
|
||||
int optind_initial;
|
||||
gchar *output_only = NULL;
|
||||
|
||||
|
@ -1039,18 +1039,18 @@ main(int argc, char *argv[])
|
|||
G_LOG_FLAG_FATAL|G_LOG_FLAG_RECURSION;
|
||||
|
||||
g_log_set_handler(NULL,
|
||||
log_flags,
|
||||
(GLogLevelFlags)log_flags,
|
||||
tshark_log_handler, NULL /* user_data */);
|
||||
g_log_set_handler(LOG_DOMAIN_MAIN,
|
||||
log_flags,
|
||||
(GLogLevelFlags)log_flags,
|
||||
tshark_log_handler, NULL /* user_data */);
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
g_log_set_handler(LOG_DOMAIN_CAPTURE,
|
||||
log_flags,
|
||||
(GLogLevelFlags)log_flags,
|
||||
tshark_log_handler, NULL /* user_data */);
|
||||
g_log_set_handler(LOG_DOMAIN_CAPTURE_CHILD,
|
||||
log_flags,
|
||||
(GLogLevelFlags)log_flags,
|
||||
tshark_log_handler, NULL /* user_data */);
|
||||
#endif
|
||||
|
||||
|
@ -2392,7 +2392,7 @@ capture_input_new_file(capture_options *capture_opts, gchar *new_file)
|
|||
/* if we are in real-time mode, open the new file now */
|
||||
if (do_dissection) {
|
||||
/* Attempt to open the capture file and set up to read from it. */
|
||||
switch(cf_open(capture_opts->cf, capture_opts->save_file, is_tempfile, &err)) {
|
||||
switch(cf_open((capture_file *)capture_opts->cf, capture_opts->save_file, is_tempfile, &err)) {
|
||||
case CF_OK:
|
||||
break;
|
||||
case CF_ERROR:
|
||||
|
|
|
@ -83,7 +83,7 @@ static void
|
|||
ansi_a_stat_draw(
|
||||
void *tapdata)
|
||||
{
|
||||
ansi_a_stat_t *stat_p = tapdata;
|
||||
ansi_a_stat_t *stat_p = (ansi_a_stat_t *)tapdata;
|
||||
guint8 i;
|
||||
|
||||
|
||||
|
@ -133,7 +133,7 @@ ansi_a_stat_init(const char *optarg _U_, void* userdata _U_)
|
|||
ansi_a_stat_t *stat_p;
|
||||
GString *err_p;
|
||||
|
||||
stat_p = g_malloc(sizeof(ansi_a_stat_t));
|
||||
stat_p = (ansi_a_stat_t *)g_malloc(sizeof(ansi_a_stat_t));
|
||||
|
||||
memset(stat_p, 0, sizeof(ansi_a_stat_t));
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ comparestat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
cksum_vec[1].ptr=&ci->ip_p;
|
||||
cksum_vec[1].len=1;
|
||||
/* skip header checksum and ip's (because of NAT)*/
|
||||
cksum_vec[2].ptr=ci->ip_dst.data;
|
||||
cksum_vec[2].ptr=(guint8 *)ci->ip_dst.data;
|
||||
cksum_vec[2].ptr=cksum_vec[2].ptr+ci->ip_dst.len;
|
||||
/* dynamic computation */
|
||||
cksum_vec[2].len=pinfo->iphdrlen-20;
|
||||
|
|
|
@ -60,7 +60,7 @@ static int
|
|||
dcerpcstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pri)
|
||||
{
|
||||
const dcerpc_info *ri=(const dcerpc_info *)pri;
|
||||
rpcstat_t *rs=prs;
|
||||
rpcstat_t *rs=(rpcstat_t *)prs;
|
||||
nstime_t delta;
|
||||
rpc_procedure_t *rp;
|
||||
|
||||
|
|
|
@ -124,8 +124,8 @@ h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, co
|
|||
|
||||
if (pi->msg_tag < 21) {
|
||||
/* */
|
||||
rascategory = pi->msg_tag / 3;
|
||||
rasmsg_type = pi->msg_tag % 3;
|
||||
rascategory = (ras_category)(pi->msg_tag / 3);
|
||||
rasmsg_type = (ras_type)(pi->msg_tag % 3);
|
||||
}
|
||||
else {
|
||||
/* No SRT yet (ToDo) */
|
||||
|
|
|
@ -117,7 +117,7 @@ static int
|
|||
icmpv6stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
icmpv6stat_t *icmpv6stat = (icmpv6stat_t *)tapdata;
|
||||
const icmp_transaction_t *trans = data;
|
||||
const icmp_transaction_t *trans = (const icmp_transaction_t *)data;
|
||||
double resp_time, *rt;
|
||||
|
||||
if (trans == NULL)
|
||||
|
|
|
@ -70,7 +70,7 @@ protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const vo
|
|||
}
|
||||
|
||||
for(i=0;i<gp->len;i++){
|
||||
str=(char *)proto_construct_match_selected_string(gp->pdata[i], NULL);
|
||||
str=(char *)proto_construct_match_selected_string((field_info *)gp->pdata[i], NULL);
|
||||
if(str){
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " %s",str);
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ new_phs_t(phs_t *parent)
|
|||
static int
|
||||
protohierstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const void *dummy _U_)
|
||||
{
|
||||
phs_t *rs=prs;
|
||||
phs_t *rs=(phs_t *)prs;
|
||||
phs_t *tmprs;
|
||||
proto_node *node;
|
||||
field_info *fi;
|
||||
|
|
|
@ -243,7 +243,7 @@ gtk_rtspstat_init(const char *optarg,void* userdata _U_)
|
|||
filter=NULL;
|
||||
}
|
||||
|
||||
sp = g_malloc( sizeof(rtspstat_t) );
|
||||
sp = (rtspstat_t *)g_malloc( sizeof(rtspstat_t) );
|
||||
if(filter){
|
||||
sp->filter=g_strdup(filter);
|
||||
} else {
|
||||
|
|
|
@ -134,7 +134,7 @@ wspstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const
|
|||
gint *key=g_new(gint,1);
|
||||
wsp_status_code_t *sc;
|
||||
*key=value->status_code ;
|
||||
sc = g_hash_table_lookup(
|
||||
sc = (wsp_status_code_t *)g_hash_table_lookup(
|
||||
sp->hash,
|
||||
key);
|
||||
if (!sc) {
|
||||
|
|
|
@ -41,8 +41,8 @@ gboolean
|
|||
eo_dicom_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_,
|
||||
const void *data)
|
||||
{
|
||||
export_object_list_t *object_list = tapdata;
|
||||
const dicom_eo_t *eo_info = data;
|
||||
export_object_list_t *object_list = (export_object_list_t *)tapdata;
|
||||
const dicom_eo_t *eo_info = (const dicom_eo_t *)data;
|
||||
export_object_entry_t *entry;
|
||||
|
||||
if (eo_info) { /* We have data waiting for us */
|
||||
|
@ -51,7 +51,7 @@ eo_dicom_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
Still, the values will be freed when the export Object window is closed.
|
||||
Therefore, strings and buffers must be copied
|
||||
*/
|
||||
entry = g_malloc(sizeof(export_object_entry_t));
|
||||
entry = (export_object_entry_t *)g_malloc(sizeof(export_object_entry_t));
|
||||
|
||||
entry->pkt_num = pinfo->fd->num;
|
||||
entry->hostname = eo_info->hostname;
|
||||
|
|
|
@ -39,21 +39,21 @@ gboolean
|
|||
eo_http_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_,
|
||||
const void *data)
|
||||
{
|
||||
export_object_list_t *object_list = tapdata;
|
||||
const http_eo_t *eo_info = data;
|
||||
export_object_list_t *object_list = (export_object_list_t *)tapdata;
|
||||
const http_eo_t *eo_info = (const http_eo_t *)data;
|
||||
export_object_entry_t *entry;
|
||||
|
||||
if(eo_info) { /* We have data waiting for us */
|
||||
/* These values will be freed when the Export Object window
|
||||
* is closed. */
|
||||
entry = g_malloc(sizeof(export_object_entry_t));
|
||||
entry = (export_object_entry_t *)g_malloc(sizeof(export_object_entry_t));
|
||||
|
||||
entry->pkt_num = pinfo->fd->num;
|
||||
entry->hostname = g_strdup(eo_info->hostname);
|
||||
entry->content_type = g_strdup(eo_info->content_type);
|
||||
entry->filename = g_strdup(g_path_get_basename(eo_info->filename));
|
||||
entry->payload_len = eo_info->payload_len;
|
||||
entry->payload_data = g_memdup(eo_info->payload_data,
|
||||
entry->payload_data = (guint8 *)g_memdup(eo_info->payload_data,
|
||||
eo_info->payload_len);
|
||||
|
||||
object_list_add_entry(object_list, entry);
|
||||
|
|
|
@ -90,7 +90,7 @@ pref_stash(pref_t *pref, gpointer unused _U_)
|
|||
guint
|
||||
pref_unstash(pref_t *pref, gpointer changed_p)
|
||||
{
|
||||
gboolean *pref_changed_p = changed_p;
|
||||
gboolean *pref_changed_p = (gboolean *)changed_p;
|
||||
|
||||
/* Revert the preference to its saved value. */
|
||||
switch (pref->type) {
|
||||
|
|
|
@ -297,7 +297,7 @@ copy_profile_list(void)
|
|||
|
||||
/* copy the list entries */
|
||||
while(flp_src) {
|
||||
profile = (flp_src)->data;
|
||||
profile = (profile_def *)(flp_src)->data;
|
||||
|
||||
current_profiles = add_profile_entry(current_profiles, profile->name,
|
||||
profile->reference, profile->status,
|
||||
|
|
Loading…
Reference in New Issue