aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-diameter.c2
-rw-r--r--epan/dissectors/packet-dmp.c6
-rw-r--r--epan/dissectors/packet-ositp.c8
-rw-r--r--epan/dissectors/packet-ospf.c4
-rw-r--r--epan/dissectors/packet-pim.c4
-rw-r--r--epan/dissectors/packet-zbee-security.c2
-rw-r--r--epan/guid-utils.c6
-rw-r--r--epan/guid-utils.h6
-rw-r--r--epan/packet.c4
-rw-r--r--epan/wmem/wmem_test.c4
-rwxr-xr-xepan/wslua/make-taps.pl2
11 files changed, 24 insertions, 24 deletions
diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c
index ba7dcffd8b..efc8b3567d 100644
--- a/epan/dissectors/packet-diameter.c
+++ b/epan/dissectors/packet-diameter.c
@@ -1451,7 +1451,7 @@ build_simple_avp(const avp_type_t *type, guint32 code, const diam_vnd_t *vendor,
while (vs[i].strptr) {
i++;
}
- vs_ext = value_string_ext_new((value_string *)vs, i+1, wmem_strdup_printf(wmem_epan_scope(), "%s_vals_ext",name));
+ vs_ext = value_string_ext_new(vs, i+1, wmem_strdup_printf(wmem_epan_scope(), "%s_vals_ext",name));
base = (field_display_e)(base|BASE_EXT_STRING);
}
diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c
index dc5357880b..a117e1e9e1 100644
--- a/epan/dissectors/packet-dmp.c
+++ b/epan/dissectors/packet-dmp.c
@@ -1370,14 +1370,14 @@ static gboolean dmp_dec_xbyte_sic (guint64 bin, gchar *sic,
static guint dmp_id_hash (gconstpointer k)
{
- dmp_id_key *dmpx=(dmp_id_key *)k;
+ const dmp_id_key *dmpx=(const dmp_id_key *)k;
return dmpx->id;
}
static gint dmp_id_hash_equal (gconstpointer k1, gconstpointer k2)
{
- dmp_id_key *dmp1=(dmp_id_key *)k1;
- dmp_id_key *dmp2=(dmp_id_key *)k2;
+ const dmp_id_key *dmp1=(const dmp_id_key *)k1;
+ const dmp_id_key *dmp2=(const dmp_id_key *)k2;
if (dmp1->id != dmp2->id)
return 0;
diff --git a/epan/dissectors/packet-ositp.c b/epan/dissectors/packet-ositp.c
index 98f851ca55..e4759b8a8f 100644
--- a/epan/dissectors/packet-ositp.c
+++ b/epan/dissectors/packet-ositp.c
@@ -442,8 +442,8 @@ static gboolean ositp_decode_var_part(tvbuff_t *tvb, int offset, int vp_length,
}
checksum_ok = check_atn_ec_16(tvb, tpdu_len , offset,
offset_iso8073_checksum,
- pinfo->dst.len, (guint8 *)pinfo->dst.data,
- pinfo->src.len, (guint8 *)pinfo->src.data);
+ pinfo->dst.len, (const guint8 *)pinfo->dst.data,
+ pinfo->src.len, (const guint8 *)pinfo->src.data);
proto_tree_add_text(tree, tvb, offset, length,
"ATN extended checksum : 0x%04x (%s)",
tvb_get_ntohs(tvb, offset),
@@ -475,8 +475,8 @@ static gboolean ositp_decode_var_part(tvbuff_t *tvb, int offset, int vp_length,
}
checksum_ok = check_atn_ec_32(tvb, tpdu_len , offset,
offset_iso8073_checksum,
- pinfo->dst.len, (guint8 *)pinfo->dst.data,
- pinfo->src.len, (guint8 *)pinfo->src.data);
+ pinfo->dst.len, (const guint8 *)pinfo->dst.data,
+ pinfo->src.len, (const guint8 *)pinfo->src.data);
proto_tree_add_text(tree, tvb, offset, length,
"ATN extended checksum : 0x%08x (%s)",
tvb_get_ntohl(tvb, offset),
diff --git a/epan/dissectors/packet-ospf.c b/epan/dissectors/packet-ospf.c
index d268a9550a..c232e63b8c 100644
--- a/epan/dissectors/packet-ospf.c
+++ b/epan/dissectors/packet-ospf.c
@@ -1204,9 +1204,9 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
and a prepended IPv6 pseudo-header. */
/* Set up the fields of the pseudo-header. */
- 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;
cksum_vec[2].ptr = (const guint8 *)&phdr;
phdr[0] = g_htonl(ospflen);
diff --git a/epan/dissectors/packet-pim.c b/epan/dissectors/packet-pim.c
index 62222b9a66..5399f4be89 100644
--- a/epan/dissectors/packet-pim.c
+++ b/epan/dissectors/packet-pim.c
@@ -762,9 +762,9 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
break;
case AT_IPv6:
/* Set up the fields of the pseudo-header. */
- 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;
cksum_vec[2].ptr = (const guint8 *)&phdr;
phdr[0] = g_htonl(pim_length);
diff --git a/epan/dissectors/packet-zbee-security.c b/epan/dissectors/packet-zbee-security.c
index ca32a2b460..fd8beaf863 100644
--- a/epan/dissectors/packet-zbee-security.c
+++ b/epan/dissectors/packet-zbee-security.c
@@ -140,7 +140,7 @@ static guint num_uat_key_records = 0;
static void* uat_key_record_copy_cb(void* n, const void* o, size_t siz _U_) {
uat_key_record_t* new_key = (uat_key_record_t *)n;
- const uat_key_record_t* old_key = (uat_key_record_t *)o;
+ const uat_key_record_t* old_key = (const uat_key_record_t *)o;
if (old_key->string) {
new_key->string = g_strdup(old_key->string);
diff --git a/epan/guid-utils.c b/epan/guid-utils.c
index 13d37de202..0b788e7721 100644
--- a/epan/guid-utils.c
+++ b/epan/guid-utils.c
@@ -82,7 +82,7 @@ ResolveWin32UUID(e_guid_t if_id, char *uuid_name, int uuid_name_max_len)
/* store a guid to name mapping */
void
-guids_add_guid(e_guid_t *guid, const gchar *name)
+guids_add_guid(const e_guid_t *guid, const gchar *name)
{
wmem_tree_key_t guidkey[2];
guint32 g[4];
@@ -119,7 +119,7 @@ guids_add_guid(e_guid_t *guid, const gchar *name)
/* retrieve the registered name for this GUID */
const gchar *
-guids_get_guid_name(e_guid_t *guid)
+guids_get_guid_name(const e_guid_t *guid)
{
wmem_tree_key_t guidkey[2];
guint32 g[4];
@@ -184,7 +184,7 @@ guids_init(void)
Formats uuid number and returns the resulting string, if name is unknown.
(derived from val_to_str) */
const gchar *
-guids_resolve_guid_to_str(e_guid_t *guid)
+guids_resolve_guid_to_str(const e_guid_t *guid)
{
const gchar *name;
diff --git a/epan/guid-utils.h b/epan/guid-utils.h
index 87df9d919c..63d875535d 100644
--- a/epan/guid-utils.h
+++ b/epan/guid-utils.h
@@ -43,14 +43,14 @@ typedef struct _e_guid_t {
WS_DLL_PUBLIC void guids_init(void);
/* add a GUID */
-WS_DLL_PUBLIC void guids_add_guid(e_guid_t *guid, const gchar *name);
+WS_DLL_PUBLIC void guids_add_guid(const e_guid_t *guid, const gchar *name);
/* try to get registered name for this GUID */
-WS_DLL_PUBLIC const gchar *guids_get_guid_name(e_guid_t *guid);
+WS_DLL_PUBLIC const gchar *guids_get_guid_name(const e_guid_t *guid);
/* resolve GUID to name (or if unknown to hex string) */
/* (if you need hex string only, use guid_to_str instead) */
-WS_DLL_PUBLIC const gchar* guids_resolve_guid_to_str(e_guid_t *guid);
+WS_DLL_PUBLIC const gchar* guids_resolve_guid_to_str(const e_guid_t *guid);
/* add a UUID (dcerpc_init_uuid() will call this too) */
#define guids_add_uuid(uuid, name) guids_add_guid((e_guid_t *) (uuid), (name))
diff --git a/epan/packet.c b/epan/packet.c
index 2a1da2a74a..c321eb9ba5 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -1357,8 +1357,8 @@ dtbl_entry_get_handle (dtbl_entry_t *dtbl_entry)
static gint
dissector_compare_filter_name(gconstpointer dissector_a, gconstpointer dissector_b)
{
- const dissector_handle_t a = (const dissector_handle_t)dissector_a;
- const dissector_handle_t b = (const dissector_handle_t)dissector_b;
+ const struct dissector_handle *a = (const struct dissector_handle *)dissector_a;
+ const struct dissector_handle *b = (const struct dissector_handle *)dissector_b;
const char *a_name, *b_name;
gint ret;
diff --git a/epan/wmem/wmem_test.c b/epan/wmem/wmem_test.c
index 0a5ab5e936..4b502bb53e 100644
--- a/epan/wmem/wmem_test.c
+++ b/epan/wmem/wmem_test.c
@@ -67,8 +67,8 @@ wmem_test_compare_guint32(const void *a, const void *b)
{
guint32 l, r;
- l = *(guint32*)a;
- r = *(guint32*)b;
+ l = *(const guint32*)a;
+ r = *(const guint32*)b;
return l - r;
}
diff --git a/epan/wslua/make-taps.pl b/epan/wslua/make-taps.pl
index 81e5f40004..a74c546634 100755
--- a/epan/wslua/make-taps.pl
+++ b/epan/wslua/make-taps.pl
@@ -124,7 +124,7 @@ sub dotap {
$elems{$k} = $v;
}
- my $code = "static void wslua_${tname}_to_table(lua_State* L, const void* p) { $sname* v _U_; v = ($sname*)p; lua_newtable(L);\n";
+ my $code = "static void wslua_${tname}_to_table(lua_State* L, const void* p) { const $sname* v _U_; v = (const $sname*)p; lua_newtable(L);\n";
my $doc = "Tap: $tname\n";
for my $n (sort keys %elems) {