a lot of warnings removed, most of them about pointer to int casts without using the appropriate GLib macros

svn path=/trunk/; revision=12832
This commit is contained in:
Ulf Lamping 2004-12-25 13:49:30 +00:00
parent e8459f4ea1
commit 78ff68d4b5
27 changed files with 191 additions and 196 deletions

View File

@ -44,8 +44,8 @@
static int proto_aim_oft = -1;
static int ett_aim_recvfile = -1;
static int ett_aim_sendfile = -1;
/*static int ett_aim_recvfile = -1;
static int ett_aim_sendfile = -1;*/
/*
* cookie (8 chars)

View File

@ -121,7 +121,7 @@ static int dissect_aim_snac_signon_signon_reply(tvbuff_t *tvb,
return offset;
}
static int dissect_aim_tlv_value_registration(proto_item *ti _U_, guint16 value_id _U_, tvbuff_t *tvb _U_, packet_info *pinfo)
static int dissect_aim_tlv_value_registration(proto_item *ti _U_, guint16 value_id _U_, tvbuff_t *tvb _U_, packet_info *pinfo _U_)
{
/* FIXME */
return 0;

View File

@ -190,7 +190,7 @@ static GHashTable *ata_cmd_matched;
static guint
ata_cmd_hash_matched(gconstpointer k)
{
return (guint)k;
return GPOINTER_TO_UINT(k);
}
static gint
@ -267,12 +267,12 @@ dissect_ata_pdu(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset,
if(ata_info){
ata_info->response_frame=pinfo->fd->num;
g_hash_table_remove(ata_cmd_unmatched, ata_info);
g_hash_table_insert(ata_cmd_matched, (void *)ata_info->request_frame, ata_info);
g_hash_table_insert(ata_cmd_matched, (void *)ata_info->response_frame, ata_info);
g_hash_table_insert(ata_cmd_matched, GUINT_TO_POINTER(ata_info->request_frame), ata_info);
g_hash_table_insert(ata_cmd_matched, GUINT_TO_POINTER(ata_info->response_frame), ata_info);
}
}
} else {
ata_info=g_hash_table_lookup(ata_cmd_matched, (void *)pinfo->fd->num);
ata_info=g_hash_table_lookup(ata_cmd_matched, GUINT_TO_POINTER(pinfo->fd->num));
}
if(ata_info){

View File

@ -303,10 +303,12 @@ static int dissect_filter(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, i
}
static int dissect_and_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_cmip_CMISFilter(FALSE, tvb, offset, pinfo, tree, hf_cmip_and_item);
}
}
#if 0
static int dissect_or_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_cmip_CMISFilter(FALSE, tvb, offset, pinfo, tree, hf_cmip_or_item);
}
}
#endif
static int dissect_not(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_cmip_CMISFilter(FALSE, tvb, offset, pinfo, tree, hf_cmip_not);
}
@ -1848,14 +1850,16 @@ static const ber_sequence_t BaseManagedObjectId_sequence[] = {
{ BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_baseManagedObjectInstance },
{ 0, 0, 0, NULL }
};
#if 0
static int
dissect_cmip_BaseManagedObjectId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
BaseManagedObjectId_sequence, hf_index, ett_cmip_BaseManagedObjectId);
return offset;
}
}
#endif
static const ber_sequence_t SET_OF_AttributeId_set_of[1] = {
{ BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_attributeIdList_item },
@ -2281,13 +2285,14 @@ static const value_string RejectProblem_vals[] = {
{ 0, NULL }
};
#if 0
static int
dissect_cmip_RejectProblem(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
return offset;
}
}
#endif
static const value_string RejectProb_vals[] = {

View File

@ -268,9 +268,11 @@ static int dissect_hashAlg(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
static int dissect_certId(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_crmf_CertId(FALSE, tvb, offset, pinfo, tree, hf_cmp_certId);
}
#if 0
static int dissect_caPubs_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_caPubs_item);
}
}
#endif
static int dissect_privateKey(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_crmf_EncryptedValue(FALSE, tvb, offset, pinfo, tree, hf_cmp_privateKey);
}
@ -285,10 +287,12 @@ static int dissect_encryptedCert(packet_info *pinfo, proto_tree *tree, tvbuff_t
}
static int dissect_newSigCert(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_newSigCert);
}
}
#if 0
static int dissect_caCerts_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_caCerts_item);
}
}
#endif
static int dissect_certDetails(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
return dissect_crmf_CertTemplate(FALSE, tvb, offset, pinfo, tree, hf_cmp_certDetails);
}

View File

