summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2012-07-17 14:55:27 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2012-07-17 14:55:27 +0000
commitc2883b7be2da0e598747c2273b9eeb97ca944eb1 (patch)
tree06722a5720071ac3b79a199d9455838d6f95359e
parent83a22a220a3fe03a3461567e2dc42706359b7e9f (diff)
downloadwireshark-c2883b7be2da0e598747c2273b9eeb97ca944eb1.tar.gz
Fix 'dereferencing type-punned pointer will break strict-aliasing rules' warning when compiling with gcc 4.1.3
svn path=/trunk/; revision=43768
-rw-r--r--asn1/rrc/packet-rrc-template.c2
-rw-r--r--asn1/rrc/rrc.cnf2
-rw-r--r--epan/dissectors/packet-rrc.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/asn1/rrc/packet-rrc-template.c b/asn1/rrc/packet-rrc-template.c
index 8dcf26724c..def3d07e97 100644
--- a/asn1/rrc/packet-rrc-template.c
+++ b/asn1/rrc/packet-rrc-template.c
@@ -68,7 +68,7 @@ enum nas_sys_info_gsm_map {
RRC_NAS_SYS_INFO_CN_COMMON
};
-static enum nas_sys_info_gsm_map rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
+static guint32 rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
/* Forward declarations */
static int dissect_UE_RadioAccessCapabilityInfo_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
diff --git a/asn1/rrc/rrc.cnf b/asn1/rrc/rrc.cnf
index 96f6593482..4ab1f1111a 100644
--- a/asn1/rrc/rrc.cnf
+++ b/asn1/rrc/rrc.cnf
@@ -606,7 +606,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
proto_tree_add_unicode_string(tree, hf_index, hnbname_tvb, 0, -1,
tvb_get_ephemeral_string_enc(hnbname_tvb, 0, tvb_length(hnbname_tvb), ENC_UTF_8 | ENC_NA));
-#.FN_BODY CN-DomainIdentity VAL_PTR = (guint32*)(&rrc_nas_sys_info_gsm_map_type)
+#.FN_BODY CN-DomainIdentity VAL_PTR = &rrc_nas_sys_info_gsm_map_type
%(DEFAULT_BODY)s
#.FN_BODY CN-InformationInfo/cn-CommonGSM-MAP-NAS-SysInfo
diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c
index b60e67b5d0..3b86e7bf20 100644
--- a/epan/dissectors/packet-rrc.c
+++ b/epan/dissectors/packet-rrc.c
@@ -76,7 +76,7 @@ enum nas_sys_info_gsm_map {
RRC_NAS_SYS_INFO_CN_COMMON
};
-static enum nas_sys_info_gsm_map rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
+static guint32 rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
/* Forward declarations */
static int dissect_UE_RadioAccessCapabilityInfo_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
@@ -15245,7 +15245,7 @@ static int
dissect_rrc_CN_DomainIdentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 610 "../../asn1/rrc/rrc.cnf"
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
- 2, (guint32*)(&rrc_nas_sys_info_gsm_map_type), FALSE, 0, NULL);
+ 2, &rrc_nas_sys_info_gsm_map_type, FALSE, 0, NULL);