Fix warnings + remove some v. old comment from strutil.h

svn path=/trunk/; revision=54078
This commit is contained in:
Jakub Zawadzki 2013-12-13 23:11:14 +00:00
parent 24360c9951
commit d6da7a01b1
5 changed files with 16 additions and 14 deletions

View File

@ -67,9 +67,9 @@ typedef enum {
DVB_ENCODING_EXT_ISO_8859_14 = DVB_ENCODING_EXT_BASE | 14,
DVB_ENCODING_EXT_ISO_8859_15 = DVB_ENCODING_EXT_BASE | 15,
DVB_ENCODING_INVALID = G_MAXUINT32-3, /* length invalid */
DVB_ENCODING_RESERVED = G_MAXUINT32-2, /* reserved by spec */
DVB_ENCODING_UNKNOWN = G_MAXUINT32-1, /* not defined by spec */
DVB_ENCODING_INVALID = -4, /* length invalid */
DVB_ENCODING_RESERVED = -3, /* reserved by spec */
DVB_ENCODING_UNKNOWN = -2 /* not defined by spec */
} dvb_encoding_e;
extern const value_string dvb_string_encoding_vals[];

View File

@ -921,7 +921,7 @@ static int dissect_kademlia_tagname(tvbuff_t *tvb, packet_info *pinfo _U_,
tag_full_name = "UnknownTagName";
if ( tagname && string_length == 1 ) {
tagname_value = *(guint8*)tagname;
tagname_value = *(const guint8*)tagname;
/* lookup tagname */
tag_full_name = val_to_str_const( tagname_value, kademlia_tags, tag_full_name );
}
@ -2360,7 +2360,7 @@ static int dissect_kademlia_tag(tvbuff_t *tvb, packet_info *pinfo _U_,
tag_type = tvb_get_guint8( tvb, offset+2 );
offset = dissect_kademlia_tagname( tvb, pinfo, offset, subtree, &tagname_string, &tagname_extended_string );
if ( strlen( tagname_string ) == 1 ) {
const guint8 tagname_guint = *(guint8*)tagname_string;
const guint8 tagname_guint = *(const guint8*)tagname_string;
proto_item_append_text( tag_node, " 0x%02X [%s] = ", tagname_guint, tagname_extended_string );
}

View File

@ -483,9 +483,9 @@ dissect_hip_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
/* Checksum - this is the same algorithm from UDP, ICMPv6 */
if (!pinfo->fragmented) {
/* IPv4 or IPv6 addresses */
cksum_vec[0].ptr = (guint8 *)pinfo->src.data;
cksum_vec[0].ptr = (const guint8 *)pinfo->src.data;
cksum_vec[0].len = pinfo->src.len;
cksum_vec[1].ptr = (guint8 *)pinfo->dst.data;
cksum_vec[1].ptr = (const guint8 *)pinfo->dst.data;
cksum_vec[1].len = pinfo->dst.len;
/* the rest of the pseudo-header */

View File

@ -556,6 +556,8 @@ iscsi_dissect_TargetAddress(packet_info *pinfo, proto_tree *tree _U_,char *val)
/* looks like a ipv4 address */
p = strchr(value, ':');
if (p != NULL) {
char *addr_data;
*p++ = 0;
pgt = strchr(p, ',');
@ -563,14 +565,16 @@ iscsi_dissect_TargetAddress(packet_info *pinfo, proto_tree *tree _U_,char *val)
*pgt++ = 0;
}
addr_data = (char *) wmem_alloc(wmem_packet_scope(), 4);
addr_data[0] = i0;
addr_data[1] = i1;
addr_data[2] = i2;
addr_data[3] = i3;
addr = wmem_new(wmem_packet_scope(), address);
addr->type = AT_IPv4;
addr->len = 4;
addr->data = wmem_alloc(wmem_packet_scope(), 4);
((char *)addr->data)[0] = i0;
((char *)addr->data)[1] = i1;
((char *)addr->data)[2] = i2;
((char *)addr->data)[3] = i3;
addr->data = addr_data;
port = atoi(p);
}

View File

@ -31,8 +31,6 @@
extern "C" {
#endif /* __cplusplus */
/* ... thus, config.h needs to be #included */
/** @file
* String handling and conversion utilities.
*/