diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-12-08 23:16:06 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-12-08 23:16:06 +0000 |
commit | f91eba752b3e34489951e507c54df36fee1feee4 (patch) | |
tree | f877c8a4726be1654389b4408a048f7ddd3e5eb4 /epan/dissectors | |
parent | 2b0797a3618218d2d08a04fcbdd9261657af153a (diff) |
Fix some warnings: cast discards `__attribute__((const))' qualifier from pointer target type
svn path=/trunk/; revision=53875
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-6lowpan.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-9p.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-ipsec.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c index ded3325155..03c2274072 100644 --- a/epan/dissectors/packet-6lowpan.c +++ b/epan/dissectors/packet-6lowpan.c @@ -517,7 +517,7 @@ lowpan_pfxcpy(void *dst, const void *src, size_t bits) memcpy(dst, src, bits>>3); if (bits & 0x7) { guint8 mask = ((0xff00) >> (bits & 0x7)); - guint8 last = ((guint8 *)src)[bits>>3] & mask; + guint8 last = ((const guint8 *)src)[bits>>3] & mask; ((guint8 *)dst)[bits>>3] &= ~mask; ((guint8 *)dst)[bits>>3] |= last; } @@ -537,7 +537,7 @@ lowpan_pfxcpy(void *dst, const void *src, size_t bits) static guint lowpan_context_hash(gconstpointer key) { - return (((lowpan_context_key *)key)->cid) | (((lowpan_context_key *)key)->pan << 8); + return (((const lowpan_context_key *)key)->cid) | (((const lowpan_context_key *)key)->pan << 8); } /* lowpan_context_hash */ /*FUNCTION:------------------------------------------------------ @@ -554,8 +554,8 @@ lowpan_context_hash(gconstpointer key) static gboolean lowpan_context_equal(gconstpointer a, gconstpointer b) { - return (((lowpan_context_key *)a)->pan == ((lowpan_context_key *)b)->pan) && - (((lowpan_context_key *)a)->cid == ((lowpan_context_key *)b)->cid); + return (((const lowpan_context_key *)a)->pan == ((const lowpan_context_key *)b)->pan) && + (((const lowpan_context_key *)a)->cid == ((const lowpan_context_key *)b)->cid); } /* lowpan_context_equal */ /*FUNCTION:------------------------------------------------------ diff --git a/epan/dissectors/packet-9p.c b/epan/dissectors/packet-9p.c index 09348810ab..a9debe7134 100644 --- a/epan/dissectors/packet-9p.c +++ b/epan/dissectors/packet-9p.c @@ -996,7 +996,7 @@ struct _9p_taginfo { }; static gint _9p_hash_equal(gconstpointer k1, gconstpointer k2) { - const struct _9p_hashkey *key1 = (struct _9p_hashkey *)k1, *key2 = (struct _9p_hashkey *)k2; + const struct _9p_hashkey *key1 = (const struct _9p_hashkey *)k1, *key2 = (const struct _9p_hashkey *)k2; return ((key1->conv_index == key2->conv_index) && (key1->tag == key2->tag) && (key1->fid == key2->fid)); } diff --git a/epan/dissectors/packet-ipsec.c b/epan/dissectors/packet-ipsec.c index 1a115aad10..c7af580567 100644 --- a/epan/dissectors/packet-ipsec.c +++ b/epan/dissectors/packet-ipsec.c @@ -230,7 +230,7 @@ static guint num_sa_uat = 0; static void* uat_esp_sa_record_copy_cb(void* n, const void* o, size_t siz _U_) { uat_esp_sa_record_t* new_rec = (uat_esp_sa_record_t *)n; - const uat_esp_sa_record_t* old_rec = (uat_esp_sa_record_t *)o; + const uat_esp_sa_record_t* old_rec = (const uat_esp_sa_record_t *)o; new_rec->srcIP = (old_rec->srcIP) ? g_strdup(old_rec->srcIP) : NULL; new_rec->dstIP = (old_rec->dstIP) ? g_strdup(old_rec->dstIP) : NULL; |