@ -3256,7 +3256,7 @@ static int SpoolssGetPrinter_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
dcv->private_data = (void *)level;
dcv->private_data = GUINT_TO_POINTER(level);
offset = dissect_spoolss_buffer(
tvb, offset, pinfo, tree, drep, NULL);
@ -3275,7 +3275,7 @@ static int SpoolssGetPrinter_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
BUFFER buffer;
gint16 level = (guint32)dcv->private_data;
gint16 level = GPOINTER_TO_INT(dcv->private_data);
proto_item *item;
proto_tree *subtree = NULL;
@ -3601,7 +3601,7 @@ static int SpoolssEnumForms_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_ndr_uint32(
tvb, offset, pinfo, tree, drep, hf_level, &level);
dcv->private_data = (void *)level;
dcv->private_data = GUINT_TO_POINTER(level);
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
@ -3621,7 +3621,7 @@ static int SpoolssEnumForms_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
BUFFER buffer;
guint32 level = (guint32)dcv->private_data, i, count;
guint32 level = GPOINTER_TO_UINT(dcv->private_data), i, count;
int buffer_offset;
proto_tree_add_uint_hidden(
@ -4127,7 +4127,7 @@ static int SpoolssAddForm_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* Store info level to match with reply packet */
dcv->private_data = (void *)level;
dcv->private_data = GUINT_TO_POINTER(level);
offset = dissect_FORM_CTR(tvb, offset, pinfo, tree, drep);
@ -4276,7 +4276,7 @@ static int SpoolssGetForm_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_ndr_uint32(
tvb, offset, pinfo, tree, drep, hf_form_level, &level);
dcv->private_data = (void *)level;
dcv->private_data = GUINT_TO_POINTER(level);
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d",
@ -4296,7 +4296,7 @@ static int SpoolssGetForm_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
BUFFER buffer;
guint32 level = (guint32)dcv->private_data;
guint32 level = GPOINTER_TO_UINT(dcv->private_data);
proto_tree_add_uint_hidden(
tree, hf_form, tvb, offset, 0, 1);
@ -4575,7 +4575,7 @@ static int SpoolssEnumJobs_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_ndr_uint32(
tvb, offset, pinfo, tree, drep, hf_level, &level);
dcv->private_data = (void *)level;
dcv->private_data = GUINT_TO_POINTER(level);
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
@ -4593,7 +4593,7 @@ static int SpoolssEnumJobs_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
gint16 level = (guint32)dcv->private_data;
gint16 level = GPOINTER_TO_UINT(dcv->private_data);
BUFFER buffer;
guint32 num_jobs, i;
int buffer_offset;
@ -4717,7 +4717,7 @@ static int SpoolssGetJob_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_ndr_uint32(
tvb, offset, pinfo, tree, drep, hf_level, &level);
dcv->private_data = (void *)level;
dcv->private_data = GUINT_TO_POINTER(level);
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d, jobid %d",
@ -4736,7 +4736,7 @@ static int SpoolssGetJob_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
gint32 level = (guint32)dcv->private_data;
gint32 level = GPOINTER_TO_UINT(dcv->private_data);
BUFFER buffer;
/* Parse packet */
@ -5287,7 +5287,7 @@ static int SpoolssEnumPrinterDrivers_q(tvbuff_t *tvb, int offset,
offset = dissect_ndr_uint32(
tvb, offset, pinfo, tree, drep, hf_level, &level);
dcv->private_data = (void *)level;
dcv->private_data = GUINT_TO_POINTER(level);
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
@ -5306,7 +5306,7 @@ static int SpoolssEnumPrinterDrivers_r(tvbuff_t *tvb, int offset,
{
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
guint32 level = (guint32)dcv->private_data, num_drivers, i;
guint32 level = GPOINTER_TO_UINT(dcv->private_data), num_drivers, i;
int buffer_offset;
BUFFER buffer;
@ -5385,7 +5385,7 @@ static int SpoolssGetPrinterDriver2_q(tvbuff_t *tvb, int offset,
offset = dissect_ndr_uint32(
tvb, offset, pinfo, tree, drep, hf_level, &level);
dcv->private_data = (void *)level;
dcv->private_data = GUINT_TO_POINTER(level);
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
@ -5410,7 +5410,7 @@ static int SpoolssGetPrinterDriver2_r(tvbuff_t *tvb, int offset,
{
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
guint32 level = (guint32)dcv->private_data;
guint32 level = GPOINTER_TO_UINT(dcv->private_data);
BUFFER buffer;
/* Parse packet */

View File

@ -270,7 +270,7 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
int colon_offset;
headers_t headers;
int datalen;
int reported_datalen;
int reported_datalen = -1;
dissector_handle_t handle;
gboolean dissected;

View File

@ -88,7 +88,7 @@ dissect_ipdc_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvbuff_t *q931_tvb;
char *des;
char *enum_val;
char *enum_val = "";
char *tmp_str;
char tmp_tag_text[IPDC_STR_LEN + 1];
const value_string *val_ptr;

View File

@ -1944,9 +1944,7 @@ dissect_cmd_Set_Sensor_Thresholds(proto_tree *tree, proto_tree *ipmi_tree, packe
if (tree) {
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_SensorNumber,
tvb, (*poffset)++, 1, TRUE);
}
/* Control Byte */
if (tree) {
/* Control Byte */
ControlByte = tvb_get_guint8(tvb, authtype ? 33 : 17) ;
tf = proto_tree_add_text(ipmi_tree, tvb, *poffset, 1,
"Control Byte: %s0x%02x", " ", ControlByte);
@ -1967,39 +1965,33 @@ dissect_cmd_Set_Sensor_Thresholds(proto_tree *tree, proto_tree *ipmi_tree, packe
proto_tree_add_item(field_tree, hf_SetSensorThresholds_datafield_ControlByte_Bit0,
tvb, *poffset, 1, TRUE);
(*poffset)++;
}
/* lower non-critical threshold */
if (tree) {
/* lower non-critical threshold */
if(ControlByte&0x01)
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_LowerNonCriticalThreshold,
tvb, (*poffset)++, 1, TRUE);
}
/* lower critical threshold */
if (tree) {
/* lower critical threshold */
if(ControlByte&0x02)
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_LowerCriticalThreshold,
tvb, (*poffset)++, 1, TRUE);
}
/* lower non-recoverable threshold */
if (tree) {
/* lower non-recoverable threshold */
if(ControlByte&0x04)
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_LowerNonRecoverableThreshold,
tvb, (*poffset)++, 1, TRUE);
}
/* upper non-critical threshold */
if (tree) {
/* upper non-critical threshold */
if(ControlByte&0x08)
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_UpperNonCriticalThreshold,
tvb, (*poffset)++, 1, TRUE);
}
/* upper critical threshold value */
if (tree) {
/* upper critical threshold value */
if(ControlByte&0x10)
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_UpperCriticalThreshold,
tvb, (*poffset)++, 1, TRUE);
}
/* upper non-recoverable threshold value */
if (tree) {
/* upper non-recoverable threshold value */
if(ControlByte&0x20)
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_UpperNonRecoverableThreshold,
tvb, (*poffset)++, 1, TRUE);
@ -2041,39 +2033,33 @@ dissect_cmd_Get_Sensor_Thresholds(proto_tree *tree, proto_tree *ipmi_tree, packe
proto_tree_add_item(field_tree, hf_GetSensorThresholds_datafield_ControlByte_Bit0,
tvb, *poffset, 1, TRUE);
(*poffset)++;
}
/* lower non-critical threshold */
if (tree) {
/* lower non-critical threshold */
if(ControlByte&0x01)
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_LowerNonCriticalThreshold,
tvb, (*poffset)++, 1, TRUE);
}
/* lower critical threshold */
if (tree) {
/* lower critical threshold */
if(ControlByte&0x02)
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_LowerCriticalThreshold,
tvb, (*poffset)++, 1, TRUE);
}
/* lower non-recoverable threshold */
if (tree) {
/* lower non-recoverable threshold */
if(ControlByte&0x04)
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_LowerNonRecoverableThreshold,
tvb, (*poffset)++, 1, TRUE);
}
/* upper non-critical threshold */
if (tree) {
/* upper non-critical threshold */
if(ControlByte&0x08)
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_UpperNonCriticalThreshold,
tvb, (*poffset)++, 1, TRUE);
}
/* upper critical threshold value */
if (tree) {
/* upper critical threshold value */
if(ControlByte&0x10)
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_UpperCriticalThreshold,
tvb, (*poffset)++, 1, TRUE);
}
/* upper non-recoverable threshold value */
if (tree) {
/* upper non-recoverable threshold value */
if(ControlByte&0x20)
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_UpperNonRecoverableThreshold,
tvb, (*poffset)++, 1, TRUE);

View File

@ -218,7 +218,7 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* (ie none)
*/
if(tree) {
int len, pad, encapsulated_protocol;
int len = 0, pad = 0, encapsulated_protocol = 0;
gboolean auth_decode_ok = FALSE;
ti = proto_tree_add_item(tree, proto_esp, tvb, 0, -1, FALSE);

View File

@ -217,7 +217,7 @@ llc_add_oui(guint32 oui, const char *table_name, char *table_ui_name,
oui_info_table = g_hash_table_new(g_direct_hash,
g_direct_equal);
}
g_hash_table_insert(oui_info_table, (gpointer)oui, new_info);
g_hash_table_insert(oui_info_table, GUINT_TO_POINTER(oui), new_info);
}
void
@ -570,7 +570,7 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
/*
* Do we have information for this OUI?
*/
oui_info = g_hash_table_lookup(oui_info_table, (gpointer)oui);
oui_info = g_hash_table_lookup(oui_info_table, GUINT_TO_POINTER(oui));
if (oui_info != NULL) {
/*
* Yes - use it.

View File

@ -341,7 +341,7 @@ dissect_mtp3_sio(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_tree)
proto_tree_add_uint(sio_tree, hf_mtp3_service_indicator, tvb, SIO_OFFSET, SIO_LENGTH, sio);
/* Store the SI so that subidissectors know what SI this msg is */
pinfo->private_data = (void *)(sio & SERVICE_INDICATOR_MASK);
pinfo->private_data = GUINT_TO_POINTER(sio & SERVICE_INDICATOR_MASK);
}
static void

View File

@ -454,15 +454,15 @@ nfs_fhandle_data_free_all(gpointer key_arg _U_, gpointer value, gpointer user_da
static gint
nfs_fhandle_frame_equal(gconstpointer k1, gconstpointer k2)
{
guint32 key1 = (guint32)k1;
guint32 key2 = (guint32)k2;
guint32 key1 = GPOINTER_TO_UINT(k1);
guint32 key2 = GPOINTER_TO_UINT(k2);
return key1==key2;
}
static guint
nfs_fhandle_frame_hash(gconstpointer k)
{
guint32 key = (guint32)k;
guint32 key = GPOINTER_TO_UINT(k);
return key;
}
@ -562,15 +562,15 @@ nfs_name_snoop_matched_hash(gconstpointer k)
static gint
nfs_name_snoop_unmatched_equal(gconstpointer k1, gconstpointer k2)
{
guint32 key1 = (guint32)k1;
guint32 key2 = (guint32)k2;
guint32 key1 = GPOINTER_TO_UINT(k1);
guint32 key2 = GPOINTER_TO_UINT(k2);
return key1==key2;
}
static guint
nfs_name_snoop_unmatched_hash(gconstpointer k)
{
guint32 key = (guint32)k;
guint32 key = GPOINTER_TO_UINT(k);
return key;
}
@ -699,7 +699,7 @@ nfs_name_snoop_add_name(int xid, tvbuff_t *tvb, int name_offset, int name_len, i
nns->full_name=NULL;
/* remove any old entry for this */
old_nns=g_hash_table_lookup(nfs_name_snoop_unmatched, (gconstpointer)xid);
old_nns=g_hash_table_lookup(nfs_name_snoop_unmatched, GINT_TO_POINTER(xid));
if(old_nns){
/* if we haven't seen the reply yet, then there are no
matched entries for it, thus we can dealloc the arrays*/
@ -714,10 +714,10 @@ nfs_name_snoop_add_name(int xid, tvbuff_t *tvb, int name_offset, int name_len, i
g_mem_chunk_free(nfs_name_snoop_chunk, old_nns);
}
g_hash_table_remove(nfs_name_snoop_unmatched, (gconstpointer)xid);
g_hash_table_remove(nfs_name_snoop_unmatched, GINT_TO_POINTER(xid));
}
g_hash_table_insert(nfs_name_snoop_unmatched, (gpointer)xid, nns);
g_hash_table_insert(nfs_name_snoop_unmatched, GINT_TO_POINTER(xid), nns);
}
static void
@ -728,7 +728,7 @@ nfs_name_snoop_add_fh(int xid, tvbuff_t *tvb, int fh_offset, int fh_length)
nfs_name_snoop_key_t *key;
/* find which request we correspond to */
nns=g_hash_table_lookup(nfs_name_snoop_unmatched, (gconstpointer)xid);
nns=g_hash_table_lookup(nfs_name_snoop_unmatched, GINT_TO_POINTER(xid));
if(!nns){
/* oops couldnt find matching request, bail out */
return;
@ -756,7 +756,7 @@ nfs_name_snoop_add_fh(int xid, tvbuff_t *tvb, int fh_offset, int fh_length)
g_hash_table_remove(nfs_name_snoop_matched, key);
}
g_hash_table_remove(nfs_name_snoop_unmatched, (gconstpointer)xid);
g_hash_table_remove(nfs_name_snoop_unmatched, GINT_TO_POINTER(xid));
g_hash_table_insert(nfs_name_snoop_matched, key, nns);
}
@ -1503,7 +1503,7 @@ dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
not work properly with this feature
*/
g_hash_table_insert(nfs_fhandle_frame_table,
(gpointer)pinfo->fd->num,
GINT_TO_POINTER(pinfo->fd->num),
(gpointer)old_fhd);
}
}

View File

@ -153,7 +153,7 @@ nlm_msg_res_unmatched_hash(gconstpointer k)
static guint
nlm_msg_res_matched_hash(gconstpointer k)
{
guint hash = (guint)k;
guint hash = GPOINTER_TO_UINT(k);
return hash;
}
@ -173,8 +173,8 @@ nlm_msg_res_unmatched_equal(gconstpointer k1, gconstpointer k2)
static gint
nlm_msg_res_matched_equal(gconstpointer k1, gconstpointer k2)
{
guint mk1 = (guint)k1;
guint mk2 = (guint)k2;
guint mk1 = GPOINTER_TO_UINT(k1);
guint mk2 = GPOINTER_TO_UINT(k2);
return( mk1==mk2 );
}
@ -204,7 +204,7 @@ nlm_print_msgres_reply(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb)
{
nlm_msg_res_matched_data *md;
md=g_hash_table_lookup(nlm_msg_res_matched, (gconstpointer)pinfo->fd->num);
md=g_hash_table_lookup(nlm_msg_res_matched, GINT_TO_POINTER(pinfo->fd->num));
if(md){
nstime_t ns;
proto_tree_add_uint(tree, hf_nlm_request_in, tvb, 0, 0, md->req_frame);
@ -224,7 +224,7 @@ nlm_print_msgres_request(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb)
{
nlm_msg_res_matched_data *md;
md=g_hash_table_lookup(nlm_msg_res_matched, (gconstpointer)pinfo->fd->num);
md=g_hash_table_lookup(nlm_msg_res_matched, GINT_TO_POINTER(pinfo->fd->num));
if(md){
proto_tree_add_uint(tree, hf_nlm_reply_in, tvb, 0, 0, md->rep_frame);
}
@ -234,12 +234,12 @@ nlm_match_fhandle_reply(packet_info *pinfo, proto_tree *tree)
{
nlm_msg_res_matched_data *md;
md=g_hash_table_lookup(nlm_msg_res_matched, (gconstpointer)pinfo->fd->num);
md=g_hash_table_lookup(nlm_msg_res_matched, GINT_TO_POINTER(pinfo->fd->num));
if(md && md->rep_frame){
nfs_fhandle_data_t *fhd;
fhd=(nfs_fhandle_data_t *)g_hash_table_lookup(
nfs_fhandle_frame_table,
(gconstpointer)md->req_frame);
GINT_TO_POINTER(md->req_frame));
if(fhd){
dissect_fhandle_hidden(pinfo,
tree, fhd);
@ -251,12 +251,12 @@ nlm_match_fhandle_request(packet_info *pinfo, proto_tree *tree)
{
nlm_msg_res_matched_data *md;
md=g_hash_table_lookup(nlm_msg_res_matched, (gconstpointer)pinfo->fd->num);
md=g_hash_table_lookup(nlm_msg_res_matched, GINT_TO_POINTER(pinfo->fd->num));
if(md && md->rep_frame){
nfs_fhandle_data_t *fhd;
fhd=(nfs_fhandle_data_t *)g_hash_table_lookup(
nfs_fhandle_frame_table,
(gconstpointer)md->rep_frame);
GINT_TO_POINTER(md->rep_frame));
if(fhd){
dissect_fhandle_hidden(pinfo,
tree, fhd);
@ -282,8 +282,8 @@ nlm_register_unmatched_res(packet_info *pinfo, tvbuff_t *tvb, int offset)
md->req_frame=old_umd->req_frame;
md->rep_frame=pinfo->fd->num;
md->ns=old_umd->ns;
g_hash_table_insert(nlm_msg_res_matched, (gpointer)md->req_frame, (gpointer)md);
g_hash_table_insert(nlm_msg_res_matched, (gpointer)md->rep_frame, (gpointer)md);
g_hash_table_insert(nlm_msg_res_matched, GINT_TO_POINTER(md->req_frame), (gpointer)md);
g_hash_table_insert(nlm_msg_res_matched, GINT_TO_POINTER(md->rep_frame), (gpointer)md);
g_hash_table_remove(nlm_msg_res_unmatched, (gconstpointer)old_umd);
g_free((gpointer)old_umd->cookie);

View File

@ -118,7 +118,7 @@ dissect_getport_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
if(!pinfo->fd->flags.visited){
rpc_call_info_value *rpc_call=pinfo->private_data;
/* only do this for UDP, TCP does not need anything like this */
if(rpc_call && ((int)rpc_call->private_data==PT_UDP) ){
if(rpc_call && (GPOINTER_TO_UINT(rpc_call->private_data)==PT_UDP) ){
guint32 port;
port=tvb_get_ntohl(tvb, offset);
if(port){

View File

@ -2589,7 +2589,7 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if(rpc_call && rpc_call->rep_num){
fhd=(nfs_fhandle_data_t *)g_hash_table_lookup(
nfs_fhandle_frame_table,
(gconstpointer)rpc_call->rep_num);
GINT_TO_POINTER(rpc_call->rep_num));
if(fhd){
dissect_fhandle_hidden(pinfo,
ptree, fhd);
@ -2600,7 +2600,7 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if(rpc_call && rpc_call->req_num){
fhd=(nfs_fhandle_data_t *)g_hash_table_lookup(
nfs_fhandle_frame_table,
(gconstpointer)rpc_call->req_num);
GINT_TO_POINTER(rpc_call->req_num));
if(fhd){
dissect_fhandle_hidden(pinfo,
ptree, fhd);

View File

@ -805,7 +805,7 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo,
* Process some headers specially.
*/
#define HDR_MATCHES(header) \
(linelen > STRLEN_CONST(header) && \
( (size_t)linelen > STRLEN_CONST(header) && \
strncasecmp(line, (header), STRLEN_CONST(header)) == 0)
if (HDR_MATCHES(rtsp_transport)) {

View File

@ -1687,7 +1687,7 @@ dissect_udvm_reference_operand(tvbuff_t *udvm_tvb, proto_tree *sigcomp_udvm_tree
*/
static int
dissect_udvm_multitype_operand(tvbuff_t *udvm_tvb, proto_tree *sigcomp_udvm_tree,
gint offset, gboolean is_addr, gint *start_offset, guint16 *value, gboolean *is_memory_address )
gint offset, gboolean is_addr _U_, gint *start_offset, guint16 *value, gboolean *is_memory_address )
{
guint bytecode;
guint display_bytecode;

View File

@ -1531,7 +1531,7 @@ guint sip_is_packet_resend(packet_info *pinfo,
/* Return any answer stored from previous dissection */
if (pinfo->fd->flags.visited)
{
return (guint)(p_get_proto_data(pinfo->fd, proto_sip));
return GPOINTER_TO_UINT(p_get_proto_data(pinfo->fd, proto_sip));
}
/* No packet entry found, consult global hash table */
@ -1637,7 +1637,7 @@ guint sip_is_packet_resend(packet_info *pinfo,
}
/* Store return value with this packet */
p_add_proto_data(pinfo->fd, proto_sip, (void*)result);
p_add_proto_data(pinfo->fd, proto_sip, GUINT_TO_POINTER(result));
return result;
}

View File

@ -147,15 +147,15 @@ samr_query_dispinfo(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt, vo
}
fi=gp->pdata[0];
old_ctx=g_hash_table_lookup(ctx_handle_table, (gpointer)pinfo->fd->num);
old_ctx=g_hash_table_lookup(ctx_handle_table, GINT_TO_POINTER(pinfo->fd->num));
if(old_ctx){
g_hash_table_remove(ctx_handle_table, (gpointer)pinfo->fd->num);
g_hash_table_remove(ctx_handle_table, GINT_TO_POINTER(pinfo->fd->num));
}
if(!old_ctx){
old_ctx=g_mem_chunk_alloc(ctx_handle_chunk);
memcpy(old_ctx, fi->value.value.bytes->data, 20);
}
g_hash_table_insert(ctx_handle_table, (gpointer)pinfo->fd->num, old_ctx);
g_hash_table_insert(ctx_handle_table, GINT_TO_POINTER(pinfo->fd->num), old_ctx);
return 0;
}
@ -164,7 +164,7 @@ samr_query_dispinfo(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt, vo
return 0;
}
old_ctx=g_hash_table_lookup(ctx_handle_table, (gpointer)ri->call_data->req_frame);
old_ctx=g_hash_table_lookup(ctx_handle_table, GINT_TO_POINTER(ri->call_data->req_frame));
if(!old_ctx){
return 0;
}
@ -313,8 +313,8 @@ free_all_ctx_handle(gpointer key_arg _U_, gpointer value _U_, gpointer user_data
static gint
ctx_handle_equal(gconstpointer k1, gconstpointer k2)
{
int sn1 = (int)k1;
int sn2 = (int)k2;
int sn1 = GPOINTER_TO_INT(k1);
int sn2 = GPOINTER_TO_INT(k2);
return sn1==sn2;
}
@ -322,7 +322,7 @@ ctx_handle_equal(gconstpointer k1, gconstpointer k2)
static guint
ctx_handle_hash(gconstpointer k)
{
int sn = (int)k;
int sn = GPOINTER_TO_INT(k);
return sn;
}

View File

@ -906,14 +906,14 @@ static int smb_saved_info_init_count = 200;
static gint
smb_saved_info_equal_unmatched(gconstpointer k1, gconstpointer k2)
{
register guint32 key1 = (guint32)k1;
register guint32 key2 = (guint32)k2;
register guint32 key1 = GPOINTER_TO_UINT(k1);
register guint32 key2 = GPOINTER_TO_UINT(k2);
return key1==key2;
}
static guint
smb_saved_info_hash_unmatched(gconstpointer k)
{
register guint32 key = (guint32)k;
register guint32 key = GPOINTER_TO_UINT(k);
return key;
}
@ -3259,7 +3259,7 @@ dissect_read_file_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
if (!pinfo->fd->flags.visited) {
/* remember the FID for the processing of the response */
si = (smb_info_t *)pinfo->private_data;
si->sip->extra_info=(void *)fid;
si->sip->extra_info=GUINT_TO_POINTER(fid);
}
/* read count */
@ -3384,7 +3384,7 @@ dissect_read_file_response(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
/* If we have seen the request, then print which FID this refers to */
/* first check if we have seen the request */
if(si->sip != NULL && si->sip->frame_req>0){
fid=(int)si->sip->extra_info;
fid=GPOINTER_TO_INT(si->sip->extra_info);
add_fid(tvb, pinfo, tree, 0, 0, (guint16) fid);
}
@ -5189,7 +5189,7 @@ dissect_read_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
if (!pinfo->fd->flags.visited) {
/* remember the FID for the processing of the response */
si = (smb_info_t *)pinfo->private_data;
si->sip->extra_info=(void *)fid;
si->sip->extra_info=GUINT_TO_POINTER(fid);
}
/* offset */
@ -5299,7 +5299,7 @@ dissect_read_andx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* If we have seen the request, then print which FID this refers to */
/* first check if we have seen the request */
if(si->sip != NULL && si->sip->frame_req>0){
fid=(int)si->sip->extra_info;
fid=GPOINTER_TO_INT(si->sip->extra_info);
add_fid(tvb, pinfo, tree, 0, 0, (guint16) fid);
}
@ -5403,7 +5403,7 @@ dissect_write_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset += 2;
if (!pinfo->fd->flags.visited) {
/* remember the FID for the processing of the response */
si->sip->extra_info=(void *)fid;
si->sip->extra_info=GUINT_TO_POINTER(fid);
}
/* offset */
@ -5476,10 +5476,10 @@ dissect_write_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
so we know that future Read/Writes to this
TID is (probably) DCERPC.
*/
if(g_hash_table_lookup(si->ct->tid_service, (void *)si->tid)){
g_hash_table_remove(si->ct->tid_service, (void *)si->tid);
if(g_hash_table_lookup(si->ct->tid_service, GUINT_TO_POINTER(si->tid))){
g_hash_table_remove(si->ct->tid_service, GUINT_TO_POINTER(si->tid));
}
g_hash_table_insert(si->ct->tid_service, (void *)si->tid, (void *)TID_IPC);
g_hash_table_insert(si->ct->tid_service, GUINT_TO_POINTER(si->tid), (void *)TID_IPC);
}
if(si->sip){
si->sip->flags|=SMB_SIF_TID_IS_IPC;
@ -6334,13 +6334,13 @@ dissect_tree_connect_andx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree
this tree */
if(!pinfo->fd->flags.visited){
/* Remove any previous entry for this TID */
if(g_hash_table_lookup(si->ct->tid_service, (void *)si->tid)){
g_hash_table_remove(si->ct->tid_service, (void *)si->tid);
if(g_hash_table_lookup(si->ct->tid_service, GUINT_TO_POINTER(si->tid))){
g_hash_table_remove(si->ct->tid_service, GUINT_TO_POINTER(si->tid));
}
if(strcmp(an,"IPC") == 0){
g_hash_table_insert(si->ct->tid_service, (void *)si->tid, (void *)TID_IPC);
g_hash_table_insert(si->ct->tid_service, GUINT_TO_POINTER(si->tid), (void *)TID_IPC);
} else {
g_hash_table_insert(si->ct->tid_service, (void *)si->tid, (void *)TID_NORMAL);
g_hash_table_insert(si->ct->tid_service, GUINT_TO_POINTER(si->tid), (void *)TID_NORMAL);
}
}
@ -11516,10 +11516,10 @@ dissect_transaction_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
so we know that future Read/Writes to this
TID is (probably) DCERPC.
*/
if(g_hash_table_lookup(si->ct->tid_service, (void *)si->tid)){
g_hash_table_remove(si->ct->tid_service, (void *)si->tid);
if(g_hash_table_lookup(si->ct->tid_service, GUINT_TO_POINTER(si->tid))){
g_hash_table_remove(si->ct->tid_service, GUINT_TO_POINTER(si->tid));
}
g_hash_table_insert(si->ct->tid_service, (void *)si->tid, (void *)TID_IPC);
g_hash_table_insert(si->ct->tid_service, GUINT_TO_POINTER(si->tid), (void *)TID_IPC);
} else if(strncmp("\\MAILSLOT\\", an, 10) == 0){
if (tri != NULL)
tri->subcmd=TRANSACTION_MAILSLOT;
@ -14662,7 +14662,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
last seen MID matching ours is the right one.
This can fail but is better than nothing
*/
sip=g_hash_table_lookup(si->ct->unmatched, (void *)pid_mid);
sip=g_hash_table_lookup(si->ct->unmatched, GUINT_TO_POINTER(pid_mid));
if(sip!=NULL){
new_key = g_mem_chunk_alloc(smb_saved_info_key_chunk);
new_key->frame = pinfo->fd->num;
@ -14724,7 +14724,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
/* first see if we find an unmatched smb "equal" to
the current one
*/
sip=g_hash_table_lookup(si->ct->unmatched, (void *)pid_mid);
sip=g_hash_table_lookup(si->ct->unmatched, GUINT_TO_POINTER(pid_mid));
if(sip!=NULL){
gboolean cmd_match=FALSE;
@ -14768,7 +14768,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
SMBs of different cmds but with identical MID and PID values and
if ethereal lost the first reply and the second request.
*/
g_hash_table_remove(si->ct->unmatched, (void *)pid_mid);
g_hash_table_remove(si->ct->unmatched, GUINT_TO_POINTER(pid_mid));
sip=NULL; /* XXX should free it as well */
} else {
/* we have found a response to some
@ -14803,7 +14803,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
* 4, <- Response MID:5
* We DONT want #4 to be presented as a response to #1
*/
g_hash_table_remove(si->ct->unmatched, (void *)pid_mid);
g_hash_table_remove(si->ct->unmatched, GUINT_TO_POINTER(pid_mid));
} else {
/* We have already seen another response to this MID.
Since the MID in reality is only something like 10 bits
@ -14822,13 +14822,13 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
sip->req_time.secs=pinfo->fd->abs_secs;
sip->req_time.nsecs=pinfo->fd->abs_usecs*1000;
sip->flags = 0;
if(g_hash_table_lookup(si->ct->tid_service, (void *)si->tid)
if(g_hash_table_lookup(si->ct->tid_service, GUINT_TO_POINTER(si->tid))
== (void *)TID_IPC) {
sip->flags |= SMB_SIF_TID_IS_IPC;
}
sip->cmd = si->cmd;
sip->extra_info = NULL;
g_hash_table_insert(si->ct->unmatched, (void *)pid_mid, sip);
g_hash_table_insert(si->ct->unmatched, GUINT_TO_POINTER(pid_mid), sip);
new_key = g_mem_chunk_alloc(smb_saved_info_key_chunk);
new_key->frame = sip->frame_req;
new_key->pid_mid = pid_mid;

View File

@ -436,14 +436,14 @@ scan_for_next_pdu(tvbuff_t *tvb, proto_tree *tcp_tree, packet_info *pinfo, int o
tnp->last_frame_time.secs=pinfo->fd->abs_secs;
tnp->last_frame_time.nsecs=pinfo->fd->abs_usecs*1000;
g_hash_table_insert(tcp_pdu_skipping_table,
(void *)pinfo->fd->num, (void *)tnp);
GINT_TO_POINTER(pinfo->fd->num), (void *)tnp);
print_pdu_tracking_data(pinfo, tvb, tcp_tree, tnp);
return -1;
}
if(seq<tnp->nxtpdu && nxtseq>tnp->nxtpdu){
g_hash_table_insert(tcp_pdu_tracking_table,
(void *)pinfo->fd->num, (void *)tnp->nxtpdu);
GINT_TO_POINTER(pinfo->fd->num), (void *)tnp->nxtpdu);
offset+=tnp->nxtpdu-seq;
break;
}
@ -451,7 +451,7 @@ scan_for_next_pdu(tvbuff_t *tvb, proto_tree *tcp_tree, packet_info *pinfo, int o
} else {
guint32 pduseq;
tnp=(struct tcp_next_pdu *)g_hash_table_lookup(tcp_pdu_time_table, (void *)pinfo->fd->num);
tnp=(struct tcp_next_pdu *)g_hash_table_lookup(tcp_pdu_time_table, GINT_TO_POINTER(pinfo->fd->num));
if(tnp){
proto_item *item;
nstime_t ns;
@ -472,13 +472,13 @@ scan_for_next_pdu(tvbuff_t *tvb, proto_tree *tcp_tree, packet_info *pinfo, int o
}
/* check if this is a segment in the middle of a pdu */
tnp=(struct tcp_next_pdu *)g_hash_table_lookup(tcp_pdu_skipping_table, (void *)pinfo->fd->num);
tnp=(struct tcp_next_pdu *)g_hash_table_lookup(tcp_pdu_skipping_table, GINT_TO_POINTER(pinfo->fd->num));
if(tnp){
print_pdu_tracking_data(pinfo, tvb, tcp_tree, tnp);
return -1;
}
pduseq=(guint32)g_hash_table_lookup(tcp_pdu_tracking_table, (void *)pinfo->fd->num);
pduseq=(guint32)g_hash_table_lookup(tcp_pdu_tracking_table, GINT_TO_POINTER(pinfo->fd->num));
if(pduseq){
offset+=pduseq-seq;
}
@ -525,7 +525,7 @@ pdu_store_sequencenumber_of_next_pdu(packet_info *pinfo, guint32 seq, guint32 nx
Add check for ACKs and purge list of sequence numbers
already acked.
*/
g_hash_table_insert(tcp_pdu_time_table, (void *)pinfo->fd->num, (void *)tnp);
g_hash_table_insert(tcp_pdu_time_table, GINT_TO_POINTER(pinfo->fd->num), (void *)tnp);
}
/* This is called for SYN+ACK packets and the purpose is to verify that we
@ -576,7 +576,7 @@ tcp_get_relative_seq_ack(guint32 frame, guint32 *seq, guint32 *ack, guint32 *win
{
struct tcp_rel_seq *trs;
trs=g_hash_table_lookup(tcp_rel_seq_table, (void *)frame);
trs=g_hash_table_lookup(tcp_rel_seq_table, GUINT_TO_POINTER(frame));
if(!trs){
return;
}
@ -593,7 +593,7 @@ tcp_analyze_get_acked_struct(guint32 frame, gboolean createflag)
{
struct tcp_acked *ta;
ta=g_hash_table_lookup(tcp_analyze_acked_table, (void *)frame);
ta=g_hash_table_lookup(tcp_analyze_acked_table, GUINT_TO_POINTER(frame));
if((!ta) && createflag){
ta=g_mem_chunk_alloc(tcp_acked_chunk);
ta->frame_acked=0;
@ -602,7 +602,7 @@ tcp_analyze_get_acked_struct(guint32 frame, gboolean createflag)
ta->flags=0;
ta->dupack_num=0;
ta->dupack_frame=0;
g_hash_table_insert(tcp_analyze_acked_table, (void *)frame, ta);
g_hash_table_insert(tcp_analyze_acked_table, GUINT_TO_POINTER(frame), ta);
}
return ta;
}
@ -1230,7 +1230,7 @@ ack_finished:
trs->seq_base=base_seq;
trs->ack_base=base_ack;
trs->win_scale=win_scale1;
g_hash_table_insert(tcp_rel_seq_table, (void *)pinfo->fd->num, trs);
g_hash_table_insert(tcp_rel_seq_table, GINT_TO_POINTER(pinfo->fd->num), trs);
}
}
@ -1391,15 +1391,15 @@ free_all_acked(gpointer key_arg _U_, gpointer value _U_, gpointer user_data _U_)
static guint
tcp_acked_hash(gconstpointer k)
{
guint32 frame = (guint32)k;
guint32 frame = GPOINTER_TO_UINT(k);
return frame;
}
static gint
tcp_acked_equal(gconstpointer k1, gconstpointer k2)
{
guint32 frame1 = (guint32)k1;
guint32 frame2 = (guint32)k2;
guint32 frame1 = GPOINTER_TO_UINT(k1);
guint32 frame2 = GPOINTER_TO_UINT(k2);
return frame1==frame2;
}

View File

@ -1028,7 +1028,7 @@ dissect_tds_col_info_token(tvbuff_t *tvb, struct _netlib_data *nl_data, guint of
* TODO: check we don't go past end of the token
*/
static gboolean
read_results_tds5(tvbuff_t *tvb, struct _netlib_data *nl_data, guint offset, guint len)
read_results_tds5(tvbuff_t *tvb, struct _netlib_data *nl_data, guint offset, guint len _U_)
{
guint name_len;
guint cur;
@ -1206,7 +1206,7 @@ dissect_tds_env_chg(tvbuff_t *tvb, guint offset, guint token_sz,
}
static void
dissect_tds_err_token(tvbuff_t *tvb, guint offset, guint token_sz, proto_tree *tree)
dissect_tds_err_token(tvbuff_t *tvb, guint offset, guint token_sz _U_, proto_tree *tree)
{
guint16 msg_len;
guint8 srvr_len, proc_len;

View File

@ -2894,7 +2894,7 @@ static void dissect_x11_initial_conn(tvbuff_t *tvb, packet_info *pinfo,
* ...and we're expecting a reply to it.
*/
state->sequencenumber = 0;
g_hash_table_insert(state->seqtable, (int *)state->sequencenumber,
g_hash_table_insert(state->seqtable, GINT_TO_POINTER(state->sequencenumber),
(int *)INITIAL_CONN);
}
@ -3013,13 +3013,13 @@ static void dissect_x11_request(tvbuff_t *tvb, packet_info *pinfo,
if (state->opcode_vals[i].strptr == NULL) {
state->opcode_vals[i].strptr = name;
g_hash_table_insert(state->valtable,
(int *)state->sequencenumber,
GINT_TO_POINTER(state->sequencenumber),
(int *)&state->opcode_vals[i]);
break;
} else if (strcmp(state->opcode_vals[i].strptr,
name) == 0) {
g_hash_table_insert(state->valtable,
(int *)state->sequencenumber,
GINT_TO_POINTER(state->sequencenumber),
(int *)&state->opcode_vals[i]);
break;
}
@ -3071,7 +3071,7 @@ static void dissect_x11_request(tvbuff_t *tvb, packet_info *pinfo,
* Those requests expect a reply.
*/
g_hash_table_insert(state->seqtable,
(int *)state->sequencenumber,
GINT_TO_POINTER(state->sequencenumber),
(int *)opcode);
break;
@ -3082,7 +3082,7 @@ static void dissect_x11_request(tvbuff_t *tvb, packet_info *pinfo,
*/
if (opcode >= X_FirstExtension && opcode <= X_LastExtension) {
g_hash_table_insert(state->seqtable,
(int *)state->sequencenumber,
GINT_TO_POINTER(state->sequencenumber),
(int *)opcode);
}
@ -4168,7 +4168,7 @@ static void dissect_x11_requests(tvbuff_t *tvb, packet_info *pinfo,
if (state->iconn_frame == pinfo->fd->num ||
(g_hash_table_lookup(state->seqtable,
(int *)state->sequencenumber) == (int *)NOTHING_SEEN &&
GINT_TO_POINTER(state->sequencenumber)) == (int *)NOTHING_SEEN &&
(opcode == 'B' || opcode == 'l') &&
(plen == 11 || plen == 2816))) {
/*
@ -4474,7 +4474,7 @@ dissect_x11_replies(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* - event (some event occured)
*/
if (g_hash_table_lookup(state->seqtable,
(int *)state->sequencenumber) == (int *)INITIAL_CONN
GINT_TO_POINTER(state->sequencenumber)) == (int *)INITIAL_CONN
|| (state->iconn_reply == pinfo->fd->num)) {
/*
* Either the connection is in the "initial
@ -4567,7 +4567,7 @@ dissect_x11_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
sequence_number = VALUE16(tvb, offset + 2);
opcode = (int)g_hash_table_lookup(state->seqtable,
(int *)sequence_number);
GINT_TO_POINTER(sequence_number));
if (state->iconn_frame == 0 && state->resync == FALSE) {
@ -4618,12 +4618,12 @@ dissect_x11_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
vals_p = g_hash_table_lookup(state->valtable,
(int *)sequence_number);
GINT_TO_POINTER(sequence_number));
if (vals_p != NULL) {
major_opcode = VALUE8(tvb, offset + 9);
vals_p->value = major_opcode;
g_hash_table_remove(state->valtable,
(int *)sequence_number);
GINT_TO_POINTER(sequence_number));
}
break;

View File

@ -65,7 +65,7 @@ static guint h225ras_call_hash(gconstpointer k)
{
const h225ras_call_info_key* key = (const h225ras_call_info_key*) k;
return key->reqSeqNum + (guint32)(key->conversation);
return key->reqSeqNum + GPOINTER_TO_UINT(key->conversation);
}

View File

@ -661,7 +661,7 @@ dissect_sdt(tvbuff_t *tvb, guint offset, proto_tree *tree, acn_pdu_history_t* pa
}
static guint
dissect_dmp(tvbuff_t *tvb, guint offset, proto_tree *tree, acn_pdu_history_t* parent_hist, guint max_size)
dissect_dmp(tvbuff_t *tvb _U_, guint offset _U_, proto_tree *tree _U_, acn_pdu_history_t* parent_hist _U_, guint max_size _U_)
{
return 0;
}

View File

@ -1729,7 +1729,7 @@ parse_tt3(tvbuff_t *tvb, guint offset, guint size, guint level, GNode *ptr)
while(offset < eos) {
if (ptr) /* build pointer tree to all asn1 enteties */
cur_node = g_node_append_data(ptr, (void *)offset);
cur_node = g_node_append_data(ptr, GUINT_TO_POINTER(offset));
asn1_open(&asn1, tvb, offset);
ret = asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len);
@ -2171,10 +2171,10 @@ define_constraint(GNode *p, GNode *q)
p = g_node_first_child(p);
range->from = get_asn1_int(0, (guint)p->data);
range->from = get_asn1_int(0, GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
range->to = get_asn1_int(1, (guint)p->data);
range->to = get_asn1_int(1, GPOINTER_TO_UINT(p->data));
}
@ -2190,10 +2190,10 @@ define_namednumber(GNode *p, GNode *q)
p = g_node_first_child(p);
num->name = get_asn1_string(0, (guint)p->data);
num->name = get_asn1_string(0, GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
num->value = get_asn1_int(1, (guint)p->data);
num->value = get_asn1_int(1, GPOINTER_TO_UINT(p->data));
}
static void
@ -2208,10 +2208,10 @@ define_typeref(GNode *p, GNode *q)
p = g_node_first_child(p);
ref->typeDefId = get_asn1_uint((guint)p->data);
ref->typeDefId = get_asn1_uint(GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
ref->implicit = get_asn1_int(ASN1_BOL, (guint)p->data);
ref->implicit = get_asn1_int(ASN1_BOL, GPOINTER_TO_UINT(p->data));
}
static void
@ -2226,10 +2226,10 @@ define_tag(GNode *p, GNode *q)
p = g_node_first_child(p);
type->tclass = get_asn1_int(ASN1_ENUM, (guint)p->data);
type->tclass = get_asn1_int(ASN1_ENUM, GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
type->code = get_asn1_int(ASN1_INT, (guint)p->data);
type->code = get_asn1_int(ASN1_INT, GPOINTER_TO_UINT(p->data));
}
@ -2245,13 +2245,13 @@ define_type(GNode *p, GNode *q)
/* g_message("define_type %p, %p", p, q); */
type->typeId = get_asn1_int(0, (guint)p->data);
type->typeId = get_asn1_int(0, GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
type->optional = get_asn1_int(1, (guint)p->data);
type->optional = get_asn1_int(1, GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
if (check_tag(2, (guint)p->data)) { /* optional, need empty node if not there ?*/
if (check_tag(2, GPOINTER_TO_UINT(p->data))) { /* optional, need empty node if not there ?*/
r = g_node_first_child(p);
while (r) {
define_tag(r, t);
@ -2260,15 +2260,15 @@ define_type(GNode *p, GNode *q)
p = g_node_next_sibling(p);
}
if (!check_tag(3, (guint)p->data)) {
if (!check_tag(3, GPOINTER_TO_UINT(p->data))) {
g_warning("expect tag 3, ERROR");
}
r = g_node_first_child(p);
/* a choice ... */
type->content = TBLTYPETYPE_None;
if (check_tag(0, (guint)r->data)) type->content = TBLTYPETYPE_Primitive;
if (check_tag(1, (guint)r->data)) type->content = TBLTYPETYPE_Elements;
if (check_tag(2, (guint)r->data)) type->content = TBLTYPETYPE_TypeRef;
if (check_tag(0, GPOINTER_TO_UINT(r->data))) type->content = TBLTYPETYPE_Primitive;
if (check_tag(1, GPOINTER_TO_UINT(r->data))) type->content = TBLTYPETYPE_Elements;
if (check_tag(2, GPOINTER_TO_UINT(r->data))) type->content = TBLTYPETYPE_TypeRef;
switch(type->content) {
case TBLTYPETYPE_Primitive:
break;
@ -2290,21 +2290,21 @@ define_type(GNode *p, GNode *q)
type->fieldName = 0;
type->anonymous = FALSE;
if (p && check_tag(4, (guint)p->data)) {
type->fieldName = get_asn1_string(4, (guint)p->data);
if (p && check_tag(4, GPOINTER_TO_UINT(p->data))) {
type->fieldName = get_asn1_string(4, GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
} else {
type->anonymous = TRUE;
}
type->constraint = FALSE;
if (p && check_tag(5, (guint)p->data)) {
if (p && check_tag(5, GPOINTER_TO_UINT(p->data))) {
type->constraint = TRUE;
define_constraint(p, t);
p = g_node_next_sibling(p);
}
if (p && check_tag(6, (guint)p->data)) {
if (p && check_tag(6, GPOINTER_TO_UINT(p->data))) {
r = g_node_first_child(p);
while(r) {
define_namednumber(r, t);
@ -2326,10 +2326,10 @@ define_typedef(GNode *p, GNode *q)
p = g_node_first_child(p);
type_def->typeDefId = get_asn1_uint((guint)p->data);
type_def->typeDefId = get_asn1_uint(GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
type_def->typeName = get_asn1_string(ASN1_PRNSTR, (guint)p->data);
type_def->typeName = get_asn1_string(ASN1_PRNSTR, GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
define_type(g_node_first_child(p), t);
@ -2351,16 +2351,16 @@ define_module(GNode *p, GNode *q)
p = g_node_first_child(p);
module->name = get_asn1_string(0, (guint)p->data);
module->name = get_asn1_string(0, GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
module->id = 0;
if (check_tag(1, (guint)p->data)) { /* optional */
module->id = get_asn1_oid(1, (guint)p->data);
if (check_tag(1, GPOINTER_TO_UINT(p->data))) { /* optional */
module->id = get_asn1_oid(1, GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
}
module->isUseful = get_asn1_int(2, (guint)p->data);
module->isUseful = get_asn1_int(2, GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
p = g_node_first_child(p);
@ -2527,17 +2527,17 @@ get_values(void) /* collect values from ASN.1 tree */
p = g_node_first_child(asn1_nodes); /* top of the data tree */
p = g_node_first_child(p);
TT.totalNumModules = get_asn1_uint((guint)p->data);
TT.totalNumModules = get_asn1_uint(GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
TT.totalNumTypeDefs = get_asn1_uint((guint)p->data);
TT.totalNumTypeDefs = get_asn1_uint(GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
TT.totalNumTypes = get_asn1_uint((guint)p->data);
TT.totalNumTypes = get_asn1_uint(GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
TT.totalNumTags = get_asn1_uint((guint)p->data);
TT.totalNumTags = get_asn1_uint(GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
TT.totalNumStrings = get_asn1_uint((guint)p->data);
TT.totalNumStrings = get_asn1_uint(GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
TT.totalLenStrings = get_asn1_uint((guint)p->data);
TT.totalLenStrings = get_asn1_uint(GPOINTER_TO_UINT(p->data));
p = g_node_next_sibling(p);
p = g_node_first_child(p);